Enum valkyrie_ast::GuardPattern
source · pub enum GuardPattern {
Expression(ExpressionNode),
List(ElseStatement),
Dict(ElseStatement),
}
Expand description
guard <CONDITION> then { ... } else { ... }
Variants§
Expression(ExpressionNode)
Same as if condition
List(ElseStatement)
Same as if !condition
Dict(ElseStatement)
Same as if !condition
Trait Implementations§
source§impl Clone for GuardPattern
impl Clone for GuardPattern
source§fn clone(&self) -> GuardPattern
fn clone(&self) -> GuardPattern
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 GuardPattern
impl Debug for GuardPattern
source§impl Hash for GuardPattern
impl Hash for GuardPattern
source§impl PartialEq for GuardPattern
impl PartialEq for GuardPattern
source§fn eq(&self, other: &GuardPattern) -> bool
fn eq(&self, other: &GuardPattern) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for GuardPattern
impl StructuralPartialEq for GuardPattern
Auto Trait Implementations§
impl RefUnwindSafe for GuardPattern
impl Send for GuardPattern
impl Sync for GuardPattern
impl Unpin for GuardPattern
impl UnwindSafe for GuardPattern
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