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

Returns the literal type name.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Prints the literal type as a string.

Deserializes the literal type from a string or bytes.

Prints the literal type as a string.

Initializes a plaintext type from a literal type.

Reads Self from reader as little-endian bytes.

Returns Self from a byte array in little-endian order.

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

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

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

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

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

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

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

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

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

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

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

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

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more

Returns a literal type from a string literal.

The associated error which can be returned from parsing.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Parses a string into a literal type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Serializes the literal type into string or bytes.

Writes self into writer as little-endian bytes.

Returns self as a byte array in little-endian order.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.