2021-03-04 14:26:34 +00:00
|
|
|
#![allow(clippy::suspicious_else_formatting)]
|
2021-05-05 16:14:49 +00:00
|
|
|
#![deny(clippy::dbg_macro)]
|
|
|
|
|
2020-12-08 09:33:44 +00:00
|
|
|
pub mod appservice_server;
|
2020-07-26 03:08:00 +00:00
|
|
|
pub mod client_server;
|
|
|
|
mod database;
|
|
|
|
mod error;
|
|
|
|
mod pdu;
|
|
|
|
mod ruma_wrapper;
|
2020-08-14 09:34:15 +00:00
|
|
|
pub mod server_server;
|
2020-07-26 03:08:00 +00:00
|
|
|
mod utils;
|
|
|
|
|
2021-06-11 19:47:53 +00:00
|
|
|
pub use database::{Config, Database};
|
2020-07-26 03:08:00 +00:00
|
|
|
pub use error::{Error, Result};
|
|
|
|
pub use pdu::PduEvent;
|
2021-06-11 19:47:53 +00:00
|
|
|
pub use rocket::Config as RocketConfig;
|
2020-07-26 03:08:00 +00:00
|
|
|
pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse};
|
|
|
|
use std::ops::Deref;
|
|
|
|
|
2020-08-04 00:56:14 +00:00
|
|
|
pub struct State<'r, T: Send + Sync + 'static>(pub &'r T);
|
2020-07-26 03:08:00 +00:00
|
|
|
|
|
|
|
impl<'r, T: Send + Sync + 'static> Deref for State<'r, T> {
|
|
|
|
type Target = T;
|
|
|
|
|
|
|
|
#[inline(always)]
|
|
|
|
fn deref(&self) -> &T {
|
|
|
|
self.0
|
|
|
|
}
|
|
|
|
}
|