use crate::{BooleanTrait, FieldTrait, GroupTrait, ScalarTrait};
pub trait FromBoolean {
type Boolean: BooleanTrait;
fn from_boolean(boolean: &Self::Boolean) -> Self
where
Self: Sized;
}
pub trait FromBits {
type Boolean: BooleanTrait;
fn from_bits_le(bits_le: &[Self::Boolean]) -> Self
where
Self: Sized;
fn from_bits_be(bits_be: &[Self::Boolean]) -> Self
where
Self: Sized;
}
pub trait FromField {
type Field: FieldTrait;
fn from_field(field: Self::Field) -> Self;
}
pub trait FromFields {
type Field: FieldTrait;
fn from_fields(fields: &[Self::Field]) -> Self;
}
pub trait FromGroup {
type Group: GroupTrait<Self::Scalar>;
type Scalar: ScalarTrait;
fn from_group(group: Self::Group) -> Self;
}