pub enum HandshakeError {
Transport(ConnectError),
OpenStream(ConnectionError),
Write(WriteError),
Read(ReadError),
StreamClosed,
Timeout,
Encode(EncodeFrameError),
Decode(DecodeFrameError),
UnexpectedFrameType(ParseHelloError),
SignatureInvalid(VerifyError),
Refused {
refusal_code: Option<i128>,
},
}Variants§
Transport(ConnectError)
OpenStream(ConnectionError)
Write(WriteError)
Read(ReadError)
StreamClosed
The peer closed the stream before a complete frame arrived.
Timeout
Encode(EncodeFrameError)
Decode(DecodeFrameError)
UnexpectedFrameType(ParseHelloError)
Received a frame, but it wasn’t a HELLO — a station is never expected to send anything else at this point in the handshake.
SignatureInvalid(VerifyError)
The HELLO frame’s own signature didn’t verify against the node_id it claims — proves nothing about who actually sent it.
Refused
The station completed the handshake but refused the connection
(accepted = false), e.g. a puzzle-invalid or unrecognized
identity.
Trait Implementations§
Source§impl Debug for HandshakeError
impl Debug for HandshakeError
Source§impl Display for HandshakeError
impl Display for HandshakeError
Source§impl Error for HandshakeError
impl Error for HandshakeError
1.30.0 · 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()
Auto Trait Implementations§
impl !Freeze for HandshakeError
impl !RefUnwindSafe for HandshakeError
impl !UnwindSafe for HandshakeError
impl Send for HandshakeError
impl Sync for HandshakeError
impl Unpin for HandshakeError
impl UnsafeUnpin for HandshakeError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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