pub struct TimeoutStream<S> { /* private fields */ }Expand description
Stream wrapper that yields timeout errors after a fixed duration.
Implementations§
Trait Implementations§
Source§impl<S: SymbolStream + Unpin> SymbolStream for TimeoutStream<S>
impl<S: SymbolStream + Unpin> SymbolStream for TimeoutStream<S>
Source§fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<AuthenticatedSymbol, StreamError>>>
fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<AuthenticatedSymbol, StreamError>>>
Receive the next symbol. Read more
Source§fn is_exhausted(&self) -> bool
fn is_exhausted(&self) -> bool
Check if the stream is exhausted.
Auto Trait Implementations§
impl<S> !Freeze for TimeoutStream<S>
impl<S> !RefUnwindSafe for TimeoutStream<S>
impl<S> Send for TimeoutStream<S>where
S: Send,
impl<S> !Sync for TimeoutStream<S>
impl<S> Unpin for TimeoutStream<S>where
S: Unpin,
impl<S> UnsafeUnpin for TimeoutStream<S>where
S: UnsafeUnpin,
impl<S> !UnwindSafe for TimeoutStream<S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<S> SymbolStreamExt for Swhere
S: SymbolStream + ?Sized,
impl<S> SymbolStreamExt for Swhere
S: SymbolStream + ?Sized,
Source§fn collect_to_set<'a>(
&'a mut self,
set: &'a mut SymbolSet,
) -> CollectToSetFuture<'a, Self> ⓘwhere
Self: Unpin,
fn collect_to_set<'a>(
&'a mut self,
set: &'a mut SymbolSet,
) -> CollectToSetFuture<'a, Self> ⓘwhere
Self: Unpin,
Collect all symbols into a SymbolSet.
Source§fn filter<F>(self, f: F) -> FilterStream<Self, F>
fn filter<F>(self, f: F) -> FilterStream<Self, F>
Filter symbols.
Source§fn for_block(
self,
sbn: u8,
) -> FilterStream<Self, Box<dyn FnMut(&AuthenticatedSymbol) -> bool + Send>>where
Self: Sized + 'static,
fn for_block(
self,
sbn: u8,
) -> FilterStream<Self, Box<dyn FnMut(&AuthenticatedSymbol) -> bool + Send>>where
Self: Sized + 'static,
Take only symbols for a specific block.
Source§fn timeout(self, duration: Duration) -> TimeoutStream<Self>where
Self: Sized,
fn timeout(self, duration: Duration) -> TimeoutStream<Self>where
Self: Sized,
Timeout on symbol reception.
Source§fn next_with_cancel<'a>(
&'a mut self,
cx: &'a Cx,
) -> NextWithCancelFuture<'a, Self> ⓘwhere
Self: Unpin,
fn next_with_cancel<'a>(
&'a mut self,
cx: &'a Cx,
) -> NextWithCancelFuture<'a, Self> ⓘwhere
Self: Unpin,
Receive the next symbol with cancellation support.