Expand description
BonsaiDb’s offline database implementation.
This crate exposes BonsaiDb’s local database implementation. The
Storage type provides its most common functionality by
implementing the StorageConnection.
§Minimum Supported Rust Version (MSRV)
While this project is alpha, we are actively adopting the current version of
Rust. The current minimum version is 1.70.
§Feature Flags
By default, the full feature is enabled.
- full: Enables all the flags below
- async: Enables async-compatible types
- cli: Enables the- clapstructures for embedding database management commands into your own command-line interface.
- encryption: Enables at-rest encryption.
- instrument: Enables instrumenting with- tracing.
- multiuser: Enables multi-user support.
- password-hashing: Enables the ability to use password authentication using Argon2.
- token-authentication: Enables the ability to authenticate using authentication tokens, which are similar to API keys.
Re-exports§
- pub use argon2;
- pub use bonsaidb_core as core;
Modules§
- cli
- Command-line interface helpers.
- config
- Configuration options.
- vault
- Encryption and secret management.
Structs§
- AsyncDatabase 
- A database stored in BonsaiDb. This type is designed for use with
Tokio. For blocking (non-asynchronous) code, see the
Databasetype instead.
- AsyncStorage 
- A file-based, multi-database, multi-user database engine. This type is
designed for use with Tokio. For blocking
(non-asynchronous) code, see the Storagetype instead.
- Database
- A database stored in BonsaiDb. This type blocks the current thread when
used. See AsyncDatabasefor this type’s async counterpart.
- Storage
- A file-based, multi-database, multi-user database engine. This type blocks
the current thread when used. See AsyncStoragefor this type’s async counterpart.
- StorageId 
- The unique id of a Storageinstance.
- Subscriber
- A subscriber for PubSubmessages.
Enums§
- Error
- Errors that can occur from interacting with storage.
Traits§
- BackupLocation 
- A location to store and restore a database from.
- DatabaseNonBlocking 
- Operations that can be performed on both DatabaseandAsyncDatabase.
- StorageNonBlocking 
- Functionality that is available on both StorageandAsyncStorage.