26 lines
831 B
Rust
26 lines
831 B
Rust
#![doc(html_favicon_url = "https://ruma.dev/favicon.ico")]
|
|
#![doc(html_logo_url = "https://ruma.dev/images/logo.png")]
|
|
//! (De)serializable types for the [Matrix Push Gateway API][push-api].
|
|
//! These types can be shared by push gateway and server code.
|
|
//!
|
|
//! [push-api]: https://spec.matrix.org/latest/push-gateway-api/
|
|
|
|
#![warn(missing_docs)]
|
|
|
|
use std::fmt;
|
|
|
|
pub mod send_event_notification;
|
|
|
|
// Wrapper around `Box<str>` that cannot be used in a meaningful way outside of
|
|
// this crate. Used for string enums because their `_Custom` variant can't be
|
|
// truly private (only `#[doc(hidden)]`).
|
|
#[doc(hidden)]
|
|
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
pub struct PrivOwnedStr(Box<str>);
|
|
|
|
impl fmt::Debug for PrivOwnedStr {
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
self.0.fmt(f)
|
|
}
|
|
}
|