pub struct ServerHandshake { /* private fields */ }Available on crate features
server and ws only.Expand description
WS server handshake.
Implementations§
Source§impl ServerHandshake
impl ServerHandshake
Sourcepub fn new(request: IncomingRequest) -> Result<Self, Error>
pub fn new(request: IncomingRequest) -> Result<Self, Error>
Create a new handshake from a given incoming HTTP request.
Sourcepub fn complete(
self,
protocol: Option<&str>,
input_buffer_capacity: usize,
) -> (FutureServer, OutgoingResponse)
pub fn complete( self, protocol: Option<&str>, input_buffer_capacity: usize, ) -> (FutureServer, OutgoingResponse)
Complete the WS handshake.
The method will prepare an HTTP response for the client and indicate use of a given sub-protocol.
Auto Trait Implementations§
impl Freeze for ServerHandshake
impl RefUnwindSafe for ServerHandshake
impl Send for ServerHandshake
impl Sync for ServerHandshake
impl Unpin for ServerHandshake
impl UnsafeUnpin for ServerHandshake
impl UnwindSafe 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