pub enum GuardValue {
False,
True,
Error,
Random,
}Expand description
The value of a guard (sub-)expression (LRM 18.5.12).
Variants§
False
0: the sub-expression is false.
True
1: the sub-expression is true.
Error
E: the sub-expression causes an evaluation error.
Random
R: the sub-expression reads a random variable and cannot be
evaluated yet.
Implementations§
Source§impl GuardValue
impl GuardValue
Sourcepub fn and(self, other: GuardValue) -> GuardValue
pub fn and(self, other: GuardValue) -> GuardValue
Conjunction, Figure 18-3 (left table): FALSE dominates, then
ERROR, then RANDOM.
Sourcepub fn or(self, other: GuardValue) -> GuardValue
pub fn or(self, other: GuardValue) -> GuardValue
Disjunction, Figure 18-3 (middle table): TRUE dominates, then
ERROR, then RANDOM.
Sourcepub fn not(self) -> GuardValue
pub fn not(self) -> GuardValue
Negation, Figure 18-3 (right table): swaps TRUE and FALSE, keeps
ERROR and RANDOM.
Trait Implementations§
Source§impl Clone for GuardValue
impl Clone for GuardValue
impl Copy for GuardValue
Source§impl Debug for GuardValue
impl Debug for GuardValue
impl Eq for GuardValue
Source§impl PartialEq for GuardValue
impl PartialEq for GuardValue
impl StructuralPartialEq for GuardValue
Auto Trait Implementations§
impl Freeze for GuardValue
impl RefUnwindSafe for GuardValue
impl Send for GuardValue
impl Sync for GuardValue
impl Unpin for GuardValue
impl UnsafeUnpin for GuardValue
impl UnwindSafe for GuardValue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.