Crate libdav

Source
Expand description

CalDAV and CardDAV client implementations.

See CalDavClient and CardDavClient as useful entry points.

Both clients wrap a dav::WebDavClient, and implement Deref<Target = WebDavClient>, so all of WebDavClient’s associated functions for are usable directly.

§Bootstrapping and service discovery

Clients support bootstrapping themselves using the service discovery, which is implemented in the sd module. The CalDavClient::bootstrap_via_service_discovery and CardDavClient::bootstrap_via_service_discovery functions are available as shortcuts to creating a new client instance.

The implementation does not validate DNSSEC signatures. Because of this, discovery must only be used with a validating DNS resolver (as defined in rfc4033), or with domains served from a local, trusted networks.

§Uris and Hrefs

An href is a path to a collection or resource in a WebDAV server. It is the path component of the corresponding Url. Hrefs returned by this library are always encoded with encoding::normalise_percent_encoded. See the documentation for the encoding module for more details on conventions on encoding different hrefs and URLs.

§Errors

Errors returned by this crate expose clear details of the cause of the error, but also reflect the internal implementation in great detail too. It is somewhat of an anti-pattern, and while this crate is in a relatively mature state, the error types are subject to change.

§Thanks

Special thanks to the NLnet foundation and the NGI Zero Entrust program of the European Commission, which helped secure funding for the work on pimsync and related projects such a this one.

§See also

The source code is currently hosted at https://git.sr.ht/~whynothugo/libdav.

The davcli command line tool provides a minimal interface to CalDAV and CardDAV servers, and can serve as an example of a simple application using this library.

Modules§

dav
Generic WebDAV implementation.
encoding
Functions for encoding and decoding percent-encoded path components.
names
Names of common dav attributes and properties.
sd
Service discovery helpers to perform automated client bootstrapping.
xmlutils
Utilities for handling XML data.

Structs§

CalDavClient
Client to communicate with a CalDAV server.
CardDavClient
Client to communicate with a CardDAV server.
FetchedResource
Parsed resource fetched from a server.
FetchedResourceContent
See FetchedResource
FindHomeSetError
Error type for CalDavClient::find_calendar_home_set and CardDavClient::find_address_book_home_set.
PropertyName
A WebDAV property with a namespace and name.
ResourceType
Resource type for an item.

Enums§

CheckSupportError
Error type for CalDavClient::check_support and CardDavClient::check_support.
Depth
Value for the Depth request header.

Functions§

caldav_service_for_url
Return the service type based on a URL’s scheme.
carddav_service_for_url
Return the service type based on a URL’s scheme.