pub enum HandshakeResponse {
Success(ServerHello, Session, Option<Vec<u8>>),
Retry(HelloRetryRequest),
Reject(ServerReject),
Fail(HandshakeError),
}Expand description
Server response to ClientHello
Variants§
Success(ServerHello, Session, Option<Vec<u8>>)
Success: the ServerHello to send back, the established Session,
and the decrypted 0-RTT early-data plaintext (None when the client
sent none or it was rejected — ServerHello.early_data_accepted
carries the verdict the client sees).
Retry(HelloRetryRequest)
Retry: Demand PoW or Cookie
Reject(ServerReject)
Reject: the server structurally cannot speak this ClientHello (e.g. an
unknown version). Unlike Fail, the listener serialises the carried
ServerReject back to the client before closing, so the peer gets a
typed downgrade signal instead of a bare connection error.
Fail(HandshakeError)
Fail: Handshake aborted
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HandshakeResponse
impl !RefUnwindSafe for HandshakeResponse
impl !UnwindSafe for HandshakeResponse
impl Send for HandshakeResponse
impl Sync for HandshakeResponse
impl Unpin for HandshakeResponse
impl UnsafeUnpin for HandshakeResponse
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