Trait tower_util::ServiceExt [−][src]
An extension trait for Service
s that provides a variety of convenient
adapters
Provided methods
fn ready(&mut self) -> Ready<'_, Self, Request>ⓘ where
Self: Sized,
[src]
Self: Sized,
👎 Deprecated since 0.3.1:
prefer ready_and
which yields the service
Resolves when the service is ready to accept a request.
fn ready_and(&mut self) -> ReadyAnd<'_, Self, Request>ⓘ where
Self: Sized,
[src]
Self: Sized,
Yields a mutable reference to the service when it is ready to accept a request.
fn ready_oneshot(self) -> ReadyOneshot<Self, Request>ⓘNotable traits for ReadyOneshot<T, Request>
impl<T, Request> Future for ReadyOneshot<T, Request> where
T: Service<Request>, type Output = Result<T, T::Error>;
where
Self: Sized,
[src]
Notable traits for ReadyOneshot<T, Request>
impl<T, Request> Future for ReadyOneshot<T, Request> where
T: Service<Request>, type Output = Result<T, T::Error>;
Self: Sized,
Yields the service when it is ready to accept a request.
fn oneshot(self, req: Request) -> Oneshot<Self, Request>ⓘ where
Self: Sized,
[src]
Self: Sized,
Consume this Service
, calling with the providing request once it is ready.
fn call_all<S>(self, reqs: S) -> CallAll<Self, S> where
Self: Sized,
Self::Error: Into<Error>,
S: Stream<Item = Request>,
[src]
Self: Sized,
Self::Error: Into<Error>,
S: Stream<Item = Request>,
Process all requests from the given Stream
, and produce a Stream
of their responses.
This is essentially Stream<Item = Request>
+ Self
=> Stream<Item = Response>
. See the
documentation for CallAll
for details.
Implementors
impl<T: ?Sized, Request> ServiceExt<Request> for T where
T: Service<Request>,
[src]
T: Service<Request>,