GroupElement

Trait GroupElement 

Source
pub trait GroupElement:
    Copy
    + Clone
    + Debug
    + Eq
    + Add<Output = Self>
    + AddAssign
    + for<'a> Add<&'a Self, Output = Self>
    + Sub<Output = Self>
    + SubAssign
    + for<'a> Sub<&'a Self, Output = Self>
    + Neg<Output = Self>
    + Mul<Self::ScalarType, Output = Self>
    + Div<Self::ScalarType, Output = Result<Self, FastCryptoError>>
    + for<'a> Mul<&'a Self::ScalarType, Output = Self>
    + Sized {
    type ScalarType: Scalar;

    // Required methods
    fn zero() -> Self;
    fn generator() -> Self;
}
Expand description

Trait impl’d by elements of an additive cyclic group.

Required Associated Types§

Source

type ScalarType: Scalar

Type of scalars used in the [Self::mul] multiplication method.

Required Methods§

Source

fn zero() -> Self

Return an instance of the identity element in this group.

Source

fn generator() -> Self

Return an instance of the generator for this group.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§