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 for Witness
impl PartialEq for Witness
source§impl PartialOrd for Witness
impl PartialOrd 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 moreimpl Eq for Witness
impl StructuralEq for Witness
impl StructuralPartialEq for Witness
Auto Trait Implementations§
impl RefUnwindSafe for Witness
impl Send for Witness
impl Sync for Witness
impl Unpin for Witness
impl UnwindSafe for Witness
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more