core_crypto_keystore::connection

Trait DatabaseConnection

Source
pub trait DatabaseConnection<'a>: DatabaseConnectionRequirements {
    type Connection: 'a;

    // Required methods
    fn open<'life0, 'life1, 'async_trait>(
        name: &'life0 str,
        key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Self>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn open_in_memory<'life0, 'life1, 'async_trait>(
        name: &'life0 str,
        key: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Self>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn close<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait;

    // Provided methods
    fn wipe<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<()>> + Send + 'async_trait>>
       where Self: Send + 'async_trait { ... }
    fn check_buffer_size(size: usize) -> CryptoKeystoreResult<()> { ... }
}

Required Associated Types§

Required Methods§

Source

fn open<'life0, 'life1, 'async_trait>( name: &'life0 str, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Self>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn open_in_memory<'life0, 'life1, 'async_trait>( name: &'life0 str, key: &'life1 str, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<Self>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn close<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,

Provided Methods§

Source

fn wipe<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = CryptoKeystoreResult<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait,

Default implementation of wipe

Source

fn check_buffer_size(size: usize) -> CryptoKeystoreResult<()>

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§

Source§

impl<'a> DatabaseConnection<'a> for SqlCipherConnection

Source§

type Connection = MutexGuard<'a, Connection>