pub enum Factor {
Literal(Literal),
Reference(Name),
}
Expand description
A Factor
is an indivisible expression, such as a literal or a reference.
Variants§
Trait Implementations§
Source§impl Biplate<Expression> for Factor
impl Biplate<Expression> for Factor
Source§fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Factor>)
fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Factor>)
Returns all the top most children of type to within from. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Like descend but with more general types. Read more
fn universe_bi(&self) -> Vector<To>
§fn children_bi(&self) -> Vector<To>
fn children_bi(&self) -> Vector<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children).
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Source§impl Biplate<Factor> for Expression
impl Biplate<Factor> for Expression
Source§fn biplate(&self) -> (Tree<Factor>, Box<dyn Fn(Tree<Factor>) -> Expression>)
fn biplate(&self) -> (Tree<Factor>, Box<dyn Fn(Tree<Factor>) -> Expression>)
Returns all the top most children of type to within from. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Like descend but with more general types. Read more
fn universe_bi(&self) -> Vector<To>
§fn children_bi(&self) -> Vector<To>
fn children_bi(&self) -> Vector<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children).
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Source§impl Biplate<Factor> for Factor
impl Biplate<Factor> for Factor
Source§fn biplate(&self) -> (Tree<Factor>, Box<dyn Fn(Tree<Factor>) -> Factor>)
fn biplate(&self) -> (Tree<Factor>, Box<dyn Fn(Tree<Factor>) -> Factor>)
Returns all the top most children of type to within from. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Like descend but with more general types. Read more
fn universe_bi(&self) -> Vector<To>
§fn children_bi(&self) -> Vector<To>
fn children_bi(&self) -> Vector<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children).
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Source§impl Biplate<Literal> for Factor
impl Biplate<Literal> for Factor
Source§fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Factor>)
fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Factor>)
Returns all the top most children of type to within from. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Like descend but with more general types. Read more
fn universe_bi(&self) -> Vector<To>
§fn children_bi(&self) -> Vector<To>
fn children_bi(&self) -> Vector<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children).
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Source§impl Biplate<Metadata> for Factor
impl Biplate<Metadata> for Factor
Source§fn biplate(&self) -> (Tree<Metadata>, Box<dyn Fn(Tree<Metadata>) -> Factor>)
fn biplate(&self) -> (Tree<Metadata>, Box<dyn Fn(Tree<Metadata>) -> Factor>)
Returns all the top most children of type to within from. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Like descend but with more general types. Read more
fn universe_bi(&self) -> Vector<To>
§fn children_bi(&self) -> Vector<To>
fn children_bi(&self) -> Vector<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children).
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Source§impl Biplate<Name> for Factor
impl Biplate<Name> for Factor
Source§fn biplate(&self) -> (Tree<Name>, Box<dyn Fn(Tree<Name>) -> Factor>)
fn biplate(&self) -> (Tree<Name>, Box<dyn Fn(Tree<Name>) -> Factor>)
Returns all the top most children of type to within from. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Like descend but with more general types. Read more
fn universe_bi(&self) -> Vector<To>
§fn children_bi(&self) -> Vector<To>
fn children_bi(&self) -> Vector<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children).
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Source§impl<'de> Deserialize<'de> for Factor
impl<'de> Deserialize<'de> for Factor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Factor> for Expression
impl From<Factor> for Expression
Source§impl Uniplate for Factor
impl Uniplate for Factor
fn uniplate(&self) -> (Tree<Factor>, Box<dyn Fn(Tree<Factor>) -> Factor>)
fn descend(&self, op: Arc<dyn Fn(Self) -> Self>) -> Self
§fn with_children(&self, children: Vector<Self>) -> Self
fn with_children(&self, children: Vector<Self>) -> Self
Reconstructs the node with the given children. Read more
§fn transform(&self, f: Arc<dyn Fn(Self) -> Self>) -> Self
fn transform(&self, f: Arc<dyn Fn(Self) -> Self>) -> Self
Applies the given rule to all nodes bottom up.
impl Eq for Factor
impl StructuralPartialEq for Factor
Auto Trait Implementations§
impl Freeze for Factor
impl RefUnwindSafe for Factor
impl Send for Factor
impl Sync for Factor
impl Unpin for Factor
impl UnwindSafe for Factor
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
)§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