pub enum ExpressionPrimitive {
String(String),
Integer(i64),
Float(f64),
Boolean(bool),
}
Expand description
Represents a primitive eFLINT type.
This, too, has multiple variants; one for every literal type (strings, integer, float and booleans).
Note that the specification makes no difference between integers and floating-point numbers. As such, any number without fractions are parsed as integers, and numbers with are parsed as floats.
For example:
"Amy"
42
42.0
true
Variants§
String(String)
String literals, e.g.:
"Amy"
Integer(i64)
Integer literals, e.g.:
42
Float(f64)
Floating-point literals, e.g.:
42.0
Boolean(bool)
Boolean literals, e.g.:
true
Trait Implementations§
Source§impl Clone for ExpressionPrimitive
impl Clone for ExpressionPrimitive
Source§fn clone(&self) -> ExpressionPrimitive
fn clone(&self) -> ExpressionPrimitive
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ExpressionPrimitive
impl Debug for ExpressionPrimitive
Source§impl<'de> Deserialize<'de> for ExpressionPrimitive
impl<'de> Deserialize<'de> for ExpressionPrimitive
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 EnumDebug for ExpressionPrimitive
impl EnumDebug for ExpressionPrimitive
Source§fn type_name() -> &'static str
fn type_name() -> &'static str
Returns the static name of the type used for EnumDebug-printing. Read more
Source§fn variant_names() -> &'static [&'static str]
fn variant_names() -> &'static [&'static str]
Returns all variants in the trait as a list of names. Read more
Source§fn variant_name(&self) -> &'static str
fn variant_name(&self) -> &'static str
Returns the static name of the variant. Read more
Source§fn variant(&self) -> EnumDebugFormatter<'_, Self>
fn variant(&self) -> EnumDebugFormatter<'_, Self>
Returns a formatter for this enum that writes its variant name. Read more
Auto Trait Implementations§
impl Freeze for ExpressionPrimitive
impl RefUnwindSafe for ExpressionPrimitive
impl Send for ExpressionPrimitive
impl Sync for ExpressionPrimitive
impl Unpin for ExpressionPrimitive
impl UnwindSafe for ExpressionPrimitive
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