pub struct RawHttpServer<H> { /* private fields */ }Expand description
Policy-bearing dispatcher used by the existing HTTP accept/parser loop.
Implementations§
Source§impl<H: RawHandler> RawHttpServer<H>
impl<H: RawHandler> RawHttpServer<H>
Sourcepub fn new(
handler: H,
limits: BodyLimits,
trailers: TrailersPolicy,
request_deadline: Duration,
) -> Result<Self>
pub fn new( handler: H, limits: BodyLimits, trailers: TrailersPolicy, request_deadline: Duration, ) -> Result<Self>
Creates a raw dispatcher. It deliberately does not create a listener or runtime.
Sourcepub fn serve(
&self,
connection: &mut dyn RawConnection,
caller: &Cancellation,
) -> Result<()>
pub fn serve( &self, connection: &mut dyn RawConnection, caller: &Cancellation, ) -> Result<()>
Dispatches one already parsed connection through a fresh request scope.
Auto Trait Implementations§
impl<H> !Freeze for RawHttpServer<H>
impl<H> RefUnwindSafe for RawHttpServer<H>where
H: RefUnwindSafe,
impl<H> Send for RawHttpServer<H>where
H: Send,
impl<H> Sync for RawHttpServer<H>where
H: Sync,
impl<H> Unpin for RawHttpServer<H>where
H: Unpin,
impl<H> UnsafeUnpin for RawHttpServer<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for RawHttpServer<H>where
H: UnwindSafe,
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