Skip to main content

Module common

Module common 

Source
Expand description

§Common Components

This module provides common components and utilities used throughout the vsdb crate. It re-exports items from vsdb_core::common and includes the ende module for encoding and decoding traits.

Modules§

ende
A module for encoding and decoding traits.
macros

Structs§

VsDB
A struct representing the VsDB database.

Constants§

BIGGEST_RESERVED_ID
The biggest reserved ID.
GB
A constant representing 1 gigabyte in bytes.
KB
A constant representing 1 kilobyte in bytes.
MB
A constant representing 1 megabyte in bytes.
NULL
A constant representing a null or empty byte slice.
PREFIX_SIZE
The size of a prefix in bytes.

Statics§

VSDB
The global instance of the VsDB database.

Traits§

BatchTrait
Trait for batch write operations

Functions§

vsdb_flush
Flushes all data to disk.
vsdb_get_base_dir
Returns the base directory path for VSDB.
vsdb_get_custom_dir
Returns the custom directory path for VSDB.
vsdb_set_base_dir
Sets the base directory path for VSDB manually.

Type Aliases§

Pre
A type alias for a prefix, represented as a u64.
PreBytes
A type alias for a prefix represented as a byte array.
RawBytes
A type alias for a vector of bytes, commonly used for raw data.
RawKey
A type alias for a raw key, represented as a vector of bytes.
RawValue
A type alias for a raw value, represented as a vector of bytes.