Module perlin::storage [] [src]

This module contains the trait Storage and implementations of it.

Storages are used by implementators of the Index trait to store and retrieve their sometimes complex and huge datastructures For small collections, a RamStorage will suffice. If the collections are larger than the size of RAM though, a different solution is needed.

To enable flexibility and perhaps even use case specific user implementations, this trait serves as an interface for Indices to be use. Current implementations are RamStorage for smaller collections that fit completely in RAM and FsStorage which writes and reads data from disk and thus allows the handling of much larger collections.

Modules

compression

This module currently provides utility methods and structs for variable byte codes as described in http://nlp.stanford.edu/IR-book/html/htmledition/variable-byte-codes-1.html.

Structs

FsStorage

Writes datastructures to a filesystem. Compressed and retrievable.

RamStorage

Stores anything in a Vector. Assumes the id is the index

Enums

DecodeError

Error kinds that can occur during a decoding operation

StorageError

Errors that can occur during retrieval or storage of a value

Traits

ByteDecodable

Defines a method that allows an object to be decoded from a variable number of bytes

ByteEncodable

Defines a method that allows an object to be encoded as a variable number of bytes

Storage

Defines a common interface between multiple storage types The index uses them to store data like the posting lists

Type Definitions

DecodeResult

Wraps the Result of a decoding operation

Result

Aliases Result to Result for readability and maintainability