pub struct FieldBuilder<State>(/* private fields */);Expand description
Builder for serializing an instance of the Field type.
Can be created using the Field::builder method.
Implementations§
Source§impl FieldBuilder<()>
impl FieldBuilder<()>
Sourcepub fn name<T0>(self, value: T0) -> FieldBuilder<(T0,)>
pub fn name<T0>(self, value: T0) -> FieldBuilder<(T0,)>
Setter for the name field.
Sourcepub fn name_as_null(self) -> FieldBuilder<((),)>
pub fn name_as_null(self) -> FieldBuilder<((),)>
Sets the name field to null.
Source§impl<T0> FieldBuilder<(T0,)>
impl<T0> FieldBuilder<(T0,)>
Sourcepub fn nullable<T1>(self, value: T1) -> FieldBuilder<(T0, T1)>
pub fn nullable<T1>(self, value: T1) -> FieldBuilder<(T0, T1)>
Setter for the nullable field.
Sourcepub fn nullable_as_default(self) -> FieldBuilder<(T0, DefaultValue)>
pub fn nullable_as_default(self) -> FieldBuilder<(T0, DefaultValue)>
Sets the nullable field to the default value.
Source§impl<T0, T1> FieldBuilder<(T0, T1)>
impl<T0, T1> FieldBuilder<(T0, T1)>
Sourcepub fn type_<T2>(self, value: T2) -> FieldBuilder<(T0, T1, T2)>where
T2: WriteAsOptionalUnion<Type>,
pub fn type_<T2>(self, value: T2) -> FieldBuilder<(T0, T1, T2)>where
T2: WriteAsOptionalUnion<Type>,
Setter for the type field.
Sourcepub fn type_as_null(self) -> FieldBuilder<(T0, T1, ())>
pub fn type_as_null(self) -> FieldBuilder<(T0, T1, ())>
Sets the type field to null.
Source§impl<T0, T1, T2> FieldBuilder<(T0, T1, T2)>
impl<T0, T1, T2> FieldBuilder<(T0, T1, T2)>
Sourcepub fn dictionary<T3>(self, value: T3) -> FieldBuilder<(T0, T1, T2, T3)>
pub fn dictionary<T3>(self, value: T3) -> FieldBuilder<(T0, T1, T2, T3)>
Setter for the dictionary field.
Sourcepub fn dictionary_as_null(self) -> FieldBuilder<(T0, T1, T2, ())>
pub fn dictionary_as_null(self) -> FieldBuilder<(T0, T1, T2, ())>
Sets the dictionary field to null.
Source§impl<T0, T1, T2, T3> FieldBuilder<(T0, T1, T2, T3)>
impl<T0, T1, T2, T3> FieldBuilder<(T0, T1, T2, T3)>
Sourcepub fn children<T4>(self, value: T4) -> FieldBuilder<(T0, T1, T2, T3, T4)>
pub fn children<T4>(self, value: T4) -> FieldBuilder<(T0, T1, T2, T3, T4)>
Setter for the children field.
Sourcepub fn children_as_null(self) -> FieldBuilder<(T0, T1, T2, T3, ())>
pub fn children_as_null(self) -> FieldBuilder<(T0, T1, T2, T3, ())>
Sets the children field to null.
Source§impl<T0, T1, T2, T3, T4> FieldBuilder<(T0, T1, T2, T3, T4)>
impl<T0, T1, T2, T3, T4> FieldBuilder<(T0, T1, T2, T3, T4)>
Sourcepub fn custom_metadata<T5>(
self,
value: T5,
) -> FieldBuilder<(T0, T1, T2, T3, T4, T5)>
pub fn custom_metadata<T5>( self, value: T5, ) -> FieldBuilder<(T0, T1, T2, T3, T4, T5)>
Setter for the custom_metadata field.
Sourcepub fn custom_metadata_as_null(self) -> FieldBuilder<(T0, T1, T2, T3, T4, ())>
pub fn custom_metadata_as_null(self) -> FieldBuilder<(T0, T1, T2, T3, T4, ())>
Sets the custom_metadata field to null.
Source§impl<T0, T1, T2, T3, T4, T5> FieldBuilder<(T0, T1, T2, T3, T4, T5)>
impl<T0, T1, T2, T3, T4, T5> FieldBuilder<(T0, T1, T2, T3, T4, T5)>
Trait Implementations§
Source§impl<State: Debug> Debug for FieldBuilder<State>
impl<State: Debug> Debug for FieldBuilder<State>
impl<T0: WriteAsOptional<Offset<str>>, T1: WriteAsDefault<bool, bool>, T2: WriteAsOptionalUnion<Type>, T3: WriteAsOptional<Offset<DictionaryEncoding>>, T4: WriteAsOptional<Offset<[Offset<Field>]>>, T5: WriteAsOptional<Offset<[Offset<KeyValue>]>>> WriteAs<Offset<Field>> for FieldBuilder<(T0, T1, T2, T3, T4, T5)>
impl<T0: WriteAsOptional<Offset<str>>, T1: WriteAsDefault<bool, bool>, T2: WriteAsOptionalUnion<Type>, T3: WriteAsOptional<Offset<DictionaryEncoding>>, T4: WriteAsOptional<Offset<[Offset<Field>]>>, T5: WriteAsOptional<Offset<[Offset<KeyValue>]>>> WriteAsOffset<Field> for FieldBuilder<(T0, T1, T2, T3, T4, T5)>
impl<T0: WriteAsOptional<Offset<str>>, T1: WriteAsDefault<bool, bool>, T2: WriteAsOptionalUnion<Type>, T3: WriteAsOptional<Offset<DictionaryEncoding>>, T4: WriteAsOptional<Offset<[Offset<Field>]>>, T5: WriteAsOptional<Offset<[Offset<KeyValue>]>>> WriteAsOptional<Offset<Field>> for FieldBuilder<(T0, T1, T2, T3, T4, T5)>
Auto Trait Implementations§
impl<State> Freeze for FieldBuilder<State>where
State: Freeze,
impl<State> RefUnwindSafe for FieldBuilder<State>where
State: RefUnwindSafe,
impl<State> Send for FieldBuilder<State>where
State: Send,
impl<State> Sync for FieldBuilder<State>where
State: Sync,
impl<State> Unpin for FieldBuilder<State>where
State: Unpin,
impl<State> UnwindSafe for FieldBuilder<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