Struct valkyrie_ast::VariantDeclaration
source · pub struct VariantDeclaration {
pub name: IdentifierNode,
pub annotations: AnnotationNode,
pub body: Vec<ClassTerm>,
pub span: Range<u32>,
}Expand description
Variant { }
Fields§
§name: IdentifierNodeThe name of variants
annotations: AnnotationNodeThe annotations of the variant declaration.
body: Vec<ClassTerm>The main body of the variant
span: Range<u32>The range of the node
Trait Implementations§
source§impl Clone for VariantDeclaration
impl Clone for VariantDeclaration
source§fn clone(&self) -> VariantDeclaration
fn clone(&self) -> VariantDeclaration
Returns a copy 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 VariantDeclaration
impl Debug for VariantDeclaration
source§impl From<VariantDeclaration> for UnionTerm
impl From<VariantDeclaration> for UnionTerm
source§fn from(o: VariantDeclaration) -> Self
fn from(o: VariantDeclaration) -> Self
Converts to this type from the input type.
source§impl Hash for VariantDeclaration
impl Hash for VariantDeclaration
source§impl PartialEq for VariantDeclaration
impl PartialEq for VariantDeclaration
source§fn eq(&self, other: &VariantDeclaration) -> bool
fn eq(&self, other: &VariantDeclaration) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for VariantDeclaration
impl StructuralPartialEq for VariantDeclaration
Auto Trait Implementations§
impl RefUnwindSafe for VariantDeclaration
impl Send for VariantDeclaration
impl Sync for VariantDeclaration
impl Unpin for VariantDeclaration
impl UnwindSafe for VariantDeclaration
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