#[repr(C)]pub struct When {
pub patterns: Vec<Node>,
pub body: Option<Box<Node>>,
pub keyword_l: Loc,
pub begin_l: Loc,
pub expression_l: Loc,
}Expand description
Represents a branch of the case statement (i.e. when foo)
Fields§
§patterns: Vec<Node>A list of values to compare/match against
body: Option<Box<Node>>Body of the when branch
keyword_l: LocLocation of the when keyword
case foo; when bar; end
~~~~begin_l: LocLocation of the then keyword
case foo; when bar then baz; end
~~~~then is optional, and so begin_l can be None
expression_l: LocLocation of the full expression
case foo; when bar then baz; end
~~~~~~~~~~~~~~~~~Trait Implementations§
impl StructuralPartialEq for When
Auto Trait Implementations§
impl Freeze for When
impl RefUnwindSafe for When
impl Send for When
impl Sync for When
impl Unpin for When
impl UnwindSafe for When
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