Trait bitcoin_hashes::serde_macros::serde_details::SerdeHash[][src]

pub trait SerdeHash where
    Self: Sized + FromStr + Display + Index<usize, Output = u8> + Index<RangeFull, Output = [u8]>,
    Self::Err: Display
{ const N: usize; fn from_slice_delegated(sl: &[u8]) -> Result<Self, Error>; fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> { ... }
fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> { ... } }

Default serialization/deserialization methods

Associated Constants

const N: usize[src]

Size, in bits, of the hash

Loading content...

Required methods

fn from_slice_delegated(sl: &[u8]) -> Result<Self, Error>[src]

helper function to turn a deserialized slice into the correct hash type

Loading content...

Provided methods

fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error>[src]

serde serialization

fn deserialize<'de, D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>[src]

serde deserialization

Loading content...

Implementors

impl SerdeHash for bitcoin_hashes::hash160::Hash[src]

impl SerdeHash for bitcoin_hashes::ripemd160::Hash[src]

impl SerdeHash for bitcoin_hashes::sha1::Hash[src]

impl SerdeHash for bitcoin_hashes::sha256::Hash[src]

impl SerdeHash for Midstate[src]

impl SerdeHash for bitcoin_hashes::sha256d::Hash[src]

impl SerdeHash for bitcoin_hashes::sha512::Hash[src]

impl SerdeHash for bitcoin_hashes::siphash24::Hash[src]

Loading content...