#[repr(C)]pub struct BlobTransactionSidecar {
pub blobs: Vec<FixedBytes<alloy_eips::::eip4844::Blob::{constant#0}>>,
pub commitments: Vec<FixedBytes<48>>,
pub proofs: Vec<FixedBytes<48>>,
}
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<FixedBytes<alloy_eips::::eip4844::Blob::{constant#0}>>
The blob data.
commitments: Vec<FixedBytes<48>>
The blob commitments.
proofs: Vec<FixedBytes<48>>
The blob proofs.
Implementations§
source§impl BlobTransactionSidecar
impl BlobTransactionSidecar
sourcepub const fn new(
blobs: Vec<FixedBytes<alloy_eips::::eip4844::Blob::{constant#0}>>,
commitments: Vec<FixedBytes<48>>,
proofs: Vec<FixedBytes<48>>,
) -> BlobTransactionSidecar
pub const fn new( blobs: Vec<FixedBytes<alloy_eips::::eip4844::Blob::{constant#0}>>, commitments: Vec<FixedBytes<48>>, proofs: Vec<FixedBytes<48>>, ) -> BlobTransactionSidecar
Constructs a new BlobTransactionSidecar from a set of blobs, commitments, and proofs.
sourcepub fn versioned_hashes(&self) -> impl Iterator<Item = FixedBytes<32>>
pub fn versioned_hashes(&self) -> impl Iterator<Item = FixedBytes<32>>
Returns an iterator over the versioned hashes of the commitments.
sourcepub fn versioned_hash_for_blob(
&self,
blob_index: usize,
) -> Option<FixedBytes<32>>
pub fn versioned_hash_for_blob( &self, blob_index: usize, ) -> Option<FixedBytes<32>>
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<BlobTransactionSidecar, Error>
pub fn rlp_decode(buf: &mut &[u8]) -> Result<BlobTransactionSidecar, Error>
Decodes the BlobTransactionSidecar from RLP bytes.
Trait Implementations§
source§impl<'a> Arbitrary<'a> for BlobTransactionSidecar
Available on crate feature arbitrary
only.
impl<'a> Arbitrary<'a> for BlobTransactionSidecar
arbitrary
only.source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<BlobTransactionSidecar, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<BlobTransactionSidecar, Error>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for BlobTransactionSidecar
impl Clone for BlobTransactionSidecar
source§fn clone(&self) -> BlobTransactionSidecar
fn clone(&self) -> BlobTransactionSidecar
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BlobTransactionSidecar
impl Debug for BlobTransactionSidecar
source§impl Decodable for BlobTransactionSidecar
impl Decodable for BlobTransactionSidecar
source§fn decode(buf: &mut &[u8]) -> Result<BlobTransactionSidecar, Error>
fn decode(buf: &mut &[u8]) -> Result<BlobTransactionSidecar, Error>
Decodes the inner BlobTransactionSidecar fields from RLP bytes, without a RLP header.
source§impl Default for BlobTransactionSidecar
impl Default for BlobTransactionSidecar
source§fn default() -> BlobTransactionSidecar
fn default() -> BlobTransactionSidecar
source§impl<'de> Deserialize<'de> for BlobTransactionSidecar
impl<'de> Deserialize<'de> for BlobTransactionSidecar
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlobTransactionSidecar, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlobTransactionSidecar, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Encodable for BlobTransactionSidecar
impl Encodable for BlobTransactionSidecar
source§impl Hash for BlobTransactionSidecar
impl Hash for BlobTransactionSidecar
source§impl IntoIterator for BlobTransactionSidecar
impl IntoIterator for BlobTransactionSidecar
source§type Item = BlobTransactionSidecarItem
type Item = BlobTransactionSidecarItem
source§type IntoIter = IntoIter<BlobTransactionSidecarItem>
type IntoIter = IntoIter<BlobTransactionSidecarItem>
source§fn into_iter(self) -> <BlobTransactionSidecar as IntoIterator>::IntoIter
fn into_iter(self) -> <BlobTransactionSidecar as IntoIterator>::IntoIter
source§impl PartialEq for BlobTransactionSidecar
impl PartialEq for BlobTransactionSidecar
source§impl Serialize for BlobTransactionSidecar
impl Serialize for BlobTransactionSidecar
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more