Enum selectors::kleene_value::KleeneValue
source · pub enum KleeneValue {
False = 0,
True = 1,
Unknown = 2,
}
Expand description
A “trilean” value based on Kleen logic.
Variants§
Implementations§
source§impl KleeneValue
impl KleeneValue
sourcepub fn to_bool(self, unknown: bool) -> bool
pub fn to_bool(self, unknown: bool) -> bool
Turns this Kleene value to a bool, taking the unknown value as an argument.
sourcepub fn any<T>(iter: impl Iterator<Item = T>, f: impl FnMut(T) -> Self) -> Self
pub fn any<T>(iter: impl Iterator<Item = T>, f: impl FnMut(T) -> Self) -> Self
Return true if any result of f() is true. Otherwise, return the strongest value seen.
Returns false if empty, like that of Iterator
.
sourcepub fn any_false<T>(
iter: impl Iterator<Item = T>,
f: impl FnMut(T) -> Self,
) -> Self
pub fn any_false<T>( iter: impl Iterator<Item = T>, f: impl FnMut(T) -> Self, ) -> Self
Return false if any results of f() is false. Otherwise, return the strongest value seen.
Returns true if empty, opposite of Iterator
.
fn any_value<T>( iter: impl Iterator<Item = T>, value: Self, on_empty: Self, f: impl FnMut(T) -> Self, ) -> Self
Trait Implementations§
source§impl BitAnd for KleeneValue
impl BitAnd for KleeneValue
source§impl BitAndAssign for KleeneValue
impl BitAndAssign for KleeneValue
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&=
operation. Read moresource§impl BitOr for KleeneValue
impl BitOr for KleeneValue
source§impl BitOrAssign for KleeneValue
impl BitOrAssign for KleeneValue
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|=
operation. Read moresource§impl Clone for KleeneValue
impl Clone for KleeneValue
source§fn clone(&self) -> KleeneValue
fn clone(&self) -> KleeneValue
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 KleeneValue
impl Debug for KleeneValue
source§impl From<SelectorMatchingResult> for KleeneValue
impl From<SelectorMatchingResult> for KleeneValue
source§fn from(value: SelectorMatchingResult) -> Self
fn from(value: SelectorMatchingResult) -> Self
Converts to this type from the input type.
source§impl From<bool> for KleeneValue
impl From<bool> for KleeneValue
source§impl Not for KleeneValue
impl Not for KleeneValue
source§impl PartialEq for KleeneValue
impl PartialEq for KleeneValue
impl Copy for KleeneValue
impl Eq for KleeneValue
impl StructuralPartialEq for KleeneValue
Auto Trait Implementations§
impl Freeze for KleeneValue
impl RefUnwindSafe for KleeneValue
impl Send for KleeneValue
impl Sync for KleeneValue
impl Unpin for KleeneValue
impl UnwindSafe for KleeneValue
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)