Struct mtbl::Reader [] [src]

pub struct Reader {
    pub options: ReaderOptions,
    // some fields omitted
}

A reader for a single MTBL file.

Reader uses a memory-mapped file and is immutable and entirely thread-safe.

To create a Reader with options other than the default, use ReaderOptions.

Fields

The options used to open this MTBL file.

Methods

impl Reader
[src]

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

Open an MTBL reader from a file object.

Metadata: Byte offset in the MTBL file where the index begins.

Metadata: Maximum size of an uncompressed data block, see mtbl_writer(3).

Metadata: One of the compression values allowed by mtbl_writer(3).

Metadata: Total number of key-value entries.

Metadata: Total number of data blocks.

Metadata: Total number of bytes consumed by data blocks.

Metadata: Total number of bytes consumed by the index.

Metadata: Total number of bytes that all keys would occupy if stored end-to-end in a byte array with no delimiters.

Metadata: Total number of bytes that all values in the file would occupy if stored end-to-end in a byte array with no delimiters.

Trait Implementations

impl Read for Reader
[src]

Get the internal mtbl_source pointer.

Get the value of a key, if it's present.

Get an iterator over all keys and values.

Get an iterator over all keys and values where the key starts with the given prefix.

Get an iterator over all keys and values, where the keys are between key0 and key1 (inclusive). Read more

impl<'a> IntoIterator for &'a Reader
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl Drop for Reader
[src]

A method called when the value goes out of scope. Read more

impl Send for Reader
[src]

Reader is thread-safe.

impl Sync for Reader
[src]

Reader is thread-safe.