pub trait OrganizationRepository: Send + Sync {
// Required methods
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
org: &'life1 Organization,
) -> Pin<Box<dyn Future<Output = Result<Organization, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Organization>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Organization>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Organization>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_page<'life0, 'async_trait>(
&'life0 self,
recherche: Option<String>,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Organization>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn count_matching<'life0, 'async_trait>(
&'life0 self,
recherche: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
org: &'life1 Organization,
) -> Pin<Box<dyn Future<Output = Result<Organization, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn count_buildings<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
org: &'life1 Organization,
) -> Pin<Box<dyn Future<Output = Result<Organization, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Organization>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_slug<'life0, 'life1, 'async_trait>(
&'life0 self,
slug: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Organization>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Organization>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn find_page<'life0, 'async_trait>(
&'life0 self,
recherche: Option<String>,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Organization>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_page<'life0, 'async_trait>(
&'life0 self,
recherche: Option<String>,
limit: i64,
offset: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Organization>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Une PAGE d’organisations, filtrée par une recherche libre.
find_all rendait la table entière — 2743 lignes sur la recette au
2026-09-17, d’où 8,2 s d’écran blanc sur /admin/acps (#943). Il
reste pour les appelants internes qui ont réellement besoin de tout.
recherche porte sur le nom, le slug ET le courriel de contact, sans
distinction de casse.
None ou une chaîne vide ne filtre rien.
Sourcefn count_matching<'life0, 'async_trait>(
&'life0 self,
recherche: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_matching<'life0, 'async_trait>(
&'life0 self,
recherche: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Le nombre total correspondant à la même recherche, pour que l’appelant sache combien il en reste. Sans lui, une page est un fragment dont on ignore la taille du tout.
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
org: &'life1 Organization,
) -> Pin<Box<dyn Future<Output = Result<Organization, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_buildings<'life0, 'async_trait>(
&'life0 self,
org_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".