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