Enum SnapProtocolError
pub enum SnapProtocolError {
Empty,
UnsupportedMessageId(u8, SnapVersion),
Rlp(Error),
UnsolicitedResponse {
message_id: SnapMessageId,
request_id: u64,
},
ResponseExceedsRequest {
message_id: SnapMessageId,
request_id: u64,
max_items: usize,
},
}Expand description
Error decoding an inbound snap protocol message from its framed bytes, or matching a response
to its request.
Variants§
Empty
The payload was empty and carried no message id.
UnsupportedMessageId(u8, SnapVersion)
The message id is not valid for the negotiated snap version (e.g. the removed trie-node
messages 0x06/0x07 under snap/2).
Rlp(Error)
Decoding the RLP message body failed.
UnsolicitedResponse
The response answers no request sent on this connection.
The response is rejected before its body is decoded.
Fields
message_id: SnapMessageIdThe message id of the response.
ResponseExceedsRequest
A list in the response is longer than its request allows: more entries than requested, or more range proof nodes than two boundary paths can hold.
The response is rejected before its body is decoded.
Trait Implementations§
§impl Debug for SnapProtocolError
impl Debug for SnapProtocolError
§impl Display for SnapProtocolError
impl Display for SnapProtocolError
§impl Error for SnapProtocolError
impl Error for SnapProtocolError
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
§impl From<Error> for SnapProtocolError
impl From<Error> for SnapProtocolError
§fn from(source: Error) -> SnapProtocolError
fn from(source: Error) -> SnapProtocolError
Source§impl From<SnapProtocolError> for EthStreamError
impl From<SnapProtocolError> for EthStreamError
Source§fn from(source: SnapProtocolError) -> Self
fn from(source: SnapProtocolError) -> Self
Auto Trait Implementations§
impl Freeze for SnapProtocolError
impl RefUnwindSafe for SnapProtocolError
impl Send for SnapProtocolError
impl Sync for SnapProtocolError
impl Unpin for SnapProtocolError
impl UnsafeUnpin for SnapProtocolError
impl UnwindSafe for SnapProtocolError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Empty: 0 bytesUnsupportedMessageId: 2 bytesRlp: 31 bytesUnsolicitedResponse: 15 bytesResponseExceedsRequest: 23 bytes