pub struct StreamOptions {
pub offset: u64,
pub reconnect: bool,
pub max_reconnects: u32,
pub error_on_gap: bool,
pub idle_timeout: Duration,
}Expand description
How a stream should behave. See ExecHandle::stream_with.
Fields§
§offset: u64The byte to start at. Non-zero resumes a stream a previous process was reading.
reconnect: boolWhether to reconnect after a cut. false ends the stream at the cut instead,
which is what a caller doing its own reconnection wants.
max_reconnects: u32How many reconnects before giving up. A bound rather than forever, because a stream that drops every time is a condition a caller needs reported.
error_on_gap: boolTurns a gap into an error instead of an event. What a caller that must have
complete output wants.
idle_timeout: DurationHow long the body may be silent before the connection is treated as dead.
Trait Implementations§
Source§impl Clone for StreamOptions
impl Clone for StreamOptions
Source§impl Debug for StreamOptions
impl Debug for StreamOptions
Auto Trait Implementations§
impl Freeze for StreamOptions
impl RefUnwindSafe for StreamOptions
impl Send for StreamOptions
impl Sync for StreamOptions
impl Unpin for StreamOptions
impl UnsafeUnpin for StreamOptions
impl UnwindSafe for StreamOptions
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