Struct valkyrie_ast::MatchStatement
source · pub struct MatchStatement {
pub kind: MatchKind,
pub bind: Option<IdentifierNode>,
pub main: ExpressionKind,
pub patterns: PatternsList,
pub span: Range<u32>,
}Expand description
.match { when Some(a): a, else: 0}.catch { when IoError: (a), else: 0}
Fields§
§kind: MatchKindThe kind of the match statement
bind: Option<IdentifierNode>match bind := expr { ... }
main: ExpressionKindmatch expr { ... }
patterns: PatternsListThe patterns of the match statement
span: Range<u32>The range of the node
Trait Implementations§
source§impl Clone for MatchStatement
impl Clone for MatchStatement
source§fn clone(&self) -> MatchStatement
fn clone(&self) -> MatchStatement
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 MatchStatement
impl Debug for MatchStatement
source§impl From<MatchStatement> for ExpressionKind
impl From<MatchStatement> for ExpressionKind
source§fn from(o: MatchStatement) -> Self
fn from(o: MatchStatement) -> Self
Converts to this type from the input type.
source§impl Hash for MatchStatement
impl Hash for MatchStatement
source§impl PartialEq for MatchStatement
impl PartialEq for MatchStatement
source§fn eq(&self, other: &MatchStatement) -> bool
fn eq(&self, other: &MatchStatement) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl ValkyrieNode for MatchStatement
impl ValkyrieNode for MatchStatement
impl Eq for MatchStatement
impl StructuralPartialEq for MatchStatement
Auto Trait Implementations§
impl RefUnwindSafe for MatchStatement
impl Send for MatchStatement
impl Sync for MatchStatement
impl Unpin for MatchStatement
impl UnwindSafe for MatchStatement
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