Enum awc::ConnectResponse
source · pub enum ConnectResponse {
Client(ClientResponse),
Tunnel(ResponseHead, Framed<BoxedSocket, ClientCodec>),
}
Expand description
Combined HTTP response & WebSocket tunnel type returned from connection service.
Variants§
Client(ClientResponse)
Standard HTTP response.
Tunnel(ResponseHead, Framed<BoxedSocket, ClientCodec>)
Tunnel used for WebSocket communication.
Contains response head and framed HTTP/1.1 codec.
Implementations§
source§impl ConnectResponse
impl ConnectResponse
sourcepub fn into_client_response(self) -> ClientResponse
pub fn into_client_response(self) -> ClientResponse
sourcepub fn into_tunnel_response(
self
) -> (ResponseHead, Framed<BoxedSocket, ClientCodec>)
pub fn into_tunnel_response( self ) -> (ResponseHead, Framed<BoxedSocket, ClientCodec>)
Auto Trait Implementations§
impl !Freeze for ConnectResponse
impl !RefUnwindSafe for ConnectResponse
impl !Send for ConnectResponse
impl !Sync for ConnectResponse
impl Unpin for ConnectResponse
impl !UnwindSafe for ConnectResponse
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