#[non_exhaustive]pub struct StreamOptions { /* private fields */ }Expand description
A read stream’s items and options (ReadStream).
How a ReadStream reads. depth: reads in flight, 1 to
MAX_DEPTH; lend: chunks its caller may hold at
once, at least 1. With neither set, the stream takes up to 8 of each
(fewer, and shallower, when fewer buffers are free under the pool’s
background cap); with either set, the other defaults to it and the
stream takes exactly depth + lend + 1 buffers or is refused. class:
IoClass::Background (the default: background_io requests, paced
while the device’s commits are active) or IoClass::Read (max_io
requests, unpaced: a foreground read its caller waits on).
Implementations§
Source§impl StreamOptions
impl StreamOptions
Sourcepub fn depth(self, depth: usize) -> StreamOptions
pub fn depth(self, depth: usize) -> StreamOptions
Reads in flight at most.
Sourcepub fn lend(self, lend: usize) -> StreamOptions
pub fn lend(self, lend: usize) -> StreamOptions
Chunks the caller may hold at once.
Sourcepub fn class(self, class: IoClass) -> StreamOptions
pub fn class(self, class: IoClass) -> StreamOptions
The class of its reads: Background or Read.
Trait Implementations§
Source§impl Clone for StreamOptions
impl Clone for StreamOptions
Source§fn clone(&self) -> StreamOptions
fn clone(&self) -> StreamOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StreamOptions
Source§impl Debug for StreamOptions
impl Debug for StreamOptions
Source§impl Default for StreamOptions
impl Default for StreamOptions
Source§fn default() -> StreamOptions
fn default() -> StreamOptions
Returns the “default value” for a type. Read more
impl Eq for StreamOptions
Source§impl PartialEq for StreamOptions
impl PartialEq for StreamOptions
impl StructuralPartialEq for StreamOptions
Auto Trait Implementations§
impl Forget for StreamOptions
impl Freeze for StreamOptions
impl Move 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