Struct alloy_eips::eip4844::BlobTransactionSidecar
source · #[repr(C)]pub struct BlobTransactionSidecar {
pub blobs: Vec<Blob>,
pub commitments: Vec<Bytes48>,
pub proofs: Vec<Bytes48>,
}
Expand description
This represents a set of blobs, and its corresponding commitments and proofs.
This type encodes and decodes the fields without an rlp header.
Fields§
§blobs: Vec<Blob>
The blob data.
commitments: Vec<Bytes48>
The blob commitments.
proofs: Vec<Bytes48>
The blob proofs.
Implementations§
source§impl BlobTransactionSidecar
impl BlobTransactionSidecar
sourcepub const fn new(
blobs: Vec<Blob>,
commitments: Vec<Bytes48>,
proofs: Vec<Bytes48>,
) -> Self
pub const fn new( blobs: Vec<Blob>, commitments: Vec<Bytes48>, proofs: Vec<Bytes48>, ) -> Self
Constructs a new BlobTransactionSidecar from a set of blobs, commitments, and proofs.
sourcepub fn versioned_hashes(&self) -> impl Iterator<Item = B256> + '_
pub fn versioned_hashes(&self) -> impl Iterator<Item = B256> + '_
Returns an iterator over the versioned hashes of the commitments.
sourcepub fn versioned_hash_for_blob(&self, blob_index: usize) -> Option<B256>
pub fn versioned_hash_for_blob(&self, blob_index: usize) -> Option<B256>
Returns the versioned hash for the blob at the given index, if it exists.
sourcepub fn size(&self) -> usize
pub fn size(&self) -> usize
Calculates a size heuristic for the in-memory size of the BlobTransactionSidecar.
sourcepub fn rlp_encoded_length(&self) -> usize
pub fn rlp_encoded_length(&self) -> usize
Calculates the length of the BlobTransactionSidecar when encoded as RLP.
sourcepub fn rlp_encode(&self, out: &mut dyn BufMut)
pub fn rlp_encode(&self, out: &mut dyn BufMut)
Encodes the BlobTransactionSidecar as RLP bytes.
sourcepub fn rlp_decode(buf: &mut &[u8]) -> Result<Self>
pub fn rlp_decode(buf: &mut &[u8]) -> Result<Self>
Decodes the BlobTransactionSidecar from RLP bytes.
Trait Implementations§
source§impl Clone for BlobTransactionSidecar
impl Clone for BlobTransactionSidecar
source§fn clone(&self) -> BlobTransactionSidecar
fn clone(&self) -> BlobTransactionSidecar
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 BlobTransactionSidecar
impl Debug for BlobTransactionSidecar
source§impl Decodable for BlobTransactionSidecar
impl Decodable for BlobTransactionSidecar
source§impl Default for BlobTransactionSidecar
impl Default for BlobTransactionSidecar
source§fn default() -> BlobTransactionSidecar
fn default() -> BlobTransactionSidecar
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for BlobTransactionSidecar
impl<'de> Deserialize<'de> for BlobTransactionSidecar
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 Encodable for BlobTransactionSidecar
impl Encodable for BlobTransactionSidecar
source§impl Hash for BlobTransactionSidecar
impl Hash for BlobTransactionSidecar
source§impl PartialEq for BlobTransactionSidecar
impl PartialEq for BlobTransactionSidecar
source§fn eq(&self, other: &BlobTransactionSidecar) -> bool
fn eq(&self, other: &BlobTransactionSidecar) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for BlobTransactionSidecar
impl Serialize for BlobTransactionSidecar
impl Eq for BlobTransactionSidecar
impl StructuralPartialEq for BlobTransactionSidecar
Auto Trait Implementations§
impl Freeze for BlobTransactionSidecar
impl RefUnwindSafe for BlobTransactionSidecar
impl Send for BlobTransactionSidecar
impl Sync for BlobTransactionSidecar
impl Unpin for BlobTransactionSidecar
impl UnwindSafe for BlobTransactionSidecar
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.