indieweb/
lib.rs

1//! This crate provides implementations of the [standards][standards] and [algorithms][algorithms] used with the IndieWeb.
2//!
3//! More information about what's available is in either the [algorithms][algorithms] or
4//! [standards][standards] module. A required trait to use is the [HTTP Client][http::Client]
5//! if you'd like to use your own networking stack that's compatible with [http][::http]. This
6//! library also provides some [traits][traits] to extend common values with IndieWeb-adjacent
7//! capabilities.
8#[warn(missing_docs, invalid_doc_attributes, unused, deprecated, clippy::perf)]
9#[deny(rustdoc::broken_intra_doc_links, dead_code, unsafe_code)]
10
11/// A collection of algorithms commonly used in the IndieWeb.
12/// This module provides a collection of implementation of known
13/// algorithms when working with the IndieWeb or adjacent tooling.
14pub mod algorithms;
15
16/// A representation of errors from the IndieWeb error.
17pub mod error;
18
19/// A facade for HTTP interactions when working with this library.
20pub mod http;
21
22/// A collection of standards that the IndieWeb can support.
23///
24/// View <https://spec.indieweb.org> for more information.
25pub mod standards;
26
27/// Traits to extend everyday functionality with IndieWeb-adjacent tooling.
28pub mod traits;
29
30mod test;
31
32#[doc(inline)]
33pub use error::Error;
34
35pub mod mf2 {
36    #[derive(thiserror::Error, Debug)]
37    pub enum Error {
38        #[error(transparent)]
39        Parser(#[from] parser::Error),
40
41        #[error(transparent)]
42        Types(#[from] types::Error),
43    }
44
45    #[doc(inline)]
46    pub use microformats as parser;
47
48    #[doc(inline)]
49    pub use microformats::types;
50}