Trait ToTxCompact

Source
pub trait ToTxCompact {
    // Required method
    fn to_tx_compact(&self, buf: &mut (impl BufMut + AsMut<[u8]>));
}
Available on crate feature test-utils only.
Expand description

A trait for extracting transaction without type and signature and serializing it using Compact encoding.

It is not a responsibility of this trait to encode transaction type and signature. Likely this will be a part of a serialization scenario with a greater scope where these values are serialized separately.

See ToTxCompact::to_tx_compact.

Required Methods§

Source

fn to_tx_compact(&self, buf: &mut (impl BufMut + AsMut<[u8]>))

Serializes inner transaction using Compact encoding. Writes the result into buf.

The written bytes do not contain signature and transaction type. This information be needs to be serialized extra if needed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ToTxCompact for OpTxEnvelope

Available on crate feature op only.
Source§

fn to_tx_compact(&self, buf: &mut (impl BufMut + AsMut<[u8]>))

Source§

impl ToTxCompact for SeismicTxEnvelope

Source§

fn to_tx_compact(&self, buf: &mut (impl BufMut + AsMut<[u8]>))

Source§

impl<Eip4844: Compact + Transaction> ToTxCompact for EthereumTxEnvelope<Eip4844>

Source§

fn to_tx_compact(&self, buf: &mut (impl BufMut + AsMut<[u8]>))

Implementors§