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§
fn into_bytes(&self) -> Vec<u8>
fn try_from_bytes(raw: &[u8]) -> Result<Self>
sourcefn write_bytes(&self, _: &mut [u8]) -> Result<()>
fn write_bytes(&self, _: &mut [u8]) -> Result<()>
Write itself into the given slice, LittleEndian bytes.
fn random<R: RngCore>(rng: &mut R) -> Self
Object Safety§
This trait is not object safe.