Expand description
BonsaiDb’s networked database implementation.
This crate implements BonsaiDb’s networked database implementation. The
Server and CustomServer<Backend>
types provide their most common functionality by implementing the
StorageConnection.
This crate supports two methods for exposing a BonsaiDb server: QUIC and WebSockets.
QUIC is a new protocol built atop UDP. It is designed to operate more reliably than TCP, and features TLS built-in at the protocol level. WebSockets are an established protocol built atop TCP and HTTP.
Our user’s guide has a section covering setting up and accessing a BonsaiDb server.
§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,acme: Enables automtic certificate acquisition through ACME/LetsEncrypt.cli: Enables theclimodule.encryption: Enables at-rest encryption.hyper: Enables convenience functions for upgrading websockets usinghyper.instrument: Enables instrumenting withtracing.pem: Enables the ability to install a certificate using the PEM format.websockets: EnablesWebSocketsupport.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 bonsaidb_core as core;pub use bonsaidb_local as local;pub use fabruic;
Modules§
Structs§
- Acme
Configuration - The Automated Certificate Management Environment (ACME) configuration.
- Bonsai
Listen Config - Configuration for the BonsaiDb network protocol.
- Connected
Client - A connected database client.
- Custom
Server - A BonsaiDb server.
- Locked
Client Data Guard - A locked reference to associated client data.
- NoBackend
- A
Backendwith no custom functionality. - Peer
- A connected network peer.
- Server
Configuration - Configuration options for
Server - Server
Database - A database belonging to a
CustomServer.
Enums§
- Backend
Error - An error that can occur inside of a
Backendfunction. - Connection
Handling - Controls how a server should handle a connection.
- Default
Permissions - The default permissions to use for all connections to the server.
- Error
- An error occurred while interacting with a
Server. - Standard
TcpProtocols - TCP
ApplicationProtocolsthat BonsaiDb has some knowledge of. - Transport
- The ways a client can be connected to the server.
Constants§
- LETS_
ENCRYPT_ PRODUCTION_ DIRECTORY - URI of https://letsencrypt.org/ prod Directory. Certificates aquired from this are trusted by most Browsers.
- LETS_
ENCRYPT_ STAGING_ DIRECTORY - URI of https://letsencrypt.org/ staging Directory. Use this for tests. See https://letsencrypt.org/docs/staging-environment/
Traits§
- Application
Protocols - A collection of supported protocols for a network service.
- Backend
- Tailors the behavior of a server to your needs.
- Http
Service - A service that can handle incoming HTTP connections. A convenience
implementation of
TcpServicethat is useful is you are only serving HTTP and WebSockets over a service. - TcpService
- A service that can handle incoming TCP connections.
Type Aliases§
- Server
- A BonsaiDb server without a custom backend.