Struct WithGracefulShutdown
#[must_use = "futures must be awaited or polled"]
pub struct WithGracefulShutdown<L, M, S, F> { /* private fields */ }
Serve future with graceful shutdown enabled.
Implementations
impl<L, M, S, F> WithGracefulShutdown<L, M, S, F>
where
L: Listener,
fn local_addr(&self) -> Result<L::Addr>Returns the local address this server is bound to.
Trait Implementations
impl<L, M, S, F> Debug for WithGracefulShutdown<L, M, S, F>
where
L: Debug + 'static,
M: Debug,
S: Debug,
F: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<L, M, S, F> IntoFuture for WithGracefulShutdown<L, M, S, F>
where
L: Listener,
L::Addr: Debug,
M: for<'a> Service<IncomingStream<'a, L>, Error = Infallible, Response = S> + Send + 'static,
for<'a> <M as Service<IncomingStream<'a, L>>>::Future: Send,
S: Service<Request, Response = Response, Error = Infallible> + Clone + Send + 'static,
S::Future: Send,
F: Future<Output = ()> + Send + 'static,
type Output = Result<(), Error>;type IntoFuture = ServeFuture;fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations
impl<L, M, S, F> Freeze for WithGracefulShutdown<L, M, S, F>
where
L: Freeze,
M: Freeze,
F: Freeze,
PhantomData<fn() -> S>: Freeze,
impl<L, M, S, F> RefUnwindSafe for WithGracefulShutdown<L, M, S, F>
where
L: RefUnwindSafe,
M: RefUnwindSafe,
F: RefUnwindSafe,
PhantomData<fn() -> S>: RefUnwindSafe,
impl<L, M, S, F> Send for WithGracefulShutdown<L, M, S, F>
where
L: Send,
M: Send,
F: Send,
PhantomData<fn() -> S>: Send,
impl<L, M, S, F> Sync for WithGracefulShutdown<L, M, S, F>
where
L: Sync,
M: Sync,
F: Sync,
PhantomData<fn() -> S>: Sync,
impl<L, M, S, F> Unpin for WithGracefulShutdown<L, M, S, F>
where
L: Unpin,
M: Unpin,
F: Unpin,
PhantomData<fn() -> S>: Unpin,
impl<L, M, S, F> UnsafeUnpin for WithGracefulShutdown<L, M, S, F>
where
L: UnsafeUnpin,
M: UnsafeUnpin,
F: UnsafeUnpin,
PhantomData<fn() -> S>: UnsafeUnpin,
impl<L, M, S, F> UnwindSafe for WithGracefulShutdown<L, M, S, F>
where
L: UnwindSafe,
M: UnwindSafe,
F: UnwindSafe,
PhantomData<fn() -> S>: UnwindSafe,
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for WithGracefulShutdown<L, M, S, F>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for WithGracefulShutdown<L, M, S, F>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for WithGracefulShutdown<L, M, S, F>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for WithGracefulShutdown<L, M, S, F>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for WithGracefulShutdown<L, M, S, F>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for WithGracefulShutdown<L, M, S, F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for WithGracefulShutdown<L, M, S, F>
impl<T> Read<Exclusive, BecauseExclusive> for WithGracefulShutdown<L, M, S, F>
where
T: ?Sized,
impl<T> Same for WithGracefulShutdown<L, M, S, F>
type Output = T;
impl<T> WithSubscriber for WithGracefulShutdown<L, M, S, F>
impl<T, U> Into<U> for WithGracefulShutdown<L, M, S, F>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for WithGracefulShutdown<L, M, S, F>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for WithGracefulShutdown<L, M, S, F>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip<V> for WithGracefulShutdown<L, M, S, F>
where
V: MultiLane<T>,
fn vzip(self) -> V