pub enum HandshakeError {
Io(String),
MalformedPacket(String),
UnexpectedTag {
expected: u8,
actual: u8,
},
BadStatus(String),
IncompatibleFlags {
local: DistributionFlags,
remote: DistributionFlags,
required: DistributionFlags,
negotiated: DistributionFlags,
},
DigestMismatch,
Timeout,
}Expand description
Distribution handshake failures.
Variants§
Io(String)
Underlying stream I/O failed.
MalformedPacket(String)
A packet was structurally invalid.
UnexpectedTag
A packet carried the wrong tag for the current handshake step.
BadStatus(String)
The responder returned a non-success status.
IncompatibleFlags
The peer does not share the minimum required distribution flags.
Fields
§
local: DistributionFlags§
remote: DistributionFlags§
required: DistributionFlags§
negotiated: DistributionFlagsDigestMismatch
The MD5 challenge response or challenge ack did not match the cookie.
Timeout
The handshake did not complete within its whole-handshake deadline.
A stalled or malicious peer can leave a handshake read awaiting bytes that
never arrive; the connection manager bounds the whole exchange so the
outbound connect always returns and the accept-side responder task can
never park forever (DISTRIBUTION-HANDSHAKE-DESIGN.md HS-1).
Trait Implementations§
Source§impl Clone for HandshakeError
impl Clone for HandshakeError
Source§fn clone(&self) -> HandshakeError
fn clone(&self) -> HandshakeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HandshakeError
impl Debug for HandshakeError
Source§impl Display for HandshakeError
impl Display for HandshakeError
impl Eq 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()
Source§impl From<Error> for HandshakeError
impl From<Error> for HandshakeError
Source§impl PartialEq for HandshakeError
impl PartialEq for HandshakeError
impl StructuralPartialEq for HandshakeError
Auto Trait Implementations§
impl Freeze for HandshakeError
impl RefUnwindSafe for HandshakeError
impl Send for HandshakeError
impl Sync for HandshakeError
impl Unpin for HandshakeError
impl UnsafeUnpin for HandshakeError
impl UnwindSafe for HandshakeError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.