struct Simplifier<'a, S> {
info: &'a S,
}Expand description
Simplifies Exprs by applying algebraic transformation rules
Example transformations that are applied:
expr = trueandexpr != falsetoexprwhenexpris of boolean typeexpr = falseandexpr != trueto!exprwhenexpris of boolean typetrue = trueandfalse = falsetotruefalse = trueandtrue = falsetofalse!!exprtoexprexpr = nullandexpr != nulltonull
Fields§
§info: &'a SImplementations§
Trait Implementations§
Source§impl<S: SimplifyInfo> TreeNodeRewriter for Simplifier<'_, S>
impl<S: SimplifyInfo> TreeNodeRewriter for Simplifier<'_, S>
Auto Trait Implementations§
impl<'a, S> Freeze for Simplifier<'a, S>
impl<'a, S> RefUnwindSafe for Simplifier<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for Simplifier<'a, S>where
S: Sync,
impl<'a, S> Sync for Simplifier<'a, S>where
S: Sync,
impl<'a, S> Unpin for Simplifier<'a, S>
impl<'a, S> UnwindSafe for Simplifier<'a, S>where
S: RefUnwindSafe,
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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