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.

Structs

FsStorage

Writes datastructures to a filesystem. Compressed and retrievable.

RamStorage

Stores anything in a BTreeMap

VByteDecoder

Iterator that decodes a bytestream to unsigned integers

Enums

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

Functions

vbyte_encode

Encode an usigned integer as a variable number of bytes

Type Definitions

Result

Aliases Result to Result for readability and maintainability