pub enum WhenExpr {
Literal(Value),
Ident {
ns: Namespace,
name: String,
},
Not(Box<WhenExpr>),
And(Box<WhenExpr>, Box<WhenExpr>),
Or(Box<WhenExpr>, Box<WhenExpr>),
Cmp {
left: Box<WhenExpr>,
op: CmpOp,
right: Box<WhenExpr>,
},
Matches {
left: Box<WhenExpr>,
pattern: Regex,
},
List(Vec<WhenExpr>),
}Variants§
Literal(Value)
Ident
Not(Box<WhenExpr>)
And(Box<WhenExpr>, Box<WhenExpr>)
Or(Box<WhenExpr>, Box<WhenExpr>)
Cmp
Matches
left matches <compiled regex> — RHS is compiled at parse time.
List(Vec<WhenExpr>)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WhenExpr
impl RefUnwindSafe for WhenExpr
impl Send for WhenExpr
impl Sync for WhenExpr
impl Unpin for WhenExpr
impl UnsafeUnpin for WhenExpr
impl UnwindSafe for WhenExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more