pub struct HttpCardService { /* private fields */ }
Expand description
HTTP implementation of CardService
Implementations§
Source§impl HttpCardService
impl HttpCardService
Sourcepub fn new(repository: Arc<dyn CardRepository>) -> Self
pub fn new(repository: Arc<dyn CardRepository>) -> Self
Create a new HTTP card service
Trait Implementations§
Source§impl CardService for HttpCardService
impl CardService for HttpCardService
Source§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 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
Source§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 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
Source§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 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
Source§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 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
Source§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 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
Source§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 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
Source§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 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
Source§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 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
Source§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 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
Source§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 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
Source§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 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
Source§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,
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
Source§impl Service for HttpCardService
impl Service for HttpCardService
Auto Trait Implementations§
impl Freeze for HttpCardService
impl !RefUnwindSafe for HttpCardService
impl Send for HttpCardService
impl Sync for HttpCardService
impl Unpin for HttpCardService
impl !UnwindSafe for HttpCardService
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