Crate libdav

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.

Re-exports§

pub use caldav::CalDavClient;
pub use caldav::service_for_url as caldav_service_for_url;
pub use carddav::CardDavClient;
pub use carddav::service_for_url as carddav_service_for_url;

Modules§

caldav
Support for CalDAV, Calendar extensions for WebDAV.
carddav
Support for CardDAV, Address Book extensions for WebDAV.
dav
Generic WebDAV implementation.
encoding
Functions for encoding and decoding percent-encoded path components.
names
Names of common dav attributes and properties.
requests
Request/response pattern for WebDAV operations.
sd
Service discovery helpers to perform automated client bootstrapping.
xmlutils
Utilities for handling XML data.

Structs§

FetchedResource
Parsed resource fetched from a server.
FetchedResourceContent
See FetchedResource
Precondition
WebDAV precondition.
PropertyName
A WebDAV property with a namespace and name.
ResourceType
Resource type for an item.

Enums§

CheckSupportError
Error type for capability checking requests.
Depth
Value for the Depth request header.