pub trait DbConnect: Sync {
type Database: Database;
type Error: Error;
// Required method
fn connect(&self) -> Result<Self::Database, Self::Error>;
}Expand description
Trait for types that can be used to connect to a database.
Connectors should contain configuration information like filesystem paths. They are intended to enable parallel instantiation of multiple EVMs in multiple threads sharing some database configuration
DbConnect is blanket implemented for clonable Database types by
simply cloning the database instance. This allows already-instantiated DBs
to be used as connectors, however, if the Database uses a shared
resource like a file or network connection, care should be taken to ensure
that the implementation does not share uintended state between EVM
instances.