XmtpTestDb

Trait XmtpTestDb 

Source
pub trait XmtpTestDb {
    // Required methods
    async fn create_ephemeral_store() -> EncryptedMessageStore<DefaultDatabase>;
    async fn create_ephemeral_store_from_snapshot(
        snapshot: &[u8],
        path: Option<impl AsRef<Path>>,
    ) -> EncryptedMessageStore<DefaultDatabase>;
    async fn create_persistent_store(
        path: Option<String>,
    ) -> EncryptedMessageStore<DefaultDatabase>;
    async fn create_database(path: Option<String>) -> DefaultDatabase;
}

Required Methods§

Source

async fn create_ephemeral_store() -> EncryptedMessageStore<DefaultDatabase>

Create a validated, ephemeral database, running the migrations

Source

async fn create_ephemeral_store_from_snapshot( snapshot: &[u8], path: Option<impl AsRef<Path>>, ) -> EncryptedMessageStore<DefaultDatabase>

Source

async fn create_persistent_store( path: Option<String>, ) -> EncryptedMessageStore<DefaultDatabase>

Create a validated, persistent database running the migrations

Source

async fn create_database(path: Option<String>) -> DefaultDatabase

Create an empty database does no validation and does not run migrations.

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§