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§

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

Structs§

Enums§

Functions§