Skip to main content

TxHashRef

Trait TxHashRef 

pub trait TxHashRef {
    // Required method
    fn tx_hash(&self) -> &FixedBytes<32>;
}
Expand description

Trait for types that provide access to a transaction hash reference.

This trait is implemented by types that contain or can provide a reference to a transaction hash ([TxHash]). It provides a standard interface for accessing transaction hashes without requiring ownership.

Required Methods§

fn tx_hash(&self) -> &FixedBytes<32>

Returns a reference to the transaction hash.

This assumes the implementing type already owns or has computed the transaction hash.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl<'a, T> TxHashRef for &'a T
where T: 'a + TxHashRef + ?Sized,

§

fn tx_hash(&self) -> &FixedBytes<32>

§

impl<'a, T> TxHashRef for &'a mut T
where T: 'a + TxHashRef + ?Sized,

§

fn tx_hash(&self) -> &FixedBytes<32>

§

impl<T> TxHashRef for Box<T>
where T: TxHashRef + ?Sized,

§

fn tx_hash(&self) -> &FixedBytes<32>

§

impl<T> TxHashRef for Cow<'_, T>
where T: TxHashRef + Clone,

§

fn tx_hash(&self) -> &FixedBytes<32>

Implementors§

§

impl<Eip4844> TxHashRef for EthereumTxEnvelope<Eip4844>
where Eip4844: RlpEcdsaEncodableTx,

§

impl<T, Sig> TxHashRef for Signed<T, Sig>
where T: TxHashable<Sig>,

§

impl<T> TxHashRef for Recovered<T>
where T: TxHashRef,

§

impl<T> TxHashRef for WithEncoded<T>
where T: TxHashRef,