Trait TestKeyValueDatabase

Source
pub trait TestKeyValueDatabase: KeyValueDatabase {
    // Required method
    async fn new_test_config() -> Result<Self::Config, Self::Error>;

    // Provided methods
    async fn connect_test_namespace() -> Result<Self, Self::Error> { ... }
    async fn new_test_store() -> Result<Self::Store, Self::Error> { ... }
}
Expand description

The functions needed for testing purposes

Required Methods§

Source

async fn new_test_config() -> Result<Self::Config, Self::Error>

Obtains a test config

Provided Methods§

Source

async fn connect_test_namespace() -> Result<Self, Self::Error>

Creates a database for testing purposes

Source

async fn new_test_store() -> Result<Self::Store, Self::Error>

Creates a store for testing purposes

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§