pub trait ServiceExt<Request>: Service<Request> {
// Provided methods
fn ready(&mut self) -> Ready<'_, Self, Request> ⓘ
where Self: Sized { ... }
fn ready_and(&mut self) -> ReadyAnd<'_, Self, Request> ⓘ
where Self: Sized { ... }
fn ready_oneshot(self) -> ReadyOneshot<Self, Request> ⓘ
where Self: Sized { ... }
fn oneshot(self, req: Request) -> Oneshot<Self, Request> ⓘ
where Self: Sized { ... }
fn call_all<S>(self, reqs: S) -> CallAll<Self, S>
where Self: Sized,
Self::Error: Into<Error>,
S: Stream<Item = Request> { ... }
}
Expand description
An extension trait for Service
s that provides a variety of convenient
adapters
Provided Methods§
Sourcefn ready(&mut self) -> Ready<'_, Self, Request> ⓘwhere
Self: Sized,
👎Deprecated since 0.3.1: prefer ready_and
which yields the service
fn ready(&mut self) -> Ready<'_, Self, Request> ⓘwhere
Self: Sized,
ready_and
which yields the serviceResolves when the service is ready to accept a request.
Sourcefn ready_and(&mut self) -> ReadyAnd<'_, Self, Request> ⓘwhere
Self: Sized,
fn ready_and(&mut self) -> ReadyAnd<'_, Self, Request> ⓘwhere
Self: Sized,
Yields a mutable reference to the service when it is ready to accept a request.
Sourcefn ready_oneshot(self) -> ReadyOneshot<Self, Request> ⓘwhere
Self: Sized,
fn ready_oneshot(self) -> ReadyOneshot<Self, Request> ⓘwhere
Self: Sized,
Yields the service when it is ready to accept a request.
Sourcefn oneshot(self, req: Request) -> Oneshot<Self, Request> ⓘwhere
Self: Sized,
fn oneshot(self, req: Request) -> Oneshot<Self, Request> ⓘwhere
Self: Sized,
Consume this Service
, calling with the providing request once it is ready.