2020-12-08 10:33:44 +01:00
|
|
|
pub mod appservice_server;
|
2020-07-26 05:08:00 +02:00
|
|
|
pub mod client_server;
|
|
|
|
mod database;
|
|
|
|
mod error;
|
|
|
|
mod pdu;
|
2020-07-30 18:14:47 +02:00
|
|
|
mod push_rules;
|
2020-07-26 05:08:00 +02:00
|
|
|
mod ruma_wrapper;
|
2020-08-14 11:34:15 +02:00
|
|
|
pub mod server_server;
|
2020-07-26 05:08:00 +02:00
|
|
|
mod utils;
|
|
|
|
|
2020-07-30 18:14:47 +02:00
|
|
|
pub use database::Database;
|
2020-07-26 05:08:00 +02:00
|
|
|
pub use error::{Error, Result};
|
|
|
|
pub use pdu::PduEvent;
|
2020-08-04 02:56:14 +02:00
|
|
|
pub use rocket::Config;
|
2020-07-26 05:08:00 +02:00
|
|
|
pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse};
|
|
|
|
use std::ops::Deref;
|
|
|
|
|
2020-08-04 02:56:14 +02:00
|
|
|
pub struct State<'r, T: Send + Sync + 'static>(pub &'r T);
|
2020-07-26 05:08:00 +02:00
|
|
|
|
|
|
|
impl<'r, T: Send + Sync + 'static> Deref for State<'r, T> {
|
|
|
|
type Target = T;
|
|
|
|
|
|
|
|
#[inline(always)]
|
|
|
|
fn deref(&self) -> &T {
|
|
|
|
self.0
|
|
|
|
}
|
|
|
|
}
|