diff --git a/src/cache.rs b/src/cache.rs index 062fb85..a398d6d 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -27,7 +27,8 @@ const MAIN_FILE: &str = "data.json"; /// /// 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 +/// Most of its functionality is provided by the `CalDavSource` async trait it implements. +/// However, since these functions do not _need_ to be actually async, non-async versions of them are also provided for better convenience. See [`Cache::get_calendar_sync`] for example #[derive(Debug)] pub struct Cache { backing_folder: PathBuf, diff --git a/src/calendar/cached_calendar.rs b/src/calendar/cached_calendar.rs index 86b176c..6d665c6 100644 --- a/src/calendar/cached_calendar.rs +++ b/src/calendar/cached_calendar.rs @@ -19,7 +19,8 @@ use crate::mock_behaviour::MockBehaviour; /// A calendar used by the [`cache`](crate::cache) module /// -/// Most of its methods are part of traits implementations +/// Most of its functionality is provided by the async traits it implements. +/// However, since these functions do not _need_ to be actually async, non-async versions of them are also provided for better convenience. See [`CachedCalendar::add_item_sync`] for example #[derive(Clone, Debug, Serialize, Deserialize)] pub struct CachedCalendar { name: String, diff --git a/src/lib.rs b/src/lib.rs index caf145c..ad24928 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ //! CalDAV is described as "Calendaring Extensions to WebDAV" in [RFC 4791](https://datatracker.ietf.org/doc/html/rfc4791) and [RFC 7986](https://datatracker.ietf.org/doc/html/rfc7986) and the underlying iCal format is described at least in [RFC 5545](https://datatracker.ietf.org/doc/html/rfc5545). \ //! This library has been intensivley tested with Nextcloud servers. It should support Owncloud and iCloud as well, since they use the very same CalDAV protocol. //! -//! This initial implementation only supports TODO events. This it can fetch and update a CalDAV-hosted todo-list...just like [sticky notes on a kitchen fridge](https://www.google.com/search?q=kitchen+fridge+todo+list&tbm=isch) would. \ +//! This initial implementation only supports TODO events. Thus it can fetch and update a CalDAV-hosted todo-list...just like [sticky notes on a kitchen fridge](https://www.google.com/search?q=kitchen+fridge+todo+list&tbm=isch) would. \ //! Supporting other items (and especially regular CalDAV calendar events) should be fairly trivial, as it should boil down to adding little logic in iCal files parsing, but any help is appreciated :-) //! //! ## Possible uses diff --git a/src/traits.rs b/src/traits.rs index ed4a0d8..3bcffe3 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -84,7 +84,7 @@ pub trait DavCalendar : BaseCalendar { async fn get_item_by_url(&self, url: &Url) -> Result, Box>; /// Returns a set of items. - /// This is usually faster than calling multiple consecutive [`get_item_by_url`], since it only issues one HTTP request. + /// This is usually faster than calling multiple consecutive [`DavCalendar::get_item_by_url`], since it only issues one HTTP request. async fn get_items_by_url(&self, urls: &[Url]) -> Result>, Box>; /// Delete an item