Trait snarkvm_console_network::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§
type Field: FieldTrait
Required Methods§
Implementations on Foreign Types§
§impl<E> FromFields for Group<E>where
E: Environment,
impl<E> FromFields for Group<E>where E: Environment,
§fn from_fields(
fields: &[<Group<E> as FromFields>::Field]
) -> Result<Group<E>, Error>
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.
type Field = Field<E>
§impl<E, I> FromFields for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> FromFields for Integer<E, I>where E: Environment, I: IntegerType,
§fn from_fields(
fields: &[<Integer<E, I> as FromFields>::Field]
) -> Result<Integer<E, I>, Error>
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.