pub enum LetMode {
Plain,
Assert,
Else {
block: Box<Expression>,
else_span: Span,
},
InvalidAssertElse {
block: Box<Expression>,
else_span: Span,
},
}Variants§
Plain
Assert
Else
InvalidAssertElse
Parser recovery for the invalid combination let assert ... else ....
Implementations§
Source§impl LetMode
impl LetMode
pub fn is_assert(&self) -> bool
pub fn else_block(&self) -> Option<&Expression>
pub fn else_block_mut(&mut self) -> Option<&mut Expression>
pub fn map_else(self, map: impl FnOnce(Expression, Span) -> Expression) -> Self
Trait Implementations§
impl StructuralPartialEq for LetMode
Auto Trait Implementations§
impl Forget for LetMode
impl Freeze for LetMode
impl Move for LetMode
impl RefUnwindSafe for LetMode
impl Send for LetMode
impl Sync for LetMode
impl Unpin for LetMode
impl UnsafeUnpin for LetMode
impl UnwindSafe for LetMode
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