pub enum LiteralType {
Show 16 variants
Address,
Boolean,
Field,
Group,
I8,
I16,
I32,
I64,
I128,
U8,
U16,
U32,
U64,
U128,
Scalar,
String,
}
Variants
Address
The Aleo address type.
Boolean
The boolean type.
Field
The field type (base field).
Group
The group type (affine).
I8
The 8-bit signed integer type.
I16
The 16-bit signed integer type.
I32
The 32-bit signed integer type.
I64
The 64-bit signed integer type.
I128
The 128-bit signed integer type.
U8
The 8-bit unsigned integer type.
U16
The 16-bit unsigned integer type.
U32
The 32-bit unsigned integer type.
U64
The 64-bit unsigned integer type.
U128
The 128-bit unsigned integer type.
Scalar
The scalar type (scalar field).
String
The string type.
Implementations
sourceimpl LiteralType
impl LiteralType
Trait Implementations
sourceimpl Clone for LiteralType
impl Clone for LiteralType
sourcefn clone(&self) -> LiteralType
fn clone(&self) -> LiteralType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LiteralType
impl Debug for LiteralType
sourceimpl<'de> Deserialize<'de> for LiteralType
impl<'de> Deserialize<'de> for LiteralType
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the literal type from a string or bytes.
sourceimpl Display for LiteralType
impl Display for LiteralType
sourceimpl<N: Network> From<LiteralType> for PlaintextType<N>
impl<N: Network> From<LiteralType> for PlaintextType<N>
sourcefn from(literal: LiteralType) -> Self
fn from(literal: LiteralType) -> Self
Initializes a plaintext type from a literal type.
sourceimpl FromBytes for LiteralType
impl FromBytes for LiteralType
sourceimpl FromPrimitive for LiteralType
impl FromPrimitive for LiteralType
sourcefn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourcefn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more
sourceimpl FromStr for LiteralType
impl FromStr for LiteralType
sourceimpl Hash for LiteralType
impl Hash for LiteralType
sourceimpl Parser for LiteralType
impl Parser for LiteralType
sourcefn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into a literal type.
sourceimpl PartialEq<LiteralType> for LiteralType
impl PartialEq<LiteralType> for LiteralType
sourcefn eq(&self, other: &LiteralType) -> bool
fn eq(&self, other: &LiteralType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for LiteralType
impl Serialize for LiteralType
sourceimpl ToBytes for LiteralType
impl ToBytes for LiteralType
impl Copy for LiteralType
impl Eq for LiteralType
impl StructuralEq for LiteralType
impl StructuralPartialEq for LiteralType
Auto Trait Implementations
impl RefUnwindSafe for LiteralType
impl Send for LiteralType
impl Sync for LiteralType
impl Unpin for LiteralType
impl UnwindSafe for LiteralType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.