pub struct VariantDecl<'a> {
pub docs: Vec<DocComment<'a>>,
pub id: Ident<'a>,
pub cases: Vec<VariantCase<'a>>,
}
Expand description
Represents a variant declaration in the AST.
Fields§
§docs: Vec<DocComment<'a>>
The doc comments for the variant.
id: Ident<'a>
The identifier of the variant.
cases: Vec<VariantCase<'a>>
The cases of the variant.
Trait Implementations§
Source§impl<'a> Clone for VariantDecl<'a>
impl<'a> Clone for VariantDecl<'a>
Source§fn clone(&self) -> VariantDecl<'a>
fn clone(&self) -> VariantDecl<'a>
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<'a> Debug for VariantDecl<'a>
impl<'a> Debug for VariantDecl<'a>
Auto Trait Implementations§
impl<'a> Freeze for VariantDecl<'a>
impl<'a> RefUnwindSafe for VariantDecl<'a>
impl<'a> Send for VariantDecl<'a>
impl<'a> Sync for VariantDecl<'a>
impl<'a> Unpin for VariantDecl<'a>
impl<'a> UnwindSafe for VariantDecl<'a>
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