synapse_admin_api/
lib.rs

1//! Serializable types for the requests and responses for each endpoint in the
2//! [synapse admin API][api].
3//!
4//! [api]: https://github.com/matrix-org/synapse/tree/master/docs/admin_api
5
6// FIXME: don't allow dead code, warn on missing docs
7#![allow(dead_code)]
8#![warn(missing_debug_implementations)]
9
10use std::fmt;
11
12pub mod account_validity;
13pub mod background_updates;
14pub mod experimental_features;
15pub mod register_users;
16pub mod room_membership;
17pub mod rooms;
18pub mod users;
19pub mod version;
20
21mod serde;
22
23// Wrapper around `Box<str>` that cannot be used in a meaningful way outside of
24// this crate. Used for string enums because their `_Custom` variant can't be
25// truly private (only `#[doc(hidden)]`).
26#[doc(hidden)]
27#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
28pub struct PrivOwnedStr(Box<str>);
29
30impl fmt::Debug for PrivOwnedStr {
31    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
32        self.0.fmt(f)
33    }
34}