pub trait ServiceFutureExt<T>: Future<Output = Result<T, ServiceError>> + Sized {
// Provided method
fn timeout(
self,
duration: Duration,
) -> impl Future<Output = Result<T, ServiceError>> + Send
where Self: Send { ... }
}Expand description
Adds .timeout(duration) to service calls.
Provided Methods§
fn timeout(
self,
duration: Duration,
) -> impl Future<Output = Result<T, ServiceError>> + Sendwhere
Self: Send,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.