Struct hyper::proto::h1::dispatch::Server

source ·
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>,

source

pub(crate) fn new(service: S) -> Server<S, B>

source

pub(crate) fn into_service(self) -> S

Trait Implementations§

source§

impl<S, Bs> Dispatch for Server<S, Body>where S: HttpService<Body, ResBody = Bs>, S::Error: Into<Box<dyn StdError + Send + Sync>>, Bs: HttpBody,

§

type PollItem = MessageHead<StatusCode>

§

type PollBody = Bs

§

type PollError = <S as HttpService<Body>>::Error

§

type RecvItem = MessageHead<RequestLine>

source§

fn poll_msg( self: Pin<&mut Self>, cx: &mut Context<'_> ) -> Poll<Option<Result<(Self::PollItem, Self::PollBody), Self::PollError>>>

source§

fn recv_msg(&mut self, msg: Result<(Self::RecvItem, Body)>) -> Result<()>

source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), ()>>

source§

fn should_poll(&self) -> bool

source§

impl<S: HttpService<B>, B> Unpin for Server<S, B>

Auto Trait Implementations§

§

impl<S, B> RefUnwindSafe for Server<S, B>where S: RefUnwindSafe, <S as HttpService<B>>::Future: RefUnwindSafe,

§

impl<S, B> Send for Server<S, B>where S: Send, <S as HttpService<B>>::Future: Send,

§

impl<S, B> Sync for Server<S, B>where S: Sync, <S as HttpService<B>>::Future: Sync,

§

impl<S, B> UnwindSafe for Server<S, B>where S: UnwindSafe, <S as HttpService<B>>::Future: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more