pub enum InitProtocolError<E: Debug + Send> {
Custom(E),
NotHandshake,
NotId,
WrongMagicNumber([u8; 7]),
WrongVersion([u32; 3]),
}
Expand description
All possible Errors that can happen during Handshake InitProtocol
Variants§
Custom(E)
NotHandshake
expected Handshake, didn’t get handshake
NotId
expected Id, didn’t get id
WrongMagicNumber([u8; 7])
WrongVersion([u32; 3])
Trait Implementations§
source§impl<E: Debug + Send> Error for InitProtocolError<E>
impl<E: Debug + Send> Error for InitProtocolError<E>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<E: Debug + Send> From<ProtocolError<E>> for InitProtocolError<E>
impl<E: Debug + Send> From<ProtocolError<E>> for InitProtocolError<E>
source§fn from(err: ProtocolError<E>) -> Self
fn from(err: ProtocolError<E>) -> Self
Converts to this type from the input type.
source§impl<E: PartialEq + Debug + Send> PartialEq for InitProtocolError<E>
impl<E: PartialEq + Debug + Send> PartialEq for InitProtocolError<E>
source§fn eq(&self, other: &InitProtocolError<E>) -> bool
fn eq(&self, other: &InitProtocolError<E>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<E: Eq + Debug + Send> Eq for InitProtocolError<E>
impl<E: Debug + Send> StructuralPartialEq for InitProtocolError<E>
Auto Trait Implementations§
impl<E> Freeze for InitProtocolError<E>where
E: Freeze,
impl<E> RefUnwindSafe for InitProtocolError<E>where
E: RefUnwindSafe,
impl<E> Send for InitProtocolError<E>
impl<E> Sync for InitProtocolError<E>where
E: Sync,
impl<E> Unpin for InitProtocolError<E>where
E: Unpin,
impl<E> UnwindSafe for InitProtocolError<E>where
E: UnwindSafe,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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