Crate kitchen_fridge

Source
Expand description

This crate provides a CalDAV client library.
CalDAV is described as “Calendaring Extensions to WebDAV” in RFC 4791 and RFC 7986 and the underlying iCal format is described at least in RFC 5545.
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. Thus it can fetch and update a CalDAV-hosted todo-list…just like sticky notes on a kitchen fridge 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

It provides a CalDAV client in the client module, that can be used as a stand-alone module.

Because the connection to the server may be slow, this crate also provides a local cache for CalDAV data in the cache module. This way, user-frendly apps are able to quicky display cached data on startup.

These two “data sources” (actual client and local cache) can be used together in a CalDavProvider.
A CalDavProvider abstracts these two sources by merging them together into one virtual source.
It also handles synchronisation between the local cache and the server, and robustly recovers from any network error (so that it never corrupts the local or remote source).

Note that many methods are defined in common traits (see crate::traits).

§Examples

See example usage in the examples/ folder, that you can run using cargo run --example <example-name>.
You can also have a look at Voilà, a GUI app that uses kitchen-fridge under the hood.

§Configuration options

Have a look at the config module to see what default options can be overridden.

Re-exports§

pub use item::Item;
pub use task::Task;
pub use event::Event;
pub use client::Client;
pub use cache::Cache;

Modules§

cache
This module provides a local cache for CalDAV data
calendar
Various objects that implement Calendar-related traits
client
This module provides a client to connect to a CalDAV server
config
Support for library configuration options
event
Calendar events (iCal VEVENT items)
ical
This module handles conversion between iCal files and internal representations
item
CalDAV items (todo, events, journals…)
provider
This modules abstracts data sources and merges them in a single virtual one
resource
task
To-do tasks (iCal VTODO item)
traits
Traits used by multiple structs in this crate
utils
Some utility functions

Type Aliases§

CalDavProvider
Unless you want another kind of Provider to write integration tests, you’ll probably want this kind of Provider.
See alse the Provider documentation