pub struct Case {
pub constructor: Ident,
pub bindings: Vec<CaseBinding>,
pub value: Box<Expr>,
pub ignore_rest: Option<Range>,
}
Expand description
A match case with a constructor that will match the strutinizer, bindings to the names of each arguments and a right-hand side value. The ignore_rest flag useful to just fill all of the case bindings that are not used with a default name.
Fields§
§constructor: Ident
§bindings: Vec<CaseBinding>
§value: Box<Expr>
§ignore_rest: Option<Range>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Case
impl RefUnwindSafe for Case
impl Send for Case
impl Sync for Case
impl Unpin for Case
impl UnwindSafe for Case
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