pub struct HttpCollectionService { /* private fields */ }
Expand description
HTTP implementation of CollectionService
Implementations§
Source§impl HttpCollectionService
impl HttpCollectionService
Sourcepub fn new(repository: Arc<dyn CollectionRepository>) -> Self
pub fn new(repository: Arc<dyn CollectionRepository>) -> Self
Create a new HTTP collection service
Trait Implementations§
Source§impl CollectionService for HttpCollectionService
impl CollectionService for HttpCollectionService
Source§fn get_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a collection by ID
Source§fn list_collections<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CollectionFilterParams>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_collections<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CollectionFilterParams>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List collections with filters
Source§fn create_collection<'life0, 'async_trait>(
&'life0 self,
collection: Collection,
) -> Pin<Box<dyn Future<Output = ServiceResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_collection<'life0, 'async_trait>(
&'life0 self,
collection: Collection,
) -> Pin<Box<dyn Future<Output = ServiceResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new collection
Source§fn update_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
collection: Collection,
) -> Pin<Box<dyn Future<Output = ServiceResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
collection: Collection,
) -> Pin<Box<dyn Future<Output = ServiceResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update a collection
Source§fn delete_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a collection
Source§fn archive_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn archive_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Archive a collection
Source§fn unarchive_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unarchive_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unarchive a collection
Source§fn move_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
new_parent_id: Option<CollectionId>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn move_collection<'life0, 'async_trait>(
&'life0 self,
id: CollectionId,
new_parent_id: Option<CollectionId>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Collection>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Move a collection to a new parent
Source§fn get_root_collections<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServiceResult<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 = ServiceResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get root collections
Source§fn get_collections_by_parent<'life0, 'async_trait>(
&'life0 self,
parent_id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_collections_by_parent<'life0, 'async_trait>(
&'life0 self,
parent_id: CollectionId,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Collection>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get collections by parent
Source§fn validate_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 Collection,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_collection<'life0, 'life1, 'async_trait>(
&'life0 self,
collection: &'life1 Collection,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate collection data
Source§impl Service for HttpCollectionService
impl Service for HttpCollectionService
Auto Trait Implementations§
impl Freeze for HttpCollectionService
impl !RefUnwindSafe for HttpCollectionService
impl Send for HttpCollectionService
impl Sync for HttpCollectionService
impl Unpin for HttpCollectionService
impl !UnwindSafe for HttpCollectionService
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