pub struct HttpCollectionRepository { /* private fields */ }
Expand description
HTTP implementation of CollectionRepository
Implementations§
Source§impl HttpCollectionRepository
impl HttpCollectionRepository
Sourcepub fn new(http_provider: Arc<dyn HttpProviderSafe>) -> Self
pub fn new(http_provider: Arc<dyn HttpProviderSafe>) -> Self
Create a new HTTP collection repository
Trait Implementations§
Source§impl CollectionRepository for HttpCollectionRepository
impl CollectionRepository for HttpCollectionRepository
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,
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,
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,
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,
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,
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,
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,
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,
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,
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
Source§impl Repository for HttpCollectionRepository
impl Repository for HttpCollectionRepository
Source§type Entity = Collection
type Entity = Collection
The entity type this repository manages
Source§type Id = CollectionId
type Id = CollectionId
The ID type for entities
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get an entity by ID
Source§fn list<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<FilterParams>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<FilterParams>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List entities with optional pagination and filters
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
entity: &'life1 Collection,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
entity: &'life1 Collection,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new entity
Source§fn update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
entity: &'life2 Collection,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CollectionId,
entity: &'life2 Collection,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update an existing entity
Source§fn delete<'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 delete<'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,
Delete an entity
Auto Trait Implementations§
impl Freeze for HttpCollectionRepository
impl !RefUnwindSafe for HttpCollectionRepository
impl Send for HttpCollectionRepository
impl Sync for HttpCollectionRepository
impl Unpin for HttpCollectionRepository
impl !UnwindSafe for HttpCollectionRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more