Skip to main content

DatabasePersistence

Trait DatabasePersistence 

Source
pub trait DatabasePersistence {
    // Required method
    fn persist<'async_trait>(
        self,
        database: Database<Table>,
    ) -> Pin<Box<dyn Future<Output = ApiResult<usize>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Trait for objects that can be persisted in a database

Required Methods§

Source

fn persist<'async_trait>( self, database: Database<Table>, ) -> Pin<Box<dyn Future<Output = ApiResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait,

Persist data to database

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§