pub struct UnlessClause {
pub condition: Expression,
pub result: Expression,
pub source_location: Option<Source>,
}Expand description
An unless clause that provides an alternative result
Unless clauses are evaluated in order, and the last matching condition wins. This matches natural language: “X unless A then Y, unless B then Z” - if both A and B are true, Z is returned (the last match).
Fields§
§condition: Expression§result: Expression§source_location: Option<Source>Trait Implementations§
Source§impl Clone for UnlessClause
impl Clone for UnlessClause
Source§fn clone(&self) -> UnlessClause
fn clone(&self) -> UnlessClause
Returns a duplicate 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 UnlessClause
impl Debug for UnlessClause
Source§impl PartialEq for UnlessClause
impl PartialEq for UnlessClause
Source§impl Serialize for UnlessClause
impl Serialize for UnlessClause
impl StructuralPartialEq for UnlessClause
Auto Trait Implementations§
impl Freeze for UnlessClause
impl RefUnwindSafe for UnlessClause
impl Send for UnlessClause
impl Sync for UnlessClause
impl Unpin for UnlessClause
impl UnwindSafe for UnlessClause
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