Skip to main content

RepositoryExt

Trait RepositoryExt 

Source
pub trait RepositoryExt<E: Entity>: Sized {
    // Required method
    fn pool(&self) -> &PgPool;

    // Provided methods
    fn find_by<'life0, 'life1, 'async_trait, T>(
        &'life0 self,
        column: &'life1 str,
        value: T,
    ) -> Pin<Box<dyn Future<Output = Result<Option<E>, Error>> + Send + 'async_trait>>
       where T: 'async_trait + ToString + Send + Sync,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn find_all_by<'life0, 'life1, 'async_trait, T>(
        &'life0 self,
        column: &'life1 str,
        value: T,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<E>, Error>> + Send + 'async_trait>>
       where T: 'async_trait + ToString + Send + Sync,
             Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn pool(&self) -> &PgPool

Provided Methods§

Source

fn find_by<'life0, 'life1, 'async_trait, T>( &'life0 self, column: &'life1 str, value: T, ) -> Pin<Box<dyn Future<Output = Result<Option<E>, Error>> + Send + 'async_trait>>
where T: 'async_trait + ToString + Send + Sync, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn find_all_by<'life0, 'life1, 'async_trait, T>( &'life0 self, column: &'life1 str, value: T, ) -> Pin<Box<dyn Future<Output = Result<Vec<E>, Error>> + Send + 'async_trait>>
where T: 'async_trait + ToString + Send + Sync, Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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§