pub struct ReadStreamOptions {
pub polling_interval: Option<Duration>,
pub timeout: Option<Duration>,
}Expand description
How a stream read waits: how often it looks, and how long it waits for each value.
Constructed with ..Default::default(), as SendOptions is. Where the
read starts is an argument rather than an option: read_stream starts at the beginning,
read_stream_from at an offset, and read_stream_value reads exactly one.
Fields§
§polling_interval: Option<Duration>How often to look again while waiting, if nothing wakes the reader sooner. None is
DEFAULT_STREAM_POLLING_INTERVAL; anything under MIN_STREAM_POLLING_INTERVAL is
refused.
timeout: Option<Duration>How long to wait for each value, or None to wait as long as the producer runs.
The clock restarts every time a value is delivered. Expiry is Error::StreamTimeout.
Trait Implementations§
Source§impl Clone for ReadStreamOptions
impl Clone for ReadStreamOptions
impl Copy for ReadStreamOptions
Source§impl Debug for ReadStreamOptions
impl Debug for ReadStreamOptions
Source§impl Default for ReadStreamOptions
impl Default for ReadStreamOptions
impl Eq for ReadStreamOptions
Source§impl PartialEq for ReadStreamOptions
impl PartialEq for ReadStreamOptions
impl StructuralPartialEq for ReadStreamOptions
Auto Trait Implementations§
impl Forget for ReadStreamOptions
impl Freeze for ReadStreamOptions
impl RefUnwindSafe for ReadStreamOptions
impl Send for ReadStreamOptions
impl Sync for ReadStreamOptions
impl Unpin for ReadStreamOptions
impl UnsafeUnpin for ReadStreamOptions
impl UnwindSafe for ReadStreamOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more