#[non_exhaustive]pub enum ServerHandshake {
NeedsInput(NeedsInput),
Accepted(Accepted),
Complete(ServerConnection),
}Expand description
An in-progress TLS server handshake.
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.
NeedsInput(NeedsInput)
More data needs to be received to make progress.
Accepted(Accepted)
A complete ClientHello has been received.
The handshake can be progressed by choosing a ServerConfig based on
Accepted::client_hello() and providing it to Accepted::choose_config().
Complete(ServerConnection)
The handshake is complete.
Implementations§
Source§impl ServerHandshake
impl ServerHandshake
Sourcepub fn start(version: Version) -> NeedsInput
pub fn start(version: Version) -> NeedsInput
Creates a new QUIC ServerHandshake via the payload of the ServerHandshake::NeedsInput variant.
It is a fundamental fact of server TLS connections that the server reads first; this is reflected in the returned type.
You may wrap this in the ServerHandshake::NeedsInput variant to generalise the type to a
ServerHandshake.
The returned object should be fed data from a single potential client.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ServerHandshake
impl !UnwindSafe for ServerHandshake
impl Freeze for ServerHandshake
impl Send for ServerHandshake
impl Sync for ServerHandshake
impl Unpin for ServerHandshake
impl UnsafeUnpin for ServerHandshake
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