pub enum PayloadStatusEnum {
Valid,
Invalid {
validation_error: String,
},
Syncing,
Accepted,
}
Expand description
Represents the status response of a payload.
Variants§
Valid
VALID is returned by the engine API in the following calls:
- newPayload: if the payload was already known or was just validated and executed
- forkchoiceUpdate: if the chain accepted the reorg (might ignore if it’s stale)
Invalid
INVALID is returned by the engine API in the following calls:
- newPayload: if the payload failed to execute on top of the local chain
- forkchoiceUpdate: if the new head is unknown, pre-merge, or reorg to it fails
Syncing
SYNCING is returned by the engine API in the following calls:
- newPayload: if the payload was accepted on top of an active sync
- forkchoiceUpdate: if the new head was seen before, but not part of the chain
Accepted
ACCEPTED is returned by the engine API in the following calls:
- newPayload: if the payload was accepted, but not processed (side chain)
Implementations§
source§impl PayloadStatusEnum
impl PayloadStatusEnum
sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Returns the string representation of the payload status.
sourcepub fn validation_error(&self) -> Option<&str>
pub fn validation_error(&self) -> Option<&str>
Returns the validation error if the payload status is invalid.
sourcepub const fn is_syncing(&self) -> bool
pub const fn is_syncing(&self) -> bool
Returns true if the payload status is syncing.
sourcepub const fn is_invalid(&self) -> bool
pub const fn is_invalid(&self) -> bool
Returns true if the payload status is invalid.
Trait Implementations§
source§impl Clone for PayloadStatusEnum
impl Clone for PayloadStatusEnum
source§fn clone(&self) -> PayloadStatusEnum
fn clone(&self) -> PayloadStatusEnum
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 PayloadStatusEnum
impl Debug for PayloadStatusEnum
source§impl<'de> Deserialize<'de> for PayloadStatusEnum
impl<'de> Deserialize<'de> for PayloadStatusEnum
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 Display for PayloadStatusEnum
impl Display for PayloadStatusEnum
source§impl From<PayloadError> for PayloadStatusEnum
impl From<PayloadError> for PayloadStatusEnum
source§fn from(error: PayloadError) -> Self
fn from(error: PayloadError) -> Self
Converts to this type from the input type.
source§impl PartialEq for PayloadStatusEnum
impl PartialEq for PayloadStatusEnum
source§impl Serialize for PayloadStatusEnum
impl Serialize for PayloadStatusEnum
impl Eq for PayloadStatusEnum
impl StructuralPartialEq for PayloadStatusEnum
Auto Trait Implementations§
impl Freeze for PayloadStatusEnum
impl RefUnwindSafe for PayloadStatusEnum
impl Send for PayloadStatusEnum
impl Sync for PayloadStatusEnum
impl Unpin for PayloadStatusEnum
impl UnwindSafe for PayloadStatusEnum
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