pub enum GuardKind {
LessThan,
LessEqual,
GreaterThan,
GreaterEqual,
LetSome,
LetOk,
IsSome,
IsOk,
NonEmpty,
}Expand description
Kind of guard condition.
Variants§
LessThan
left < right (e.g., i < arr.len())
LessEqual
left <= right
GreaterThan
left > right
GreaterEqual
left >= right
LetSome
if let Some(x) = expr
LetOk
if let Ok(x) = expr
IsSome
expr.is_some()
IsOk
expr.is_ok()
NonEmpty
Non-empty check (e.g., !v.is_empty())
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GuardKind
impl<'de> Deserialize<'de> for GuardKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for GuardKind
impl Eq for GuardKind
impl StructuralPartialEq for GuardKind
Auto Trait Implementations§
impl Freeze for GuardKind
impl RefUnwindSafe for GuardKind
impl Send for GuardKind
impl Sync for GuardKind
impl Unpin for GuardKind
impl UnsafeUnpin for GuardKind
impl UnwindSafe for GuardKind
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