pub struct H1Connection<Transport> { /* private fields */ }Expand description
An HTTP/1.x connection on one transport.
Configure it with the with_* methods, then call run with a handler to serve
requests on it.
Implementations§
Source§impl<Transport> H1Connection<Transport>
impl<Transport> H1Connection<Transport>
Sourcepub fn new(context: Arc<HttpContext>, transport: Transport) -> Self
pub fn new(context: Arc<HttpContext>, transport: Transport) -> Self
An HTTP/1.x connection on transport, sharing context with the rest of the server.
Sourcepub fn with_initial_bytes(self, initial_bytes: Vec<u8>) -> Self
pub fn with_initial_bytes(self, initial_bytes: Vec<u8>) -> Self
Bytes already read from the transport, such as those read while checking for an HTTP/2 connection preface. They’re parsed as the start of the first request, before anything else is read.
Source§impl<Transport> H1Connection<Transport>
impl<Transport> H1Connection<Transport>
Trait Implementations§
Auto Trait Implementations§
impl<Transport> !RefUnwindSafe for H1Connection<Transport>
impl<Transport> !UnwindSafe for H1Connection<Transport>
impl<Transport> Freeze for H1Connection<Transport>where
Transport: Freeze,
impl<Transport> Send for H1Connection<Transport>where
Transport: Send,
impl<Transport> Sync for H1Connection<Transport>where
Transport: Sync,
impl<Transport> Unpin for H1Connection<Transport>where
Transport: Unpin,
impl<Transport> UnsafeUnpin for H1Connection<Transport>where
Transport: UnsafeUnpin,
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