Trait bdk_chain::bitcoin::hashes::serde_macros::serde_details::SerdeHash
pub trait SerdeHash: Sized + FromStr + Display + Index<usize, Output = u8, Output = [u8]> + Index<RangeFull>{
const N: usize;
// Required method
fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>;
// Provided methods
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer { ... }
fn deserialize<'de, D>(
d: D
) -> Result<Self, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de> { ... }
}
Expand description
Default serialization/deserialization methods.
Required Associated Constants§
Required Methods§
fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>
Helper function to turn a deserialized slice into the correct hash type.
Provided Methods§
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Do serde serialization.
fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Do serde deserialization.
Object Safety§
This trait is not object safe.