pub struct LocalStore { /* private fields */ }Expand description
Local file-based store for storing events and todos as ICS files.
This store stores each event/todo as a separate ICS file in the configured
calendar directory. Resource IDs use the file:// URL scheme.
Implementations§
Source§impl LocalStore
impl LocalStore
Trait Implementations§
Source§impl Clone for LocalStore
impl Clone for LocalStore
Source§fn clone(&self) -> LocalStore
fn clone(&self) -> LocalStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalStore
impl Debug for LocalStore
Source§impl Store for LocalStore
impl Store for LocalStore
Source§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 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,
Creates a new event in the store. Read more
Source§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 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,
Retrieves an event from the store by UID. Read more
Source§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 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,
Updates an existing event in the store. Read more
Source§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 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,
Deletes an event from the store. Read more
Source§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 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,
Creates a new todo in the store. Read more
Source§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 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,
Retrieves a todo from the store by UID. Read more
Source§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 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,
Updates an existing todo in the store. Read more
Source§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 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,
Deletes a todo from the store. Read more
Source§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_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,
Lists all events in the store. Read more
Source§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 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,
Lists all todos in the store. Read more
Source§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 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,
Checks if a UID exists in the store. Read more
Source§fn calendar_id(&self) -> &str
fn calendar_id(&self) -> &str
Returns the calendar identifier for this store. Read more
Source§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,
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,
Synchronizes the store with the local cache (database). Read more
Auto Trait Implementations§
impl !RefUnwindSafe for LocalStore
impl !UnwindSafe for LocalStore
impl Freeze for LocalStore
impl Send for LocalStore
impl Sync for LocalStore
impl Unpin for LocalStore
impl UnsafeUnpin for LocalStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.