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