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— DisablesRefCellruntime memory guarantees. No performance gain.⚠️Unit tests should prevent undefined behavior, but you’re on your own!
-
try-begin— Enabletryfamily of functions. Transactions wrapped inOptioninstead of blocking
Modules§
Structs§
- The Bolt Database
- Database options
- Builder for
BoltOptionsinstances. - Read-only Bucket
- Read/Write Bucket
- BucketStats records statistics about resources used by a bucket.
- Read-only Cursor
- Read/Write Cursor
- Database information
- Stats represents statistics about the database.
- PageInfo represents human-readable information about a page.
- The Page ID. Page address =
PgId* page_size - The Transaction ID. Monotonic and incremented every commit
- Read-only Transaction
- Read-only Transaction reference used in managed transactions
- Read/Write Transaction
- Read/Write Transaction reference used in managed transactions
- Stats for the transaction
Enums§
- Database path
- Bolt database errors
Traits§
- Read-only Bucket API
- RW Bucket API
- Read-only Cursor API
- RW Bucket API
- Read-only DB API
- RW DB API
- Read-only transaction API
- Check performs several consistency checks on the database for this transaction. An error is returned if any inconsistency is found.
- RW transaction API + Commit
- RW transaction API