pub struct ValuesMapBuilder(/* private fields */);
Expand description
ValuesMapBuilder assists in building a ValuesMap.
Implementations§
Source§impl ValuesMapBuilder
impl ValuesMapBuilder
Sourcepub fn try_from<S: Serialize>(s: S) -> Result<Self>
pub fn try_from<S: Serialize>(s: S) -> Result<Self>
Returns a ValuesMapBuilder populated from the given map-serializable value.
Sourcepub fn string(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
) -> &mut Self
pub fn string( &mut self, key: impl Into<String>, value: impl Into<String>, ) -> &mut Self
Inserts a string value into the map.
Sourcepub fn string_option(
&mut self,
key: impl Into<String>,
value: Option<impl Into<String>>,
) -> &mut Self
pub fn string_option( &mut self, key: impl Into<String>, value: Option<impl Into<String>>, ) -> &mut Self
Inserts a string value into the map only if the given Option is Some.
Sourcepub fn string_array<T: Into<String>>(
&mut self,
key: impl Into<String>,
iter: impl IntoIterator<Item = T>,
) -> &mut Self
pub fn string_array<T: Into<String>>( &mut self, key: impl Into<String>, iter: impl IntoIterator<Item = T>, ) -> &mut Self
Inserts a string array into the map.
Sourcepub fn entry(
&mut self,
key: impl Into<String>,
value: impl Into<Value>,
) -> &mut Self
pub fn entry( &mut self, key: impl Into<String>, value: impl Into<Value>, ) -> &mut Self
Inserts an entry into the map using the value’s impl Into<Value>
.
Trait Implementations§
Source§impl Default for ValuesMapBuilder
impl Default for ValuesMapBuilder
Source§fn default() -> ValuesMapBuilder
fn default() -> ValuesMapBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ValuesMapBuilder
impl RefUnwindSafe for ValuesMapBuilder
impl Send for ValuesMapBuilder
impl Sync for ValuesMapBuilder
impl Unpin for ValuesMapBuilder
impl UnwindSafe for ValuesMapBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more