pub struct VariantBuilder<'shape> { /* private fields */ }Expand description
Builder for Variant
Implementations§
Source§impl<'shape> VariantBuilder<'shape>
impl<'shape> VariantBuilder<'shape>
Sourcepub const fn discriminant(self, discriminant: i64) -> Self
pub const fn discriminant(self, discriminant: i64) -> Self
Sets the discriminant for the Variant
Sourcepub const fn attributes(
self,
attributes: &'static [VariantAttribute<'_>],
) -> Self
pub const fn attributes( self, attributes: &'static [VariantAttribute<'_>], ) -> Self
Sets the attributes for the variant
Sourcepub const fn data(self, data: StructType<'shape>) -> Self
pub const fn data(self, data: StructType<'shape>) -> Self
Sets the fields for the Variant
Auto Trait Implementations§
impl<'shape> Freeze for VariantBuilder<'shape>
impl<'shape> RefUnwindSafe for VariantBuilder<'shape>
impl<'shape> Send for VariantBuilder<'shape>
impl<'shape> Sync for VariantBuilder<'shape>
impl<'shape> Unpin for VariantBuilder<'shape>
impl<'shape> UnwindSafe for VariantBuilder<'shape>
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