pub struct Serve<M, S> { /* private fields */ }
Available on crate feature
tokio
and (crate features http1
or http2
) only.Expand description
Future returned by serve
.
Trait Implementations§
source§impl<M, S> IntoFuture for Serve<M, S>where
M: for<'a> Service<IncomingStream<'a>, Error = Infallible, Response = S> + Send + 'static,
for<'a> <M as Service<IncomingStream<'a>>>::Future: Send,
S: Service<Request, Response = Response, Error = Infallible> + Clone + Send + 'static,
S::Future: Send,
impl<M, S> IntoFuture for Serve<M, S>where M: for<'a> Service<IncomingStream<'a>, Error = Infallible, Response = S> + Send + 'static, for<'a> <M as Service<IncomingStream<'a>>>::Future: Send, S: Service<Request, Response = Response, Error = Infallible> + Clone + Send + 'static, S::Future: Send,
§type IntoFuture = ServeFuture
type IntoFuture = ServeFuture
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<M, S> RefUnwindSafe for Serve<M, S>where M: RefUnwindSafe, S: RefUnwindSafe,
impl<M, S> Send for Serve<M, S>where M: Send, S: Send,
impl<M, S> Sync for Serve<M, S>where M: Sync, S: Sync,
impl<M, S> Unpin for Serve<M, S>where M: Unpin, S: Unpin,
impl<M, S> UnwindSafe for Serve<M, S>where M: UnwindSafe, S: 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