pub struct VariantBuilder { /* private fields */ }
Expand description
Builder for Variant
Implementations§
Source§impl VariantBuilder
impl VariantBuilder
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) -> Self
pub const fn data(self, data: StructType) -> Self
Sets the fields for the Variant
Auto Trait Implementations§
impl Freeze for VariantBuilder
impl RefUnwindSafe for VariantBuilder
impl Send for VariantBuilder
impl Sync for VariantBuilder
impl Unpin for VariantBuilder
impl UnwindSafe for VariantBuilder
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