pub trait TimeoutSinkExt<I>: Sink<I> {
// Provided method
fn with_timeout(self, timeout: Duration) -> TimeoutSink<Self>
where Self: Sized { ... }
}Expand description
[futures::Sink] adaptor that adds timeout.
Provided Methods§
Sourcefn with_timeout(self, timeout: Duration) -> TimeoutSink<Self>where
Self: Sized,
fn with_timeout(self, timeout: Duration) -> TimeoutSink<Self>where
Self: Sized,
Attaches a timeout onto this [futures::Sink]’s poll_ready function.
The returned Sink will return an error if poll_ready does not
return within the given timeout.