Struct valkyrie_ast::FlagDeclaration
source · pub struct FlagDeclaration {
pub kind: FlagKind,
pub annotations: AnnotationNode,
pub name: IdentifierNode,
pub layout: Option<ExpressionKind>,
pub implements: Option<ExpressionKind>,
pub body: Vec<FlagTerm>,
pub span: Range<u32>,
}Expand description
a number that encodes special semantics
enumerate Bit(8bits): Trait { FlagA, FlagB }
flags Bit(8bits): Trait { FlagA, FlagB }
Fields§
§kind: FlagKindThe kind of the flag statement
annotations: AnnotationNodeThe annotations of this flag.
name: IdentifierNodeThe name of the flag.
layout: Option<ExpressionKind>flags Flag(8bits)
implements: Option<ExpressionKind>flags Flag: Trait
body: Vec<FlagTerm>flags Flag { FlagA, FlagB }
span: Range<u32>The range of the node.
Trait Implementations§
source§impl Clone for FlagDeclaration
impl Clone for FlagDeclaration
source§fn clone(&self) -> FlagDeclaration
fn clone(&self) -> FlagDeclaration
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 FlagDeclaration
impl Debug for FlagDeclaration
source§impl From<FlagDeclaration> for StatementKind
impl From<FlagDeclaration> for StatementKind
source§fn from(o: FlagDeclaration) -> Self
fn from(o: FlagDeclaration) -> Self
Converts to this type from the input type.
source§impl Hash for FlagDeclaration
impl Hash for FlagDeclaration
source§impl<'i> IntoIterator for &'i FlagDeclaration
impl<'i> IntoIterator for &'i FlagDeclaration
source§impl PartialEq for FlagDeclaration
impl PartialEq for FlagDeclaration
source§fn eq(&self, other: &FlagDeclaration) -> bool
fn eq(&self, other: &FlagDeclaration) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for FlagDeclaration
impl StructuralPartialEq for FlagDeclaration
Auto Trait Implementations§
impl RefUnwindSafe for FlagDeclaration
impl Send for FlagDeclaration
impl Sync for FlagDeclaration
impl Unpin for FlagDeclaration
impl UnwindSafe for FlagDeclaration
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