snarkvm_console_network

Trait FromFields

Source
pub trait FromFields {
    type Field: FieldTrait;

    // Required method
    fn from_fields(fields: &[Self::Field]) -> Result<Self, Error>
       where Self: Sized;
}
Expand description

Unary operator for converting from a list of base elements.

Required Associated Types§

Required Methods§

Source

fn from_fields(fields: &[Self::Field]) -> Result<Self, Error>
where Self: Sized,

Initializes an object from a list of base field elements.

Implementations on Foreign Types§

Source§

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

Source§

fn from_fields( fields: &[<Group<E> as FromFields>::Field], ) -> Result<Group<E>, Error>

Initializes a new group by recovering the x-coordinate of an affine group from a field element.

Source§

type Field = Field<E>

Source§

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

Source§

fn from_fields( fields: &[<Integer<E, I> as FromFields>::Field], ) -> Result<Integer<E, I>, Error>

Initializes a new integer by recovering the x-coordinate of an affine group from a field element.

Source§

type Field = Field<E>

Implementors§