pub enum ExecutionPayload {
V1(ExecutionPayloadV1),
V2(ExecutionPayloadV2),
V3(ExecutionPayloadV3),
}
Expand description
An execution payload, which can be either ExecutionPayloadV1, ExecutionPayloadV2, or ExecutionPayloadV3.
Variants§
V1(ExecutionPayloadV1)
V1 payload
V2(ExecutionPayloadV2)
V2 payload
V3(ExecutionPayloadV3)
V3 payload
Implementations§
source§impl ExecutionPayload
impl ExecutionPayload
sourcepub const fn as_v1(&self) -> &ExecutionPayloadV1
pub const fn as_v1(&self) -> &ExecutionPayloadV1
Returns a reference to the V1 payload.
sourcepub fn as_v1_mut(&mut self) -> &mut ExecutionPayloadV1
pub fn as_v1_mut(&mut self) -> &mut ExecutionPayloadV1
Returns a mutable reference to the V1 payload.
sourcepub fn into_v1(self) -> ExecutionPayloadV1
pub fn into_v1(self) -> ExecutionPayloadV1
Consumes the payload and returns the V1 payload.
sourcepub const fn as_v2(&self) -> Option<&ExecutionPayloadV2>
pub const fn as_v2(&self) -> Option<&ExecutionPayloadV2>
Returns a reference to the V2 payload, if any.
sourcepub fn as_v2_mut(&mut self) -> Option<&mut ExecutionPayloadV2>
pub fn as_v2_mut(&mut self) -> Option<&mut ExecutionPayloadV2>
Returns a mutable reference to the V2 payload, if any.
sourcepub const fn as_v3(&self) -> Option<&ExecutionPayloadV3>
pub const fn as_v3(&self) -> Option<&ExecutionPayloadV3>
Returns a reference to the V2 payload, if any.
sourcepub fn as_v3_mut(&mut self) -> Option<&mut ExecutionPayloadV3>
pub fn as_v3_mut(&mut self) -> Option<&mut ExecutionPayloadV3>
Returns a mutable reference to the V2 payload, if any.
sourcepub const fn withdrawals(&self) -> Option<&Vec<Withdrawal>>
pub const fn withdrawals(&self) -> Option<&Vec<Withdrawal>>
Returns the withdrawals for the payload.
sourcepub const fn parent_hash(&self) -> B256
pub const fn parent_hash(&self) -> B256
Returns the parent hash for the payload.
sourcepub const fn block_hash(&self) -> B256
pub const fn block_hash(&self) -> B256
Returns the block hash for the payload.
sourcepub const fn block_number(&self) -> u64
pub const fn block_number(&self) -> u64
Returns the block number for this payload.
sourcepub const fn block_num_hash(&self) -> BlockNumHash
pub const fn block_num_hash(&self) -> BlockNumHash
Returns the block number for this payload.
sourcepub const fn prev_randao(&self) -> B256
pub const fn prev_randao(&self) -> B256
Returns the prev randao for this payload.
Trait Implementations§
source§impl Clone for ExecutionPayload
impl Clone for ExecutionPayload
source§fn clone(&self) -> ExecutionPayload
fn clone(&self) -> ExecutionPayload
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 ExecutionPayload
impl Debug for ExecutionPayload
source§impl<'de> Deserialize<'de> for ExecutionPayload
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for ExecutionPayload
Available on crate feature
serde
only.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 From<ExecutionPayloadV1> for ExecutionPayload
impl From<ExecutionPayloadV1> for ExecutionPayload
source§fn from(payload: ExecutionPayloadV1) -> Self
fn from(payload: ExecutionPayloadV1) -> Self
Converts to this type from the input type.
source§impl From<ExecutionPayloadV2> for ExecutionPayload
impl From<ExecutionPayloadV2> for ExecutionPayload
source§fn from(payload: ExecutionPayloadV2) -> Self
fn from(payload: ExecutionPayloadV2) -> Self
Converts to this type from the input type.
source§impl From<ExecutionPayloadV3> for ExecutionPayload
impl From<ExecutionPayloadV3> for ExecutionPayload
source§fn from(payload: ExecutionPayloadV3) -> Self
fn from(payload: ExecutionPayloadV3) -> Self
Converts to this type from the input type.
source§impl PartialEq for ExecutionPayload
impl PartialEq for ExecutionPayload
source§impl Serialize for ExecutionPayload
impl Serialize for ExecutionPayload
impl Eq for ExecutionPayload
impl StructuralPartialEq for ExecutionPayload
Auto Trait Implementations§
impl !Freeze for ExecutionPayload
impl RefUnwindSafe for ExecutionPayload
impl Send for ExecutionPayload
impl Sync for ExecutionPayload
impl Unpin for ExecutionPayload
impl UnwindSafe for ExecutionPayload
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
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§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>
Converts
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>
Converts
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