Module bonsaidb::core::key[][src]

Expand description

Key trait and related types.

Modules

Key implementations for time types.

Structs

An error occurred inside of one of the composite key fields.

An error that indicates an unexpected number of bytes were present.

An error that indicates an unexpected enum variant value was found.

Enums

The error types for Key::next_value().

Traits

Adds Key support to an enum. Requires implementing ToPrimitive and FromPrimitive, or using a crate like num-derive to do it automatically. Take care when using enums as keys: if the order changes or if the meaning of existing numerical values changes, make sure to update any related views’ version number to ensure the values are re-evaluated.

A type that can be used as a prefix range in range-based queries.

A trait that enables a type to convert itself into a memcmp-compatible sequence of bytes.

A trait that enables a type to convert itself into a memcmp-compatible sequence of bytes.

Functions

Decodes a value previously encoded using encode_composite_field(). The result is a tuple with the first element being the decoded value, and the second element is the remainig byte slice.

Encodes a value using the Key trait in such a way that multiple values can still be ordered at the byte level when chained together.