pub struct VariantDef {
pub name: String,
pub rename: Option<String>,
pub kind: VariantKind,
pub doc: Option<String>,
}Expand description
A single enum variant.
Fields§
§name: StringThe variant name
rename: Option<String>Renamed variant name
kind: VariantKindThe kind of data this variant carries
doc: Option<String>Documentation comment
Trait Implementations§
Source§impl Clone for VariantDef
impl Clone for VariantDef
Source§fn clone(&self) -> VariantDef
fn clone(&self) -> VariantDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VariantDef
impl Debug for VariantDef
Source§impl PartialEq for VariantDef
impl PartialEq for VariantDef
Source§fn eq(&self, other: &VariantDef) -> bool
fn eq(&self, other: &VariantDef) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VariantDef
Auto Trait Implementations§
impl Freeze for VariantDef
impl RefUnwindSafe for VariantDef
impl Send for VariantDef
impl Sync for VariantDef
impl Unpin for VariantDef
impl UnsafeUnpin for VariantDef
impl UnwindSafe for VariantDef
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