pub struct MockCardRepository { /* private fields */ }
Expand description
Mock implementation of CardRepository for testing
Implementations§
Trait Implementations§
Source§impl CardRepository for MockCardRepository
impl CardRepository for MockCardRepository
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 Default for MockCardRepository
impl Default for MockCardRepository
Source§impl Repository for MockCardRepository
impl Repository for MockCardRepository
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 MockCardRepository
impl !RefUnwindSafe for MockCardRepository
impl Send for MockCardRepository
impl Sync for MockCardRepository
impl Unpin for MockCardRepository
impl !UnwindSafe for MockCardRepository
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