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: GrowthStrategyspawn_finaliser: Finaliseruse_backing: boollength_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.

Convert this configuration into a TxCatcher with a custom transform.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Applies the Compat adapter by value. Read more

Applies the Compat adapter by shared reference. Read more

Applies the Compat adapter by mutable reference. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.