Struct kitchen_fridge::cache::Cache [−][src]
pub struct Cache { /* fields omitted */ }Expand description
A CalDAV source that stores its items in a local folder.
It automatically updates the content of the folder when dropped (see its Drop implementation), but you can also manually call Cache::save_to_folder
Most of its methods are part of the CalDavSource trait implementation
Implementations
Get the path to the cache folder
Initialize a cache from the content of a valid backing folder if it exists. Returns an error otherwise
Store the current Cache to its backing folder
Note that this is automatically called when self is dropped
pub fn get_calendars_sync(
&self
) -> Result<HashMap<Url, Arc<Mutex<CachedCalendar>>>, Box<dyn Error>>
pub fn get_calendars_sync(
&self
) -> Result<HashMap<Url, Arc<Mutex<CachedCalendar>>>, Box<dyn Error>>
The non-async version of crate::traits::CalDavSource::get_calendars
The non-async version of crate::traits::CalDavSource::get_calendar
Trait Implementations
Returns the current calendars that this source contains This function may trigger an update (that can be a long process, or that can even fail, e.g. in case of a remote server) Read more
Returns the calendar matching the URL
fn create_calendar<'life0, 'async_trait>(
&'life0 mut self,
url: Url,
name: String,
supported_components: SupportedComponents,
color: Option<Color>
) -> Pin<Box<dyn Future<Output = Result<Arc<Mutex<CachedCalendar>>, Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn create_calendar<'life0, 'async_trait>(
&'life0 mut self,
url: Url,
name: String,
supported_components: SupportedComponents,
color: Option<Color>
) -> Pin<Box<dyn Future<Output = Result<Arc<Mutex<CachedCalendar>>, Box<dyn Error>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Create a calendar if it did not exist, and return it
Auto Trait Implementations
impl RefUnwindSafe for Cache
impl UnwindSafe for Cache
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more