Struct muse_lang::compiler::syntax::MatchPattern
source · pub struct MatchPattern {
pub pattern: Ranged<Pattern>,
pub arrow: Ranged<Token>,
pub body: Ranged<Expression>,
}Expand description
The syntax components of a pattern match in a match expression.
Fields§
§pattern: Ranged<Pattern>The pattern to match against.
arrow: Ranged<Token>The arrow between the pattern and body.
body: Ranged<Expression>The body to execute if the pattern matches.
Trait Implementations§
source§impl Clone for MatchPattern
impl Clone for MatchPattern
source§fn clone(&self) -> MatchPattern
fn clone(&self) -> MatchPattern
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 MatchPattern
impl Debug for MatchPattern
source§impl PartialEq for MatchPattern
impl PartialEq for MatchPattern
source§impl TokenizeInto for MatchPattern
impl TokenizeInto for MatchPattern
impl StructuralPartialEq for MatchPattern
Auto Trait Implementations§
impl Freeze for MatchPattern
impl RefUnwindSafe for MatchPattern
impl Send for MatchPattern
impl Sync for MatchPattern
impl Unpin for MatchPattern
impl UnwindSafe for MatchPattern
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
§impl<A> Cast for A
impl<A> Cast for A
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> TokenizeRanged for Twhere
T: TokenizeInto,
impl<T> TokenizeRanged for Twhere
T: TokenizeInto,
source§fn tokenize_ranged(
&self,
_range: SourceRange,
tokens: &mut VecDeque<Ranged<Token>>,
)
fn tokenize_ranged( &self, _range: SourceRange, tokens: &mut VecDeque<Ranged<Token>>, )
Tokenize
self into tokens within the enclosing range.