[−][src]Trait tower::util::ServiceExt
An extension trait for Service
s that provides a variety of convenient
adapters
Provided methods
fn ready(self) -> Ready<Self, Request> where
Self: Sized,
Self: Sized,
A future yielding the service when it is ready to accept a request.
fn oneshot(self, req: Request) -> Oneshot<Self, Request> where
Self: Sized,
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<Box<dyn Error + Send + Sync>>,
S: Stream<Item = Request>,
S::Error: Into<Box<dyn Error + Send + Sync>>,
Self: Sized,
Self::Error: Into<Box<dyn Error + Send + Sync>>,
S: Stream<Item = Request>,
S::Error: Into<Box<dyn Error + Send + Sync>>,
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>,
fn ready(self) -> Ready<Self, Request> where
Self: Sized,
[src]
Self: Sized,
fn oneshot(self, req: Request) -> Oneshot<Self, Request> where
Self: Sized,
[src]
Self: Sized,
fn call_all<S>(self, reqs: S) -> CallAll<Self, S> where
Self: Sized,
Self::Error: Into<Box<dyn Error + Send + Sync>>,
S: Stream<Item = Request>,
S::Error: Into<Box<dyn Error + Send + Sync>>,
[src]
Self: Sized,
Self::Error: Into<Box<dyn Error + Send + Sync>>,
S: Stream<Item = Request>,
S::Error: Into<Box<dyn Error + Send + Sync>>,