2020-07-26 03:08:00 +00:00
|
|
|
pub mod client_server;
|
|
|
|
mod database;
|
|
|
|
mod error;
|
|
|
|
mod pdu;
|
2020-07-30 16:14:47 +00:00
|
|
|
mod push_rules;
|
2020-07-26 03:08:00 +00:00
|
|
|
mod ruma_wrapper;
|
|
|
|
mod utils;
|
|
|
|
|
2020-07-30 16:14:47 +00:00
|
|
|
pub use database::Database;
|
2020-07-26 03:08:00 +00:00
|
|
|
pub use error::{Error, Result};
|
|
|
|
pub use pdu::PduEvent;
|
|
|
|
pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse};
|
2020-07-30 16:14:47 +00:00
|
|
|
|
2020-07-26 03:08:00 +00:00
|
|
|
use std::ops::Deref;
|
|
|
|
|
|
|
|
pub struct State<'r, T: Send + Sync + 'static>(&'r T);
|
|
|
|
|
|
|
|
impl<'r, T: Send + Sync + 'static> Deref for State<'r, T> {
|
|
|
|
type Target = T;
|
|
|
|
|
|
|
|
#[inline(always)]
|
|
|
|
fn deref(&self) -> &T {
|
|
|
|
self.0
|
|
|
|
}
|
|
|
|
}
|