Enum banyan_utils::tag_index::Expression [−][src]
a boolean expression, consisting of literals, union and intersection.
no attempt of simplification is made, except flattening identical operators.
And([And([a,b]),c])
will be flattened to And([a,b,c])
.
Variants
Literal(SmolStr)
And(Vec<Expression>)
Or(Vec<Expression>)
Implementations
impl Expression
[src]
pub fn literal(text: SmolStr) -> Self
[src]
pub fn or(e: Vec<Expression>) -> Self
[src]
pub fn and(e: Vec<Expression>) -> Self
[src]
pub fn simplify(&self) -> Self
[src]
pub fn dnf(self) -> Dnf
[src]
convert the expression into disjunctive normal form
careful, for some expressions this can have exponential runtime. E.g. the disjunctive normal form
of (a | b) & (c | d) & (e | f) & ...
will be very complex.
Trait Implementations
impl BitAnd<Expression> for Expression
[src]
type Output = Expression
The resulting type after applying the &
operator.
fn bitand(self, that: Self) -> Self
[src]
impl BitOr<Expression> for Expression
[src]
type Output = Expression
The resulting type after applying the |
operator.
fn bitor(self, that: Self) -> Self
[src]
impl Clone for Expression
[src]
fn clone(&self) -> Expression
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Expression
[src]
impl Display for Expression
[src]
prints the expression with a minimum of brackets
impl Eq for Expression
[src]
impl From<Dnf> for Expression
[src]
impl From<Expression> for Dnf
[src]
fn from(value: Expression) -> Self
[src]
impl Ord for Expression
[src]
fn cmp(&self, other: &Expression) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Expression> for Expression
[src]
fn eq(&self, other: &Expression) -> bool
[src]
fn ne(&self, other: &Expression) -> bool
[src]
impl PartialOrd<Expression> for Expression
[src]
fn partial_cmp(&self, other: &Expression) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Expression
[src]
impl StructuralPartialEq for Expression
[src]
Auto Trait Implementations
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> References<RawCodec> for T
pub fn references<R, E>(
_c: RawCodec,
_r: &mut R,
_set: &mut E
) -> Result<(), Error> where
R: Read,
E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
_c: RawCodec,
_r: &mut R,
_set: &mut E
) -> Result<(), Error> where
R: Read,
E: Extend<Cid<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,