Enum ordbog::Mode[][src]

pub enum Mode {
    Byte,
    Word,
}
Expand description

Indicates whether to build a small Dict of up to 255 values or a larger one of up to 65535 values.

Variants

Byte

Build a Dict with up to 255 codes ranging over [1,255]. This mode is most appropriate when building a sketch that elides accesses to smaller underlying storage blocks like 64-byte cache lines, where the small repertoire of codes (and thus higher per-element chance of a false positive) is offset by the small size of each storage block (and thus small number of elements).

Word

Build a Dict with up to 65535 codes ranging over [1,65535]. This mode is most appropriate when building a sketch that elides access to larger underlying storage blocks like 4096-byte pages, where the larger number of elements per storage block demands a comparatively low false positive probability per element.

Implementations

Returns the count of exact codes in the mode: either 127 for Mode::Byte or 32767 for Mode::Word.

Returns the maximum exact code in the mode: either 0xfe for Mode::Byte or 0xfffe for Mode::Word.

Returns the maximum inexact code in the mode: either 0xff for Mode::Byte or 0xffff for Mode::Word.

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

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

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

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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.

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)

recently added

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.