Trait CollectionRepository

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Implementors§