pub struct Variant {
pub name: &'static str,
pub discriminant: Option<i64>,
pub kind: VariantKind,
}
Expand description
Describes a variant of an enum
Fields§
§name: &'static str
Name of the variant
discriminant: Option<i64>
Discriminant value (if available)
kind: VariantKind
Kind of variant (unit, tuple, or struct)
Trait Implementations§
impl Copy for Variant
impl Eq for Variant
impl StructuralPartialEq for Variant
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