pub struct UnionBuilder<State>(/* private fields */);Expand description
Builder for serializing an instance of the Union type.
Can be created using the Union::builder method.
Implementations§
Source§impl UnionBuilder<()>
impl UnionBuilder<()>
Sourcepub fn mode<T0>(self, value: T0) -> UnionBuilder<(T0,)>
pub fn mode<T0>(self, value: T0) -> UnionBuilder<(T0,)>
Setter for the mode field.
Sourcepub fn mode_as_default(self) -> UnionBuilder<(DefaultValue,)>
pub fn mode_as_default(self) -> UnionBuilder<(DefaultValue,)>
Sets the mode field to the default value.
Source§impl<T0> UnionBuilder<(T0,)>
impl<T0> UnionBuilder<(T0,)>
Sourcepub fn type_ids<T1>(self, value: T1) -> UnionBuilder<(T0, T1)>
pub fn type_ids<T1>(self, value: T1) -> UnionBuilder<(T0, T1)>
Setter for the typeIds field.
Sourcepub fn type_ids_as_null(self) -> UnionBuilder<(T0, ())>
pub fn type_ids_as_null(self) -> UnionBuilder<(T0, ())>
Sets the typeIds field to null.
Trait Implementations§
Source§impl<State: Debug> Debug for UnionBuilder<State>
impl<State: Debug> Debug for UnionBuilder<State>
impl<T0: WriteAsDefault<UnionMode, UnionMode>, T1: WriteAsOptional<Offset<[i32]>>> WriteAs<Offset<Union>> for UnionBuilder<(T0, T1)>
impl<T0: WriteAsDefault<UnionMode, UnionMode>, T1: WriteAsOptional<Offset<[i32]>>> WriteAsOffset<Union> for UnionBuilder<(T0, T1)>
impl<T0: WriteAsDefault<UnionMode, UnionMode>, T1: WriteAsOptional<Offset<[i32]>>> WriteAsOptional<Offset<Union>> for UnionBuilder<(T0, T1)>
Auto Trait Implementations§
impl<State> Freeze for UnionBuilder<State>where
State: Freeze,
impl<State> RefUnwindSafe for UnionBuilder<State>where
State: RefUnwindSafe,
impl<State> Send for UnionBuilder<State>where
State: Send,
impl<State> Sync for UnionBuilder<State>where
State: Sync,
impl<State> Unpin for UnionBuilder<State>where
State: Unpin,
impl<State> UnwindSafe for UnionBuilder<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