1#![doc(html_favicon_url = "https://ruma.dev/favicon.ico")]
2#![doc(html_logo_url = "https://ruma.dev/images/logo.png")]
3#![recursion_limit = "1024"]
6#![warn(missing_docs)]
7#![allow(clippy::derive_partial_eq_without_eq)]
9#![cfg_attr(docsrs, feature(doc_auto_cfg))]
10
11#[cfg(not(all(feature = "client", feature = "server")))]
12compile_error!(
13 "ruma_common's `client` and `server` Cargo features only exist as a workaround are not meant to be disabled"
14);
15
16extern crate self as ruma_common;
19
20#[cfg(feature = "api")]
21pub mod api;
22pub mod authentication;
23#[cfg(feature = "canonical-json")]
24pub mod canonical_json;
25pub mod directory;
26pub mod encryption;
27pub mod http_headers;
28mod identifiers;
29pub mod media;
30mod percent_encode;
31pub mod power_levels;
32pub mod presence;
33pub mod push;
34pub mod room;
35pub mod room_version_rules;
36pub mod serde;
37pub mod space;
38pub mod third_party_invite;
39pub mod thirdparty;
40mod time;
41pub mod to_device;
42
43use std::fmt;
44
45#[cfg(feature = "canonical-json")]
46pub use self::canonical_json::{CanonicalJsonError, CanonicalJsonObject, CanonicalJsonValue};
47pub use self::{
48 identifiers::*,
49 time::{MilliSecondsSinceUnixEpoch, SecondsSinceUnixEpoch},
50};
51
52#[doc(hidden)]
56#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
57pub struct PrivOwnedStr(Box<str>);
58
59impl fmt::Debug for PrivOwnedStr {
60 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
61 self.0.fmt(f)
62 }
63}
64
65#[doc(hidden)]
69pub mod exports {
70 #[cfg(feature = "api")]
71 pub use bytes;
72 #[cfg(feature = "api")]
73 pub use http;
74 pub use ruma_macros;
75 pub use serde;
76 pub use serde_html_form;
77 pub use serde_json;
78}