TimeoutSinkExt

Trait TimeoutSinkExt 

Source
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§

Source

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.

Implementors§

Source§

impl<T, I> TimeoutSinkExt<I> for T
where T: Sink<I> + ?Sized,