Expand description
bbolt-rs is an implementation of the etcd-io/bbolt database in Rust. It successfully reads and commits, but it has some limitations.
Features:
- Arena memory allocation per transaction
- Explicitly designed to prevent transaction dependant resources from escaping the transaction.
- RwLock based transactions
- File backed database
- Memory backed database
- Miri tested to prevent memory errors in unsafe blocks
- Simple and straightforward public APIs
Currently not supported:
- Tx.copy
- Most of the main application
- A variety of DB Options including
- no freelist sync
- file open timeout
- Panic handling during bench
§Feature flags
§Stable features
compat
— Enable working with Go Bolt databasesstrict
— Run database check after each commitlong-tests
— Run long teststest-mem-backend
— Run tests using the memory backend
§Experimental features
The following features are experimental
-
allgasnobrakes
— DisablesRefCell
runtime memory guarantees. No performance gain.⚠️Unit tests should prevent undefined behavior, but you’re on your own!
-
try-begin
— Enabletry
family of functions. Transactions wrapped inOption
instead of blocking
Modules§
Structs§
- Bolt
- The Bolt Database
- Bolt
Options - Database options
- Bolt
Options Builder - Builder for
BoltOptions
instances. - Bucket
Impl - Read-only Bucket
- Bucket
Iter - Bucket
Iter Mut - Bucket
RwImpl - Read/Write Bucket
- Bucket
Stats - BucketStats records statistics about resources used by a bucket.
- Cursor
Impl - Read-only Cursor
- Cursor
RwImpl - Read/Write Cursor
- DbInfo
- Database information
- DbStats
- Stats represents statistics about the database.
- Entry
Iter - Page
Info - PageInfo represents human-readable information about a page.
- PgId
- The Page ID. Page address =
PgId
* page_size - TxId
- The Transaction ID. Monotonic and incremented every commit
- TxImpl
- Read-only Transaction
- TxRef
- Read-only Transaction reference used in managed transactions
- TxRw
Impl - Read/Write Transaction
- TxRwRef
- Read/Write Transaction reference used in managed transactions
- TxStats
- Stats for the transaction
Enums§
Traits§
- Bucket
Api - Read-only Bucket API
- Bucket
RwApi - RW Bucket API
- Cursor
Api - Read-only Cursor API
- Cursor
RwApi - RW Bucket API
- DbApi
- Read-only DB API
- DbRwAPI
- RW DB API
- TxApi
- Read-only transaction API
- TxCheck
- Check performs several consistency checks on the database for this transaction. An error is returned if any inconsistency is found.
- TxRwApi
- RW transaction API + Commit
- TxRw
RefApi - RW transaction API