Trait snarkvm_console::prelude::FromField
pub trait FromField {
type Field: FieldTrait;
// Required method
fn from_field(field: &Self::Field) -> Result<Self, Error>
where Self: Sized;
}
Expand description
Unary operator for converting from a base field element.
Required Associated Types§
type Field: FieldTrait
Required Methods§
fn from_field(field: &Self::Field) -> Result<Self, Error>where
Self: Sized,
fn from_field(field: &Self::Field) -> Result<Self, Error>where Self: Sized,
Initializes an object from a base field element.
Implementations on Foreign Types§
§impl<E> FromField for Address<E>where
E: Environment,
impl<E> FromField for Address<E>where E: Environment,
§impl<E> FromField for Group<E>where
E: Environment,
impl<E> FromField for Group<E>where E: Environment,
§impl<E, I> FromField for Integer<E, I>where
E: Environment,
I: IntegerType,
impl<E, I> FromField for Integer<E, I>where E: Environment, I: IntegerType,
source§impl<N> FromField for Identifier<N>where
N: Network,
impl<N> FromField for Identifier<N>where N: Network,
source§fn from_field(
field: &<Identifier<N> as FromField>::Field
) -> Result<Identifier<N>, Error>
fn from_field( field: &<Identifier<N> as FromField>::Field ) -> Result<Identifier<N>, Error>
Initializes a new identifier from a field element.