pub struct KeyValueBuilder<State>(/* private fields */);Expand description
Builder for serializing an instance of the KeyValue type.
Can be created using the KeyValue::builder method.
Implementations§
Source§impl KeyValueBuilder<()>
impl KeyValueBuilder<()>
Sourcepub fn key<T0>(self, value: T0) -> KeyValueBuilder<(T0,)>
pub fn key<T0>(self, value: T0) -> KeyValueBuilder<(T0,)>
Setter for the key field.
Sourcepub fn key_as_null(self) -> KeyValueBuilder<((),)>
pub fn key_as_null(self) -> KeyValueBuilder<((),)>
Sets the key field to null.
Source§impl<T0> KeyValueBuilder<(T0,)>
impl<T0> KeyValueBuilder<(T0,)>
Sourcepub fn value<T1>(self, value: T1) -> KeyValueBuilder<(T0, T1)>
pub fn value<T1>(self, value: T1) -> KeyValueBuilder<(T0, T1)>
Setter for the value field.
Sourcepub fn value_as_null(self) -> KeyValueBuilder<(T0, ())>
pub fn value_as_null(self) -> KeyValueBuilder<(T0, ())>
Sets the value field to null.
Trait Implementations§
Source§impl<State: Debug> Debug for KeyValueBuilder<State>
impl<State: Debug> Debug for KeyValueBuilder<State>
impl<T0: WriteAsOptional<Offset<str>>, T1: WriteAsOptional<Offset<str>>> WriteAs<Offset<KeyValue>> for KeyValueBuilder<(T0, T1)>
impl<T0: WriteAsOptional<Offset<str>>, T1: WriteAsOptional<Offset<str>>> WriteAsOffset<KeyValue> for KeyValueBuilder<(T0, T1)>
impl<T0: WriteAsOptional<Offset<str>>, T1: WriteAsOptional<Offset<str>>> WriteAsOptional<Offset<KeyValue>> for KeyValueBuilder<(T0, T1)>
Auto Trait Implementations§
impl<State> Freeze for KeyValueBuilder<State>where
State: Freeze,
impl<State> RefUnwindSafe for KeyValueBuilder<State>where
State: RefUnwindSafe,
impl<State> Send for KeyValueBuilder<State>where
State: Send,
impl<State> Sync for KeyValueBuilder<State>where
State: Sync,
impl<State> Unpin for KeyValueBuilder<State>where
State: Unpin,
impl<State> UnwindSafe for KeyValueBuilder<State>where
State: UnwindSafe,
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> 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