Crates.io | bitcoinleveldb-key |
lib.rs | bitcoinleveldb-key |
version | 0.1.16-alpha.0 |
source | src |
created_at | 2023-01-18 05:37:22.539968 |
updated_at | 2023-03-31 09:25:27.015763 |
description | keys and values |
homepage | |
repository | https://github.com/klebz/bitcoin-rs |
max_upload_size | |
id | 761524 |
size | 123,551 |
This Rust crate is a direct translation of the Bitcoin Core C++ codebase for the key-related components used in LevelDB.
Notice: This crate is part of a direct translation from C++ to Rust of the bitcoin core. As such, some of the function bodies may still be in the process of translation. Please note that this system will become testable once the translation process is complete.
This is an internal filter policy used in LevelDB.
This is an internal key used for sorting keys in LevelDB.
This is an internal comparator used for sorting internal keys in LevelDB.
This is a map of key-value pairs used in LevelDB.
This is a constant iterator for a key-value map used in LevelDB.
This is a lookup key used for searching in LevelDB.
This is a parsed internal key used for sorting internal keys in LevelDB.
This is a sequence number used in LevelDB.
This is a comparator used for sorting internal keys in LevelDB.
This is the value type used in LevelDB.
This is a logical AND operator used in LevelDB.
This function is used to append an internal key to a buffer.
This function is used to clear an internal key.
This function is used to compare two slices.
This function is used to compare two internal keys.
This function is used to compare two slices.
This function is used to create a filter.
This function is used to create a debug string for an internal key.
This function is used to decode an internal key from a slice.
This function is used to create a default internal key comparator.
This function is used to drop an internal key.
This function is used to encode an internal key to a buffer.
This function is used to extract the user key from an internal key.
This function is used to find the shortest separator for two internal keys.
This function is used to find the short successor for an internal key.
This function is used to create an internal key.
This function is used to compute the encoding length of an internal key.
This function is used to invoke an internal key.
This function is used to determine if a value type is valid.
This function is is used to create a key.
This function is used to determine if a key may match a filter.
This function is used to create a memtable key.
This function is used to get the name of an internal filter policy.
This function is used to pack a sequence number and a value type.
This function is used to parse an internal key from a slice.
This function is used to set the value of an internal key.
This function is used to get the user comparator from an internal key.
This function is used to get the user key from an internal key.
This function is used to create a value.
This is a test suite for formatting keys in LevelDB.
This is the main test function for formatting keys in LevelDB.
34> how does this interface apply to leveldb?
The bitcoinleveldb-key
crate provides Rust
implementations of data structures and functions
used in the LevelDB key-value store. Specifically,
it includes implementations of internal keys,
parsed internal keys, and lookup keys used for
accessing data in LevelDB. These structures are
used to represent and manipulate keys and values
stored in the database, as well as to define
ordering and comparison functions used to sort
keys in the database.
The InternalKey
struct represents a key stored
in the database, and contains both user data (the
user key) as well as metadata used by LevelDB
(such as a sequence number and value type). The
ParsedInternalKey
struct is used to parse an
InternalKey
into its constituent parts,
including the user key, sequence number, and value
type. LookupKey
is a convenience struct that
wraps an InternalKey
and provides methods for
efficiently searching the database for a key.
The InternalKeyComparator
struct provides
a comparison function for InternalKey
objects
that takes into account their sequence numbers and
value types. The TLLessThan
struct provides
a comparison function for user keys that ignores
any sequence numbers or value types.
The create_filter
function generates a bloom
filter from a set of keys, which can be used to
efficiently test whether a key exists in the
database without having to do a disk lookup.
Overall, these data structures and functions form the backbone of the LevelDB database, allowing for efficient storage and retrieval of key-value pairs.