Struct valkyrie_ast::UnionDeclaration
source · pub struct UnionDeclaration {
pub annotations: AnnotationNode,
pub name: IdentifierNode,
pub inherits: Vec<ExpressionKind>,
pub implements: Option<ExpressionKind>,
pub body: Vec<UnionTerm>,
pub span: Range<u32>,
}Expand description
union Name(Super): Trait {}
Fields§
§annotations: AnnotationNodeThe annotations of this union
name: IdentifierNodeThe range of the number.
inherits: Vec<ExpressionKind>union A(Union), the super unions
implements: Option<ExpressionKind>union A: Debug { }, the trait bounds
body: Vec<UnionTerm>The variants of this union
span: Range<u32>The text range of the statement
Trait Implementations§
source§impl Clone for UnionDeclaration
impl Clone for UnionDeclaration
source§fn clone(&self) -> UnionDeclaration
fn clone(&self) -> UnionDeclaration
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 UnionDeclaration
impl Debug for UnionDeclaration
source§impl From<UnionDeclaration> for StatementKind
impl From<UnionDeclaration> for StatementKind
source§fn from(o: UnionDeclaration) -> Self
fn from(o: UnionDeclaration) -> Self
Converts to this type from the input type.
source§impl Hash for UnionDeclaration
impl Hash for UnionDeclaration
source§impl<'a> IntoIterator for &'a UnionDeclaration
impl<'a> IntoIterator for &'a UnionDeclaration
source§impl PartialEq for UnionDeclaration
impl PartialEq for UnionDeclaration
source§fn eq(&self, other: &UnionDeclaration) -> bool
fn eq(&self, other: &UnionDeclaration) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for UnionDeclaration
impl StructuralPartialEq for UnionDeclaration
Auto Trait Implementations§
impl RefUnwindSafe for UnionDeclaration
impl Send for UnionDeclaration
impl Sync for UnionDeclaration
impl Unpin for UnionDeclaration
impl UnwindSafe for UnionDeclaration
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