#[repr(C)]pub struct InPattern {
pub pattern: Box<Node>,
pub guard: Option<Box<Node>>,
pub body: Option<Box<Node>>,
pub keyword_l: Loc,
pub begin_l: Loc,
pub expression_l: Loc,
}Expand description
Represents an in pattern branch of the pattern matching
Fields§
§pattern: Box<Node>Value that is used for matching
guard: Option<Box<Node>>Guard that is used for matching
Optional, so can be None
body: Option<Box<Node>>Body of the branch that is invoked if value matches pattern
keyword_l: LocLocation of the in keyword
case value; in pattern; end
~~begin_l: LocLocation of the then keyword
case value; in pattern then; end
~~~~expression_l: LocLocation of the full expression
case value; in pattern then; 42; end
~~~~~~~~~~~~~~~~~~~Trait Implementations§
impl StructuralPartialEq for InPattern
Auto Trait Implementations§
impl Freeze for InPattern
impl RefUnwindSafe for InPattern
impl Send for InPattern
impl Sync for InPattern
impl Unpin for InPattern
impl UnwindSafe for InPattern
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