pub trait CardService: Service {
// Required methods
fn get_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_cards<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CardFilterParams>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Card>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_card<'life0, 'async_trait>(
&'life0 self,
card: Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
card: Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn archive_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unarchive_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn copy_card<'life0, 'life1, 'async_trait>(
&'life0 self,
id: CardId,
new_name: &'life1 str,
collection_id: Option<i32>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn validate_card<'life0, 'life1, 'async_trait>(
&'life0 self,
card: &'life1 Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn execute_card_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn export_card_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
format: ExportFormat,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn execute_card_pivot_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Service trait for Card operations
Required Methods§
Sourcefn get_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a card by ID
Sourcefn list_cards<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CardFilterParams>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Card>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_cards<'life0, 'async_trait>(
&'life0 self,
pagination: Option<PaginationParams>,
filters: Option<CardFilterParams>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<Card>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List cards with filters
Sourcefn create_card<'life0, 'async_trait>(
&'life0 self,
card: Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_card<'life0, 'async_trait>(
&'life0 self,
card: Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new card with validation
Sourcefn update_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
card: Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
card: Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update a card with business rule validation
Sourcefn delete_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a card with cascade checks
Sourcefn archive_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn archive_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Archive a card
Sourcefn unarchive_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unarchive_card<'life0, 'async_trait>(
&'life0 self,
id: CardId,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unarchive a card
Sourcefn copy_card<'life0, 'life1, 'async_trait>(
&'life0 self,
id: CardId,
new_name: &'life1 str,
collection_id: Option<i32>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn copy_card<'life0, 'life1, 'async_trait>(
&'life0 self,
id: CardId,
new_name: &'life1 str,
collection_id: Option<i32>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Card>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Copy a card to a new collection
Sourcefn validate_card<'life0, 'life1, 'async_trait>(
&'life0 self,
card: &'life1 Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_card<'life0, 'life1, 'async_trait>(
&'life0 self,
card: &'life1 Card,
) -> Pin<Box<dyn Future<Output = ServiceResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate card data
Sourcefn execute_card_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_card_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a card’s query
Sourcefn export_card_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
format: ExportFormat,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn export_card_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
format: ExportFormat,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Export card query results
Sourcefn execute_card_pivot_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_card_pivot_query<'life0, 'async_trait>(
&'life0 self,
id: CardId,
parameters: Option<Value>,
) -> Pin<Box<dyn Future<Output = ServiceResult<QueryResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a pivot query for a card