Crate bbolt_rs

Source
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 databases
  • strict — Run database check after each commit
  • long-tests — Run long tests
  • test-mem-backend — Run tests using the memory backend

§Experimental features

The following features are experimental

  • allgasnobrakes — Disables RefCell runtime memory guarantees. No performance gain.

    ⚠️Unit tests should prevent undefined behavior, but you’re on your own!

  • try-begin — Enable try family of functions. Transactions wrapped in Option instead of blocking

Modules§

util

Structs§

Bolt
The Bolt Database
BoltOptions
Database options
BoltOptionsBuilder
Builder for BoltOptions instances.
BucketImpl
Read-only Bucket
BucketIter
BucketIterMut
BucketRwImpl
Read/Write Bucket
BucketStats
BucketStats records statistics about resources used by a bucket.
CursorImpl
Read-only Cursor
CursorRwImpl
Read/Write Cursor
DbInfo
Database information
DbStats
Stats represents statistics about the database.
EntryIter
PageInfo
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
TxRwImpl
Read/Write Transaction
TxRwRef
Read/Write Transaction reference used in managed transactions
TxStats
Stats for the transaction

Enums§

DbPath
Database path
Error
Bolt database errors

Traits§

BucketApi
Read-only Bucket API
BucketRwApi
RW Bucket API
CursorApi
Read-only Cursor API
CursorRwApi
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
TxRwRefApi
RW transaction API

Type Aliases§

Result