pub enum ParseErrors {
IsARemoteError((u32, RemoteError)),
DecodingFailed,
NotMessageType,
InvalidHeader,
}Expand description
Errors produced by parse_protocol_message
Variants§
IsARemoteError((u32, RemoteError))
Found a RemoteError message instead of the given type parameter
DecodingFailed
The bytes failed decoding into the given type
NotMessageType
It’s an error when the RpcMessageHeader has: RpcMessageTypes::Empty or
RpcMessageTypes::ServerReady as message_type in its identifier. These message types don’t have
a message itself, they come as a RpcMessageHeader
InvalidHeader
The function, first, tries to decode the bytes into RpcMessageHeader to get the message_type and message_number
If it fails, the bytes are fully invalid.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParseErrors
impl RefUnwindSafe for ParseErrors
impl Send for ParseErrors
impl Sync for ParseErrors
impl Unpin for ParseErrors
impl UnwindSafe for ParseErrors
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> 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