Struct streamcatcher::Config [−][src]
pub struct Config {
pub chunk_size: GrowthStrategy,
pub spawn_finaliser: Finaliser,
pub use_backing: bool,
pub length_hint: Option<usize>,
pub read_burst_len: usize,
}
Expand description
Options controlling backing store allocation, finalisation, and so on.
Fields
chunk_size: GrowthStrategy
spawn_finaliser: Finaliser
use_backing: bool
length_hint: Option<usize>
read_burst_len: usize
Implementations
The amount of bytes to allocate whenever more space is required to store the stream.
A larger value is generally preferred for minimising locking and allocations, but may reserve too much space before the struct is finalised.
Defaults to Constant(4096)
. Start be larger than the transform’s minimum chunk size.
Allocate a single contiguous backing store to speed up reads after the stream ends.
Defaults to true
.
Spawn a new thread/task to move contents of the rope into backing storage once a stream completes.
Disabling this may negatively impact performance of the final read in a stream.
Defaults to Finaliser::NewThread
.
Estimate for the amount of data required to store the completed stream.
On None
, this will be set to chunk_size
.
Defaults to None
.
The minimum size of reads to attempt from the input stream, if possible.
Defaults to 4096
.
Convert this configuration into a standard Catcher.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more