pub struct Variant {
pub tag: Tag,
pub name: &'static str,
pub kind: VariantKind,
pub payload: Product,
}Expand description
One variant of a sum type. Its payload is a single Product (possibly
with no fields for unit and newtype variants — see VariantKind for the
discriminator that distinguishes them).
Fields§
§tag: Tag§name: &'static str§kind: VariantKind§payload: ProductTrait Implementations§
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnwindSafe for Variant
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