Trait Domain

Source
pub trait Domain:
    Ord
    + Copy
    + Clone
    + AsRef<[u8]>
    + Default
    + Debug
    + Eq
    + Send
    + Sync
    + From<Scalar>
    + From<<Scalar as PrimeField>::Repr>
    + Into<Scalar>
    + Serialize
    + DeserializeOwned
    + Element
    + StdHash {
    // Required methods
    fn into_bytes(&self) -> Vec<u8> ;
    fn try_from_bytes(raw: &[u8]) -> Result<Self>;
    fn write_bytes(&self, _: &mut [u8]) -> Result<()>;
    fn random<R: RngCore>(rng: &mut R) -> Self;
}

Required Methods§

Source

fn into_bytes(&self) -> Vec<u8>

Source

fn try_from_bytes(raw: &[u8]) -> Result<Self>

Source

fn write_bytes(&self, _: &mut [u8]) -> Result<()>

Write itself into the given slice, LittleEndian bytes.

Source

fn random<R: RngCore>(rng: &mut R) -> Self

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§