pub enum InitProtocolError<E>{
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 for InitProtocolError<E>
impl<E> Debug for InitProtocolError<E>
source§impl<E> Display for InitProtocolError<E>
impl<E> Display for InitProtocolError<E>
source§impl<E> Error for InitProtocolError<E>
impl<E> 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> From<ProtocolError<E>> for InitProtocolError<E>
impl<E> From<ProtocolError<E>> for InitProtocolError<E>
source§fn from(err: ProtocolError<E>) -> InitProtocolError<E>
fn from(err: ProtocolError<E>) -> InitProtocolError<E>
Converts to this type from the input type.
source§impl<E> PartialEq for InitProtocolError<E>
impl<E> 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 for InitProtocolError<E>
impl<E> 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
Compare self to
key
and return true
if they are equal.§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