conduit/src/lib.rs

30 lines
641 B
Rust
Raw Normal View History

#![allow(clippy::suspicious_else_formatting)]
2021-05-05 16:14:49 +00:00
#![deny(clippy::dbg_macro)]
pub mod appservice_server;
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;
mod utils;
pub use database::{Config, Database};
pub use error::{Error, Result};
pub use pdu::PduEvent;
pub use rocket::Config as RocketConfig;
pub use ruma_wrapper::{ConduitResult, Ruma, RumaResponse};
use std::ops::Deref;
pub struct State<'r, T: Send + Sync + 'static>(pub &'r T);
impl<'r, T: Send + Sync + 'static> Deref for State<'r, T> {
type Target = T;
#[inline(always)]
fn deref(&self) -> &T {
self.0
}
}