Struct Serve
struct Serve<L, M, S> { ... }
Future returned by serve.
Implementations
impl<L, M, S> Serve<L, M, S>
fn with_graceful_shutdown<F>(self: Self, signal: F) -> WithGracefulShutdown<L, M, S, F> where F: Future<Output = ()> + Send + 'staticPrepares a server to handle graceful shutdown when the provided future completes.
Example
use ; # async ; asyncReturn Value
Similarly to
serve, although this future resolves toio::Result<()>, it will never error. It returnsOk(())only after thesignalfuture completes.fn local_addr(self: &Self) -> io::Result<<L as >::Addr>Returns the local address this server is bound to.
impl<L, M, S> Debug for Serve<L, M, S>
fn fmt(self: &Self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
impl<L, M, S> Freeze for Serve<L, M, S>
impl<L, M, S> IntoFuture for Serve<L, M, S>
fn into_future(self: Self) -> <Self as >::IntoFuture
impl<L, M, S> RefUnwindSafe for Serve<L, M, S>
impl<L, M, S> Send for Serve<L, M, S>
impl<L, M, S> Sync for Serve<L, M, S>
impl<L, M, S> Unpin for Serve<L, M, S>
impl<L, M, S> UnwindSafe for Serve<L, M, S>
impl<T> Any for Serve<L, M, S>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Serve<L, M, S>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Serve<L, M, S>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Serve<L, M, S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Serve<L, M, S>
impl<T> Same for Serve<L, M, S>
impl<T> WithSubscriber for Serve<L, M, S>
impl<T, U> Into for Serve<L, M, S>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Serve<L, M, S>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Serve<L, M, S>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip for Serve<L, M, S>
fn vzip(self: Self) -> V