Skip to main content

nextcloud_dav/
lib.rs

1//! WebDAV client foundation for the Nextcloud SDK.
2//!
3//! The crate covers the part of WebDAV Nextcloud's file API leans on first:
4//! addressing a path below a user's file tree ([`DavPath`]), describing what
5//! to ask for ([`DavProperty`], [`PropfindBody`]), and turning a `207
6//! Multi-Status` answer into typed resources ([`DavResource`]) through
7//! [`DavClient`].
8//!
9//! Requests travel through `nextcloud_sdk_core`'s transport seam, so this crate
10//! is generic over *how* bytes move and *how* credentials are applied; it
11//! never opens a socket itself.
12//!
13//! XML is written and read by hand. The propfind body is small and fixed,
14//! and the reader only has to understand a multistatus envelope, so a full
15//! XML implementation would be more weight than value. [`xml`] documents
16//! the escaping helpers and the limits of that reader.
17#![deny(missing_docs)]
18#![forbid(unsafe_code)]
19
20mod client;
21#[cfg(test)]
22mod fixtures;
23mod method;
24mod path;
25mod propfind;
26mod resource;
27pub mod xml;
28
29pub use client::DavClient;
30pub use method::{DEPTH_HEADER, DESTINATION_HEADER, Depth, OVERWRITE_HEADER, Overwrite};
31pub use path::DavPath;
32pub use propfind::{DavNamespace, DavProperty, PropfindBody};
33pub use resource::DavResource;