Struct chainhook_types::bitcoin::Witness
source · pub struct Witness { /* private fields */ }Expand description
The Witness is the data used to unlock bitcoins since the segwit upgrade
Can be logically seen as an array of byte-arrays Vec<Vec<u8>> and indeed you can convert from
it [Witness::from_vec] and convert into it [Witness::to_vec].
For serialization and deserialization performance it is stored internally as a single Vec,
saving some allocations.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Witness
impl<'de> Deserialize<'de> for Witness
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Witness
impl Ord for Witness
source§impl PartialEq<Witness> for Witness
impl PartialEq<Witness> for Witness
source§impl PartialOrd<Witness> for Witness
impl PartialOrd<Witness> for Witness
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more