pub trait IsHash: AsRef<[u8]> + Sized + From<Hash> + Into<Hash> + AsRef<Hash> {
// Provided methods
fn as_bytes(&self) -> &[u8; 32] { ... }
fn as_slice(&self) -> &[u8] ⓘ { ... }
fn as_hash(&self) -> &Hash { ... }
fn into_bytes(self) -> [u8; 32] { ... }
fn into_hash(self) -> Hash { ... }
fn from_bytes(bytes: [u8; 32]) -> Self { ... }
fn from_hash(hash: Hash) -> Self { ... }
}
Provided Methods§
fn as_bytes(&self) -> &[u8; 32]
fn as_slice(&self) -> &[u8] ⓘ
fn as_hash(&self) -> &Hash
fn into_bytes(self) -> [u8; 32]
fn into_hash(self) -> Hash
fn from_bytes(bytes: [u8; 32]) -> Self
fn from_hash(hash: Hash) -> Self
Object Safety§
This trait is not object safe.