#[non_exhaustive]pub enum HandshakeOutput {
Send(Vec<u8>),
Connected(NegotiatedParams),
Rejected(RejectionReason),
TimedOut,
}Expand description
An event produced by crate::caller::CallerHandshake::feed /
crate::caller::CallerHandshake::start /
crate::listener::ListenerHandshake::feed / either engine’s tick.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Send(Vec<u8>)
Send these bytes (one serialized Handshake control packet, built from
the existing crate::packet codecs) to the peer.
Connected(NegotiatedParams)
The handshake completed; here are the negotiated parameters.
Rejected(RejectionReason)
The handshake was rejected — either the peer sent back an explicit
RejectionReason, or a local validation check failed (in which
case a matching Send rejection packet is also emitted, in the same
output batch, for the Listener side).
TimedOut
No reply arrived after HandshakeConfig::max_retries
retransmissions.
Trait Implementations§
Source§impl Clone for HandshakeOutput
impl Clone for HandshakeOutput
Source§fn clone(&self) -> HandshakeOutput
fn clone(&self) -> HandshakeOutput
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 HandshakeOutput
impl Debug for HandshakeOutput
Source§impl PartialEq for HandshakeOutput
impl PartialEq for HandshakeOutput
Source§impl Serialize for HandshakeOutput
Available on crate feature serde only.
impl Serialize for HandshakeOutput
Available on crate feature
serde only.impl StructuralPartialEq for HandshakeOutput
Auto Trait Implementations§
impl Freeze for HandshakeOutput
impl RefUnwindSafe for HandshakeOutput
impl Send for HandshakeOutput
impl Sync for HandshakeOutput
impl Unpin for HandshakeOutput
impl UnsafeUnpin for HandshakeOutput
impl UnwindSafe for HandshakeOutput
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