Struct mtbl::Fileset [] [src]

pub struct Fileset {
    pub options: FilesetOptions,
    // some fields omitted
}

An MTBL reader that watches a "setfile" containing a list of MTBL files to read from.

It acts like a Merger that watches that setfile for updates to a list of MTBL files. Note that paths in the setfile are relative paths from the directory of the setfile.

Filesets are not thread-safe because reloading, which happens automatically when reading, is not thread-safe--so only one thread can read from a Fileset.

To create a Fileset with non-default options, see FilesetOptions.

Examples

$ cp my-data.mtbl /tmp/my-data.mtbl
$ echo "my-data.mtbl" >> /tmp/fs.mtbl-fileset
...
let fileset = Fileset::open_from_path("/tmp/fs.mtbl-fileset", my_merge_fn);Run

Fields

The options used to open this Fileset.

Methods

impl Fileset
[src]

Open a Fileset from a path. Note that you must include a MergeFn to combine colliding entries (entries that have the same key).

Reload the list of MTBL files (ignored if less than the configured reload interval has passed).

Trait Implementations

impl Read for Fileset
[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 Fileset
[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 Fileset
[src]

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