pub trait ServiceRef<IO>: Sealed<IO> {
type Future: Future<Output = Result<Self::Response, Self::Error>>;
type Response;
type Error;
// Required methods
fn poll_ready(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>;
fn call(&mut self, stream: &IO) -> Self::Future;
}Expand description
A tower::Service which takes a reference to a conenction type,
usually in a “make service” context. Effectively this is Service<&IO>,
but gets around the limitations of an impl with lifetimes.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".