pub struct EnumVariant {
pub name: String,
pub doc_comment: Option<String>,
pub fields: Vec<FieldInfo>,
pub discriminant: Option<String>,
}Expand description
Represents a single variant of an enum.
Fields§
§name: StringThe name of the variant.
doc_comment: Option<String>Documentation comment for the variant.
fields: Vec<FieldInfo>Fields of the variant (for tuple or struct variants).
discriminant: Option<String>Discriminant value if specified (e.g., Variant = 5).
Trait Implementations§
Source§impl Clone for EnumVariant
impl Clone for EnumVariant
Source§fn clone(&self) -> EnumVariant
fn clone(&self) -> EnumVariant
Returns a duplicate of the value. Read more
1.0.0 · 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 EnumVariant
impl Debug for EnumVariant
Source§impl<'de> Deserialize<'de> for EnumVariant
impl<'de> Deserialize<'de> for EnumVariant
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EnumVariant
impl RefUnwindSafe for EnumVariant
impl Send for EnumVariant
impl Sync for EnumVariant
impl Unpin for EnumVariant
impl UnwindSafe for EnumVariant
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