Struct mtbl::ReaderOptions [] [src]

pub struct ReaderOptions {
    pub verify_checksums: Option<bool>,
    pub madvise_random: Option<bool>,
}

MTBL Reader opening options.

Fields

Whether or not the CRC32C checksum on each data block should be verified or not. If verify_checksums is enabled, a checksum mismatch will cause a runtime error. The mtbl default is false.

Specifies whether the kernel should be advised if the data access patterns are expected to be random or not. This may hurt some workloads but help others. This defaults to false.

This option can be explicitly overridden by setting the environment variable MTBL_READER_MADVISE_RANDOM to the string "0" (force disable) or "1" (force enable).

This option only has any effect on systems that have the posix_madvise or madvise system calls.

Methods

impl ReaderOptions
[src]

Create a ReaderOptions containing only defaults.

Create a new options with verify_checksums set.

Create a new options with madvise_random set.

Open an MTBL reader with these options from a file described by the given path.

Open an MTBL reader with these options from a file object.

Trait Implementations

impl Clone for ReaderOptions
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for ReaderOptions
[src]