Struct SpawnReady

pub struct SpawnReady<S> { /* private fields */ }

Spawns tasks to drive an inner service to readiness.

See crate level documentation for more details.

Implementations

impl<S> SpawnReady<S>

const fn new(service: S) -> Self

Creates a new SpawnReady wrapping service.

fn layer() -> SpawnReadyLayer

Creates a layer that wraps services with SpawnReady.

Trait Implementations

impl<S> Drop for SpawnReady<S>

fn drop(&mut self)

impl<S, Req> Service<Req> for SpawnReady<S> where Req: 'static, S: Service<Req> + Send + 'static, S::Error: Into<BoxError>,

type Response = <S as Service<Req>>::Response;
type Error = Box<dyn Error + Sync + Send>;
type Future = ResponseFuture<<S as Service<Req>>::Future, <S as Service<Req>>::Error>;
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), BoxError>>
fn call(&mut self, request: Req) -> Self::Future

impl<S: Debug> Debug for SpawnReady<S>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Auto Trait Implementations

impl<S> Freeze for SpawnReady<S> where Inner<S>: Freeze,

impl<S> RefUnwindSafe for SpawnReady<S> where Inner<S>: RefUnwindSafe,

impl<S> Send for SpawnReady<S> where Inner<S>: Send,

impl<S> Sync for SpawnReady<S> where Inner<S>: Sync,

impl<S> Unpin for SpawnReady<S> where Inner<S>: Unpin,

impl<S> UnsafeUnpin for SpawnReady<S> where Inner<S>: UnsafeUnpin,

impl<S> UnwindSafe for SpawnReady<S> where Inner<S>: UnwindSafe,

Blanket Implementations

impl<C, Target> MakeConnection<Target> for SpawnReady<S> where C: Service<Target>, <C as Service<Target>>::Response: AsyncRead + AsyncWrite,

impl<M, S, Target, Request> MakeService<Target, Request> for SpawnReady<S> where M: Service<Target, Response = S>, S: Service<Request>,

impl<T> Any for SpawnReady<S> where T: 'static + ?Sized,

impl<T> Borrow<T> for SpawnReady<S> where T: ?Sized,

impl<T> BorrowMut<T> for SpawnReady<S> where T: ?Sized,

impl<T> From<T> for SpawnReady<S>

impl<T> Instrument for SpawnReady<S>

impl<T> WithSubscriber for SpawnReady<S>

impl<T, Request> ServiceExt<Request> for SpawnReady<S> where T: Service<Request> + ?Sized,

impl<T, U> Into<U> for SpawnReady<S> where U: From<T>,

impl<T, U> TryFrom<U> for SpawnReady<S> where U: Into<T>,

impl<T, U> TryInto<U> for SpawnReady<S> where U: TryFrom<T>,