pub enum Literal {
Int(i32),
Bool(bool),
AbstractLiteral(AbstractLiteral<Literal>),
}
Expand description
A literal value, equivalent to constants in Conjure.
Variants§
Trait Implementations§
Source§impl Biplate<AbstractLiteral<Expression>> for Literal
impl Biplate<AbstractLiteral<Expression>> for Literal
Source§fn biplate(
&self,
) -> (Tree<AbstractLiteral<Expression>>, Box<dyn Fn(Tree<AbstractLiteral<Expression>>) -> Literal>)
fn biplate( &self, ) -> (Tree<AbstractLiteral<Expression>>, Box<dyn Fn(Tree<AbstractLiteral<Expression>>) -> Literal>)
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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. Read more
Source§impl Biplate<AbstractLiteral<Literal>> for Literal
impl Biplate<AbstractLiteral<Literal>> for Literal
Source§fn biplate(
&self,
) -> (Tree<AbstractLiteral<Literal>>, Box<dyn Fn(Tree<AbstractLiteral<Literal>>) -> Literal>)
fn biplate( &self, ) -> (Tree<AbstractLiteral<Literal>>, Box<dyn Fn(Tree<AbstractLiteral<Literal>>) -> Literal>)
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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. Read more
Source§impl Biplate<Atom> for Literal
impl Biplate<Atom> for Literal
Source§fn biplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Literal>)
fn biplate(&self) -> (Tree<Atom>, Box<dyn Fn(Tree<Atom>) -> Literal>)
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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. Read more
Source§impl Biplate<Expression> for Literal
impl Biplate<Expression> for Literal
Source§fn biplate(
&self,
) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Literal>)
fn biplate( &self, ) -> (Tree<Expression>, Box<dyn Fn(Tree<Expression>) -> Literal>)
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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. 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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. Read more
Source§impl Biplate<Literal> for Expression
impl Biplate<Literal> for Expression
Source§fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Expression>)
fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> 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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. Read more
Source§impl Biplate<Literal> for Literal
impl Biplate<Literal> for Literal
Source§fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Literal>)
fn biplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Literal>)
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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. Read more
Source§impl Biplate<RecordValue<Expression>> for Literal
impl Biplate<RecordValue<Expression>> for Literal
Source§fn biplate(
&self,
) -> (Tree<RecordValue<Expression>>, Box<dyn Fn(Tree<RecordValue<Expression>>) -> Literal>)
fn biplate( &self, ) -> (Tree<RecordValue<Expression>>, Box<dyn Fn(Tree<RecordValue<Expression>>) -> Literal>)
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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. Read more
Source§impl Biplate<RecordValue<Literal>> for Literal
impl Biplate<RecordValue<Literal>> for Literal
Source§fn biplate(
&self,
) -> (Tree<RecordValue<Literal>>, Box<dyn Fn(Tree<RecordValue<Literal>>) -> Literal>)
fn biplate( &self, ) -> (Tree<RecordValue<Literal>>, Box<dyn Fn(Tree<RecordValue<Literal>>) -> Literal>)
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: &impl Fn(To) -> To) -> Self
fn descend_bi(&self, op: &impl 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: &impl Fn(To) -> To) -> Self
fn transform_bi(&self, op: &impl Fn(To) -> To) -> Self
Applies the given function to all nodes bottom up. Read more
§fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn holes_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over all direct children of the input, paired with a function that
“fills the hole” where the child was with a new value. Read more
§fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
fn contexts_bi(&self) -> impl Iterator<Item = (To, impl Fn(To))>
Returns an iterator over the universe of the input, paired with a function that “fills the
hole” where the child was with a new value. Read more
Source§impl<'de> Deserialize<'de> for Literal
impl<'de> Deserialize<'de> for Literal
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 Uniplate for Literal
impl Uniplate for Literal
Source§fn uniplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Literal>)
fn uniplate(&self) -> (Tree<Literal>, Box<dyn Fn(Tree<Literal>) -> Literal>)
Definition of a
Uniplate
. Read more§fn descend(&self, op: &impl Fn(Self) -> Self) -> Self
fn descend(&self, op: &impl 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: &impl Fn(Self) -> Self) -> Self
fn transform(&self, f: &impl Fn(Self) -> Self) -> Self
Applies the given function to all nodes bottom up.
§fn rewrite(&self, f: &impl Fn(Self) -> Option<Self>) -> Self
fn rewrite(&self, f: &impl Fn(Self) -> Option<Self>) -> Self
Rewrites by applying a rule everywhere it can.
§fn cata<T>(&self, op: &impl Fn(Self, VecDeque<T>) -> T) -> T
fn cata<T>(&self, op: &impl Fn(Self, VecDeque<T>) -> T) -> T
Performs a fold-like computation on each value. Read more
impl Eq for Literal
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl Freeze for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
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<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 moreSource§impl<T> Typeable for Twhere
T: HasDomain,
impl<T> Typeable for Twhere
T: HasDomain,
fn return_type(&self) -> Option<ReturnType>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Int
: 12 bytesBool
: 9 bytesAbstractLiteral
: 32 bytes