Connection
The Connection
trait contains functions for interacting with collections in a database. This trait is implemented by the Database
types in each crate:
- For bonsaidb-local:
Database
- For bonsaidb-server:
ServerDatabase
- For bonsaidb-client:
RemoteDatabase
Using this trait, you can write code that generically can work regardless of whether BonsaiDb is operationg locally with no network connection or across the globe.
This is an async trait, which unfortunately yields messy documentation due to the lifetimes.