ruma_federation_api/
lib.rs

1#![doc(html_favicon_url = "https://ruma.dev/favicon.ico")]
2#![doc(html_logo_url = "https://ruma.dev/images/logo.png")]
3//! (De)serializable types for the [Matrix Server-Server API][federation-api].
4//! These types are used by server code.
5//!
6//! [federation-api]: https://spec.matrix.org/latest/server-server-api/
7
8#![warn(missing_docs)]
9#![cfg_attr(docsrs, feature(doc_auto_cfg))]
10
11use std::fmt;
12
13mod serde;
14
15pub mod authenticated_media;
16pub mod authentication;
17pub mod authorization;
18pub mod backfill;
19pub mod device;
20pub mod directory;
21pub mod discovery;
22pub mod event;
23pub mod keys;
24pub mod membership;
25pub mod openid;
26pub mod query;
27pub mod room;
28pub mod space;
29pub mod thirdparty;
30pub mod transactions;
31
32// Wrapper around `Box<str>` that cannot be used in a meaningful way outside of
33// this crate. Used for string enums because their `_Custom` variant can't be
34// truly private (only `#[doc(hidden)]`).
35#[doc(hidden)]
36#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
37pub struct PrivOwnedStr(Box<str>);
38
39impl fmt::Debug for PrivOwnedStr {
40    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
41        self.0.fmt(f)
42    }
43}