Struct chainhook_types::TransactionIdentifier
source · pub struct TransactionIdentifier {
pub hash: String,
}Expand description
The transaction_identifier uniquely identifies a transaction in a particular network and block or in the mempool.
Fields§
§hash: StringAny transactions that are attributable only to a block (ex: a block event) should use the hash of the block as the identifier.
Implementations§
source§impl TransactionIdentifier
impl TransactionIdentifier
pub fn new(txid: &str) -> Self
pub fn get_hash_bytes_str(&self) -> &str
pub fn get_hash_bytes(&self) -> Vec<u8>
pub fn get_8_hash_bytes(&self) -> [u8; 8]
Trait Implementations§
source§impl Clone for TransactionIdentifier
impl Clone for TransactionIdentifier
source§fn clone(&self) -> TransactionIdentifier
fn clone(&self) -> TransactionIdentifier
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for TransactionIdentifier
impl Debug for TransactionIdentifier
source§impl<'de> Deserialize<'de> for TransactionIdentifier
impl<'de> Deserialize<'de> for TransactionIdentifier
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 Hash for TransactionIdentifier
impl Hash for TransactionIdentifier
source§impl Ord for TransactionIdentifier
impl Ord for TransactionIdentifier
source§fn cmp(&self, other: &TransactionIdentifier) -> Ordering
fn cmp(&self, other: &TransactionIdentifier) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<TransactionIdentifier> for TransactionIdentifier
impl PartialEq<TransactionIdentifier> for TransactionIdentifier
source§fn eq(&self, other: &TransactionIdentifier) -> bool
fn eq(&self, other: &TransactionIdentifier) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<TransactionIdentifier> for TransactionIdentifier
impl PartialOrd<TransactionIdentifier> for TransactionIdentifier
source§fn partial_cmp(&self, other: &TransactionIdentifier) -> Option<Ordering>
fn partial_cmp(&self, other: &TransactionIdentifier) -> Option<Ordering>
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 moresource§impl Serialize for TransactionIdentifier
impl Serialize for TransactionIdentifier
impl Eq for TransactionIdentifier
impl StructuralEq for TransactionIdentifier
impl StructuralPartialEq for TransactionIdentifier
Auto Trait Implementations§
impl RefUnwindSafe for TransactionIdentifier
impl Send for TransactionIdentifier
impl Sync for TransactionIdentifier
impl Unpin for TransactionIdentifier
impl UnwindSafe for TransactionIdentifier
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