pub struct HttpCardRepository { /* private fields */ }
Expand description
HTTP implementation of CardRepository
Implementations§
Source§impl HttpCardRepository
impl HttpCardRepository
Sourcepub fn new(http_provider: Arc<dyn HttpProviderSafe>) -> Self
pub fn new(http_provider: Arc<dyn HttpProviderSafe>) -> Self
Create a new HTTP card repository
Trait Implementations§
Source§impl CardRepository for HttpCardRepository
impl CardRepository for HttpCardRepository
Source§fn list_with_filters<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CardFilterParams>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Card>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_with_filters<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CardFilterParams>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Card>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List cards with card-specific filters
Source§fn get_by_collection<'life0, 'async_trait>(
&'life0 self,
collection_id: i32,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Card>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_by_collection<'life0, 'async_trait>(
&'life0 self,
collection_id: i32,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Card>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get cards in a specific collection
Source§fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Card>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<Card>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search cards by query
Source§fn archive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
) -> 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 CardId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Archive a card
Source§fn unarchive<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
) -> 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 CardId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unarchive a card
Source§fn copy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
new_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn copy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
new_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Copy a card
Source§fn execute_query<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_query<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a card’s query
Source§fn export_query<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
format: ExportFormat,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn export_query<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
format: ExportFormat,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Export card query results
Source§fn execute_pivot_query<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_pivot_query<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = RepositoryResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a pivot query for a card
Source§impl Repository for HttpCardRepository
impl Repository for HttpCardRepository
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 CardId,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Card>> + 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<Card>>> + 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<Card>>> + 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 Card,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
entity: &'life1 Card,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Card>> + 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 CardId,
entity: &'life2 Card,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Card>> + 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 CardId,
entity: &'life2 Card,
) -> Pin<Box<dyn Future<Output = RepositoryResult<Card>> + 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 CardId,
) -> 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 CardId,
) -> 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 HttpCardRepository
impl !RefUnwindSafe for HttpCardRepository
impl Send for HttpCardRepository
impl Sync for HttpCardRepository
impl Unpin for HttpCardRepository
impl !UnwindSafe for HttpCardRepository
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