pub enum Literal<A> where
    A: Aleo
{
Show 16 variants Address(Address<A>), Boolean(Boolean<A>), Field(Field<A>), Group(Group<A>), I8(Integer<A, i8>), I16(Integer<A, i16>), I32(Integer<A, i32>), I64(Integer<A, i64>), I128(Integer<A, i128>), U8(Integer<A, u8>), U16(Integer<A, u16>), U32(Integer<A, u32>), U64(Integer<A, u64>), U128(Integer<A, u128>), Scalar(Scalar<A>), String(StringType<A>),
}
Expand description

The literal enum represents all supported circuit types in snarkVM.

Variants

Address(Address<A>)

The Aleo address type.

Boolean(Boolean<A>)

The boolean type.

Field(Field<A>)

The field type (base field).

Group(Group<A>)

The group type (affine).

I8(Integer<A, i8>)

The 8-bit signed integer type.

I16(Integer<A, i16>)

The 16-bit signed integer type.

I32(Integer<A, i32>)

The 32-bit signed integer type.

I64(Integer<A, i64>)

The 64-bit signed integer type.

I128(Integer<A, i128>)

The 128-bit signed integer type.

U8(Integer<A, u8>)

The 8-bit unsigned integer type.

U16(Integer<A, u16>)

The 16-bit unsigned integer type.

U32(Integer<A, u32>)

The 32-bit unsigned integer type.

U64(Integer<A, u64>)

The 64-bit unsigned integer type.

U128(Integer<A, u128>)

The 128-bit unsigned integer type.

Scalar(Scalar<A>)

The scalar type (scalar field).

String(StringType<A>)

The string type.

Implementations

Initializes a new literal from a list of little-endian bits without trailing zeros.

Initializes a new literal from a list of big-endian bits without leading zeros.

Returns the number of bits of this literal.

Returns the type name of the literal.

Returns the variant of the literal.

Returns the type name of the literal.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Ejects the mode of the literal.

Ejects the literal into its primitive.

Ejects the mode and primitive value of the circuit type. Read more

Returns true if the circuit is a constant. Read more

Returns true if the circuit is a public. Read more

Returns true if the circuit is a private. Read more

Returns true if self and other are equal.

Returns true if self and other are not equal.

Returns a new Plaintext from a Literal.

Returns a new Plaintext from a Literal.

Parses a string into a literal circuit.

The associated error which can be returned from parsing.

Initializes a new literal from a primitive.

Initializes a constant of the given primitive value. Read more

Parses a string into a literal.

Returns the little-endian bits of the literal.

Returns the big-endian bits of the literal.

Returns the little-endian bits of the literal.

Returns the big-endian bits of the literal.

Returns the literal as a list of base field elements.

Returns the literal as a list of base field elements.

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

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.