pub(crate) struct Server<S: HttpService<B>, B> {
in_flight: Pin<Box<Option<S::Future>>>,
pub(crate) service: S,
}
Fields§
§in_flight: Pin<Box<Option<S::Future>>>
§service: S
Implementations§
source§impl<S, B> Server<S, B>where
S: HttpService<B>,
impl<S, B> Server<S, B>where
S: HttpService<B>,
pub(crate) fn new(service: S) -> Server<S, B>
pub(crate) fn into_service(self) -> S
Trait Implementations§
source§impl<S, Bs> Dispatch for Server<S, Body>
impl<S, Bs> Dispatch for Server<S, Body>
type PollItem = MessageHead<StatusCode>
type PollBody = Bs
type PollError = <S as HttpService<Body>>::Error
type RecvItem = MessageHead<RequestLine>
fn poll_msg( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<(Self::PollItem, Self::PollBody), Self::PollError>>>
fn recv_msg(&mut self, msg: Result<(Self::RecvItem, Body)>) -> Result<()>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), ()>>
fn should_poll(&self) -> bool
impl<S: HttpService<B>, B> Unpin for Server<S, B>
Auto Trait Implementations§
impl<S, B> Freeze for Server<S, B>where
S: Freeze,
impl<S, B> RefUnwindSafe for Server<S, B>
impl<S, B> Send for Server<S, B>
impl<S, B> Sync for Server<S, B>
impl<S, B> UnwindSafe for Server<S, B>
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