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.
Required Methods§
Sourcefn to_tx_compact(&self, buf: &mut (impl BufMut + AsMut<[u8]>))
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.
impl ToTxCompact for OpTxEnvelope
Available on crate feature
op
only.