pub trait Store: Send + Sync {
Show 13 methods
// Required methods
fn create_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
event: &'life2 VEvent<String>,
) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_event<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<VEvent<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
patch: &'life2 EventPatch,
) -> Pin<Box<dyn Future<Output = Result<VEvent<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_event<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_todo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
todo: &'life2 VTodo<String>,
) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_todo<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<VTodo<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_todo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
patch: &'life2 TodoPatch,
) -> Pin<Box<dyn Future<Output = Result<VTodo<String>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_todo<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, VEvent<String>)>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_todos<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, VTodo<String>)>, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn uid_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn calendar_id(&self) -> &str;
fn sync_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncResult, StoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Store trait for storing and synchronizing events and todos.
This trait abstracts different storage backends (local ICS files, CalDAV servers, etc.)
providing a unified interface for CRUD operations on calendar items.
Required Methods§
Sourcefn create_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
event: &'life2 VEvent<String>,
) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
event: &'life2 VEvent<String>,
) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn get_event<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<VEvent<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_event<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<VEvent<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn update_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
patch: &'life2 EventPatch,
) -> Pin<Box<dyn Future<Output = Result<VEvent<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_event<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
patch: &'life2 EventPatch,
) -> Pin<Box<dyn Future<Output = Result<VEvent<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn delete_event<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_event<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn create_todo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
todo: &'life2 VTodo<String>,
) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_todo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
todo: &'life2 VTodo<String>,
) -> Pin<Box<dyn Future<Output = Result<String, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn get_todo<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<VTodo<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_todo<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<VTodo<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn update_todo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
patch: &'life2 TodoPatch,
) -> Pin<Box<dyn Future<Output = Result<VTodo<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_todo<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
uid: &'life1 str,
patch: &'life2 TodoPatch,
) -> Pin<Box<dyn Future<Output = Result<VTodo<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn delete_todo<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_todo<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn list_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, VEvent<String>)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, VEvent<String>)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn list_todos<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, VTodo<String>)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_todos<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, VTodo<String>)>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn uid_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn uid_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
uid: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn calendar_id(&self) -> &str
fn calendar_id(&self) -> &str
Returns the calendar identifier for this store.
This identifies which calendar in the database items from this store belong to.
Sourcefn sync_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncResult, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_cache<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncResult, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".