mirror of https://gitlab.com/famedly/conduit
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
718 B
Rust
32 lines
718 B
Rust
#![warn(
|
|
rust_2018_idioms,
|
|
unused_qualifications,
|
|
clippy::cloned_instead_of_copied,
|
|
clippy::str_to_string
|
|
)]
|
|
#![allow(clippy::suspicious_else_formatting)]
|
|
#![deny(clippy::dbg_macro)]
|
|
|
|
pub mod api;
|
|
mod config;
|
|
mod database;
|
|
mod service;
|
|
mod utils;
|
|
|
|
use std::sync::RwLock;
|
|
|
|
pub use api::ruma_wrapper::{Ruma, RumaResponse};
|
|
pub use config::Config;
|
|
pub use database::KeyValueDatabase;
|
|
pub use service::{pdu::PduEvent, Services};
|
|
pub use utils::error::{Error, Result};
|
|
|
|
pub static SERVICES: RwLock<Option<&'static Services>> = RwLock::new(None);
|
|
|
|
pub fn services() -> &'static Services {
|
|
SERVICES
|
|
.read()
|
|
.unwrap()
|
|
.expect("SERVICES should be initialized when this is called")
|
|
}
|