pub trait FromField {
    type Field: FieldTrait;

    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§

Required Methods§

source

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 Group<E>where
    E: Environment,

§

fn from_field(field: &<Group<E> as FromField>::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> FromField for Integer<E, I>where
    E: Environment,
    I: IntegerType,

§

fn from_field(
    field: &<Integer<E, I> as FromField>::Field
) -> Result<Integer<E, I>, Error>

Initialize an integer from a field element.

§

type Field = Field<E>

Implementors§