snarkvm_console_account

Trait ToField

Source
pub trait ToField {
    type Field: FieldTrait;

    // Required method
    fn to_field(&self) -> Result<Self::Field, Error>;
}
Expand description

Unary operator for converting to a base field.

Required Associated Types§

Required Methods§

Source

fn to_field(&self) -> Result<Self::Field, Error>

Returns the object as a base field element.

Implementations on Foreign Types§

Source§

impl<E, I> ToField for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

fn to_field(&self) -> Result<<Integer<E, I> as ToField>::Field, Error>

Converts an integer into a field element.

Source§

type Field = Field<E>

Implementors§

Source§

impl<E> ToField for Address<E>
where E: Environment,

Source§

impl<E> ToField for Group<E>
where E: Environment,

Source§

impl<E> ToField for Scalar<E>
where E: Environment,