Skip to main content

StorageConstructor

Trait StorageConstructor 

Source
pub trait StorageConstructor<K, V>: Storage<K, V> + Clone {
    // Required method
    fn connect(
        database_url: &str,
        table_name: &str,
        surfnet_id: &str,
    ) -> StorageResult<Self>
       where Self: Sized;
}

Required Methods§

Source

fn connect( database_url: &str, table_name: &str, surfnet_id: &str, ) -> StorageResult<Self>
where Self: Sized,

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<K, V> StorageConstructor<K, V> for SqliteStorage<K, V>
where K: Serialize + for<'de> Deserialize<'de> + Clone + Send + Sync + 'static, V: Serialize + for<'de> Deserialize<'de> + Clone + Send + Sync + 'static,