Enum leo_ast::expressions::Literal
source · pub enum Literal {
Address(String, Span, NodeID),
Boolean(bool, Span, NodeID),
Field(String, Span, NodeID),
Group(Box<GroupLiteral>),
Integer(IntegerType, String, Span, NodeID),
Scalar(String, Span, NodeID),
String(String, Span, NodeID),
}
Expand description
A literal.
Variants§
Address(String, Span, NodeID)
An address literal, e.g., aleo1qnr4dkkvkgfqph0vzc3y6z2eu975wnpz2925ntjccd5cfqxtyu8s7pyjh9
.
Boolean(bool, Span, NodeID)
A boolean literal, either true
or false
.
Field(String, Span, NodeID)
A field literal, e.g., 42field
.
A signed number followed by the keyword field
.
Group(Box<GroupLiteral>)
A group literal, either product or affine.
For example, 42group
or (12, 52)group
.
Integer(IntegerType, String, Span, NodeID)
An integer literal, e.g., 42
.
Scalar(String, Span, NodeID)
A scalar literal, e.g. 1scalar
.
An unsigned number followed by the keyword scalar
.
String(String, Span, NodeID)
A string literal, e.g., "foobar"
.
Trait Implementations§
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 PartialEq for Literal
impl PartialEq for Literal
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<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
fn take_from_value<D>(
value: &mut Value,
field: &str
) -> Result<T, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.