pub trait CollectionRepository:
Repository<Entity = Collection, Id = CollectionId>
+ Send
+ Sync {
// Required methods
fn list_with_filters<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CollectionFilterParams>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_children<'life0, 'async_trait>(
&'life0 self,
parent_id: CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_root_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_by_parent<'life0, 'async_trait>(
&'life0 self,
parent_id: Option<CollectionId>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_permissions<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
permissions: &'life2 Value,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn move_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
new_parent_id: Option<CollectionId>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn archive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn unarchive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Repository trait for Collection entities
Required Methods§
Sourcefn list_with_filters<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CollectionFilterParams>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_with_filters<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CollectionFilterParams>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List collections with collection-specific filters
Sourcefn get_children<'life0, 'async_trait>(
&'life0 self,
parent_id: CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_children<'life0, 'async_trait>(
&'life0 self,
parent_id: CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get child collections of a specific collection
Sourcefn get_root_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_root_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get root collections
Sourcefn get_by_parent<'life0, 'async_trait>(
&'life0 self,
parent_id: Option<CollectionId>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_by_parent<'life0, 'async_trait>(
&'life0 self,
parent_id: Option<CollectionId>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get collections by parent ID
Sourcefn get_permissions<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_permissions<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get collection permissions
Sourcefn update_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
permissions: &'life2 Value,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
permissions: &'life2 Value,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update collection permissions
Sourcefn move_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
new_parent_id: Option<CollectionId>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn move_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
new_parent_id: Option<CollectionId>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Move collection to another parent
Sourcefn archive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn archive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Archive a collection
Sourcefn unarchive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unarchive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unarchive a collection