Trait filecoin_hashers::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

Object Safety§

This trait is not object safe.

Implementors§