Struct banyan::Config[][src]

pub struct Config {
    pub max_summary_branches: usize,
    pub max_key_branches: usize,
    pub max_leaf_count: usize,
    pub target_leaf_size: usize,
    pub max_uncompressed_leaf_size: usize,
    pub zstd_level: i32,
}
Expand description

Configuration for a forest. Includes settings for when a node is considered full

Fields

max_summary_branches: usize

maximum number of children in a level>1 branch that contains summaries

max_key_branches: usize

maximum number of children in a level 1 branch that contains key sequences

max_leaf_count: usize

maximum number of values in a level 0 leaf that contains value sequences

target_leaf_size: usize

rough maximum compressed bytes of a leaf. If a node has more bytes than this, it is considered full.

note that this might overshoot due to the fact that the zstd encoder has internal state, and it is not possible to flush after each value without losing compression efficiency. The overshoot is bounded though.

max_uncompressed_leaf_size: usize

Maximum uncompressed size of leafs. This is limited to prevent accidentally creating decompression bombs.

zstd_level: i32

zstd level to use for compression

Implementations

config that will produce complex tree structures with few values

keys are hardcoded to 0

config that will produce efficient trees

predicate to determine if a branch is sealed, based on the config

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

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Scrape the references from an impl Read. Read more

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more