Trait scrypto::crypto::IsHash

source ·
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§

source

fn as_bytes(&self) -> &[u8; 32]

source

fn as_slice(&self) -> &[u8]

source

fn as_hash(&self) -> &Hash

source

fn into_bytes(self) -> [u8; 32]

source

fn into_hash(self) -> Hash

source

fn from_bytes(bytes: [u8; 32]) -> Self

source

fn from_hash(hash: Hash) -> Self

Object Safety§

This trait is not object safe.

Implementors§