pub enum ValidateResponseError {
BytesRepr(Error),
Serde(Error),
ValidateResponseFailedToParse,
BodyHashMismatch {
block: Box<Block>,
actual_block_body_hash: Digest,
},
BlockHashMismatch {
block: Box<Block>,
actual_block_header_hash: BlockHash,
},
SerializedValueNotContainedInProof,
NoBlockInResponse,
UnexpectedBlockHash,
UnexpectedBlockHeight,
InvalidGlobalStateResponse,
}
Expand description
Error that can be returned when validating data returned from a JSON-RPC method.
Variants§
BytesRepr(Error)
Failed to marshall value.
Serde(Error)
Error from serde.
ValidateResponseFailedToParse
Failed to parse JSON.
BodyHashMismatch
The body hash in the header is not the same as the hash of the body of the block.
Fields
BlockHashMismatch
The block’s hash is not the same as the header’s hash.
Fields
SerializedValueNotContainedInProof
Serialized value not contained in proof.
NoBlockInResponse
No block in response.
UnexpectedBlockHash
Block hash requested does not correspond to response.
UnexpectedBlockHeight
Block height was not as requested.
InvalidGlobalStateResponse
An invalid combination of state identifier and block header response
Trait Implementations§
Source§impl Debug for ValidateResponseError
impl Debug for ValidateResponseError
Source§impl Display for ValidateResponseError
impl Display for ValidateResponseError
Source§impl Error for ValidateResponseError
impl Error for ValidateResponseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for ValidateResponseError
impl From<Error> for ValidateResponseError
Source§impl From<Error> for ValidateResponseError
impl From<Error> for ValidateResponseError
Source§impl From<ValidateResponseError> for Error
impl From<ValidateResponseError> for Error
Source§fn from(source: ValidateResponseError) -> Self
fn from(source: ValidateResponseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ValidateResponseError
impl !RefUnwindSafe for ValidateResponseError
impl Send for ValidateResponseError
impl Sync for ValidateResponseError
impl Unpin for ValidateResponseError
impl !UnwindSafe for ValidateResponseError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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