ruma_push_gateway_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 Push Gateway API][push-api].
4//! These types can be shared by push gateway and server code.
5//!
6//! [push-api]: https://spec.matrix.org/latest/push-gateway-api/
7
8#![warn(missing_docs)]
9
10use std::fmt;
11
12pub mod send_event_notification;
13
14// Wrapper around `Box<str>` that cannot be used in a meaningful way outside of
15// this crate. Used for string enums because their `_Custom` variant can't be
16// truly private (only `#[doc(hidden)]`).
17#[doc(hidden)]
18#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
19pub struct PrivOwnedStr(Box<str>);
20
21impl fmt::Debug for PrivOwnedStr {
22 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
23 self.0.fmt(f)
24 }
25}