pub struct Upgraded {
pub reader: Box<dyn AsyncRead + Send + Unpin>,
pub writer: Box<dyn AsyncWrite + Send + Unpin>,
pub buffered: Vec<u8>,
}Expand description
The socket, after HTTP is finished with it.
Boxed so the upgraded protocol does not have to name the concrete stream type, which differs between a plain and (later) a TLS connection.
Fields§
§reader: Box<dyn AsyncRead + Send + Unpin>§writer: Box<dyn AsyncWrite + Send + Unpin>§buffered: Vec<u8>Bytes the client sent after the request but before the upgrade completed. Dropping these loses the first frame.
Auto Trait Implementations§
impl !RefUnwindSafe for Upgraded
impl !Sync for Upgraded
impl !UnwindSafe for Upgraded
impl Freeze for Upgraded
impl Send for Upgraded
impl Unpin for Upgraded
impl UnsafeUnpin for Upgraded
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