snarkvm_console::prelude

Trait ToFields

Source
pub trait ToFields {
    type Field: FieldTrait;

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

Unary operator for converting to a list of base fields.

Required Associated Types§

Required Methods§

Source

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

Returns the object as a list of base field elements.

Implementations on Foreign Types§

Source§

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

Source§

fn to_fields(&self) -> Result<Vec<<Address<E> as ToFields>::Field>, Error>

Returns the address as field elements.

Source§

type Field = Field<E>

Source§

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

Source§

fn to_fields(&self) -> Result<Vec<<Group<E> as ToFields>::Field>, Error>

Returns the group as field elements.

Source§

type Field = Field<E>

Source§

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

Source§

fn to_fields(&self) -> Result<Vec<<Integer<E, I> as ToFields>::Field>, Error>

Returns the integer as field elements.

Source§

type Field = Field<E>

Source§

impl<N> ToFields for Plaintext<N>
where N: Network,

Source§

fn to_fields(&self) -> Result<Vec<<Plaintext<N> as ToFields>::Field>, Error>

Returns this plaintext as a list of field elements.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for Value<N>
where N: Network,

Source§

fn to_fields(&self) -> Result<Vec<<Value<N> as ToFields>::Field>, Error>

Returns the stack value as a list of fields.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for ComputeKey<N>
where N: Network,

Source§

fn to_fields(&self) -> Result<Vec<<ComputeKey<N> as ToFields>::Field>, Error>

Casts a compute key into a list of base fields.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for Signature<N>
where N: Network,

Source§

fn to_fields(&self) -> Result<Vec<<Signature<N> as ToFields>::Field>, Error>

Casts a signature into a list of base fields.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for Ciphertext<N>
where N: Network,

Source§

fn to_fields(&self) -> Result<Vec<<Ciphertext<N> as ToFields>::Field>, Error>

Returns this ciphertext as a list of field elements.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for Future<N>
where N: Network,

Source§

fn to_fields(&self) -> Result<Vec<<Future<N> as ToFields>::Field>, Error>

Returns the future as a list of fields.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for Record<N, Plaintext<N>>
where N: Network,

Source§

fn to_fields( &self, ) -> Result<Vec<<Record<N, Plaintext<N>> as ToFields>::Field>, Error>

Returns this record as a list of field elements.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for Record<N, Ciphertext<N>>
where N: Network,

Source§

fn to_fields( &self, ) -> Result<Vec<<Record<N, Ciphertext<N>> as ToFields>::Field>, Error>

Returns this record as a list of field elements.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for ProgramID<N>
where N: Network,

Source§

fn to_fields(&self) -> Result<Vec<<ProgramID<N> as ToFields>::Field>, Error>

Returns this program ID as a list of field elements.

Source§

type Field = Field<N>

Source§

impl<N> ToFields for Locator<N>
where N: Network,

Source§

fn to_fields(&self) -> Result<Vec<<Locator<N> as ToFields>::Field>, Error>

Returns this locator as a list of field elements.

Source§

type Field = Field<N>

Implementors§