pub trait CardRepository:
    Repository<Entity = Card, Id = CardId>
    + Send
    + Sync {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    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 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 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 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 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 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 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 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 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;
}Expand description
Repository trait for Card entities
Required Methods§
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn 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