pub enum Atom {
Literal(Literal),
Reference(Name),
}
Expand description
An Atom
is an indivisible expression, such as a literal or a reference.
Variants§
Trait Implementations§
Source§impl Biplate<Atom> for Atom
impl Biplate<Atom> for Atom
Source§fn biplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Atom>)
fn biplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Atom>)
Definition of a Biplate. Read more
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
Reconstructs the node with the given children. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Biplate variant of [
Uniplate::descend
] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
Gets all children of a node, including itself and all children. Read more
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
§fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Applies the given function to all nodes bottom up. Read more
Source§impl Biplate<Atom> for Expression
impl Biplate<Atom> for Expression
Source§fn biplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Expression>)
fn biplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Expression>)
Definition of a Biplate. Read more
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
Reconstructs the node with the given children. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Biplate variant of [
Uniplate::descend
] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
Gets all children of a node, including itself and all children. Read more
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
§fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Applies the given function to all nodes bottom up. Read more
Source§impl Biplate<Expression> for Atom
impl Biplate<Expression> for Atom
Source§fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Atom>)
fn biplate(&self) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Atom>)
Definition of a Biplate. Read more
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
Reconstructs the node with the given children. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Biplate variant of [
Uniplate::descend
] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
Gets all children of a node, including itself and all children. Read more
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
§fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Applies the given function to all nodes bottom up. Read more
Source§impl Biplate<Literal> for Atom
impl Biplate<Literal> for Atom
Source§fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Atom>)
fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Atom>)
Definition of a Biplate. Read more
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
Reconstructs the node with the given children. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Biplate variant of [
Uniplate::descend
] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
Gets all children of a node, including itself and all children. Read more
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
§fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Applies the given function to all nodes bottom up. Read more
Source§impl Biplate<Metadata> for Atom
impl Biplate<Metadata> for Atom
Source§fn biplate(&self) -> (Tree<Metadata>, Box<dyn Fn(Tree<Metadata>) -> Atom>)
fn biplate(&self) -> (Tree<Metadata>, Box<dyn Fn(Tree<Metadata>) -> Atom>)
Definition of a Biplate. Read more
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
Reconstructs the node with the given children. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Biplate variant of [
Uniplate::descend
] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
Gets all children of a node, including itself and all children. Read more
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
§fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Applies the given function to all nodes bottom up. Read more
Source§impl Biplate<Name> for Atom
impl Biplate<Name> for Atom
Source§fn biplate(&self) -> (Tree<Name>, Box<dyn Fn(Tree<Name>) -> Atom>)
fn biplate(&self) -> (Tree<Name>, Box<dyn Fn(Tree<Name>) -> Atom>)
Definition of a Biplate. Read more
§fn with_children_bi(&self, children: VecDeque<To>) -> Self
fn with_children_bi(&self, children: VecDeque<To>) -> Self
Reconstructs the node with the given children. Read more
§fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn descend_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Biplate variant of [
Uniplate::descend
] Read more§fn universe_bi(&self) -> VecDeque<To>
fn universe_bi(&self) -> VecDeque<To>
Gets all children of a node, including itself and all children. Read more
§fn children_bi(&self) -> VecDeque<To>
fn children_bi(&self) -> VecDeque<To>
Returns the children of a type. If to == from then it returns the original element (in contrast to children). Read more
§fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
fn transform_bi(&self, op: Arc<dyn Fn(To) -> To>) -> Self
Applies the given function to all nodes bottom up. Read more
Source§impl<'de> Deserialize<'de> for Atom
impl<'de> Deserialize<'de> for Atom
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<Atom> for Expression
impl From<Atom> for Expression
Source§impl<'a> TryFrom<&'a Expression> for &'a Atom
impl<'a> TryFrom<&'a Expression> for &'a Atom
Source§impl TryFrom<Expression> for Atom
impl TryFrom<Expression> for Atom
Source§impl Uniplate for Atom
impl Uniplate for Atom
Source§fn uniplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Atom>)
fn uniplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Atom>)
Definition of a
Uniplate
. Read more§fn descend(&self, op: Arc<dyn Fn(Self) -> Self>) -> Self
fn descend(&self, op: Arc<dyn Fn(Self) -> Self>) -> Self
Applies a function to all direct children of this Read more
§fn universe(&self) -> VecDeque<Self>
fn universe(&self) -> VecDeque<Self>
Gets all children of a node, including itself and all children. Read more
§fn with_children(&self, children: VecDeque<Self>) -> Self
fn with_children(&self, children: VecDeque<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 function to all nodes bottom up.
§fn rewrite(&self, f: Arc<dyn Fn(Self) -> Option<Self>>) -> Self
fn rewrite(&self, f: Arc<dyn Fn(Self) -> Option<Self>>) -> Self
Rewrites by applying a rule everywhere it can.
§fn cata<T>(&self, op: Arc<dyn Fn(Self, VecDeque<T>) -> T>) -> T
fn cata<T>(&self, op: Arc<dyn Fn(Self, VecDeque<T>) -> T>) -> T
Performs a fold-like computation on each value. Read more
impl Eq for Atom
impl StructuralPartialEq for Atom
Auto Trait Implementations§
impl Freeze for Atom
impl RefUnwindSafe for Atom
impl Send for Atom
impl Sync for Atom
impl Unpin for Atom
impl UnwindSafe for Atom
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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