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§
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>>
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>>
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.