1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-01-01 10:25:21 +01:00
conduit/src/lib.rs

29 lines
682 B
Rust
Raw Normal View History

#![warn(
rust_2018_idioms,
unused_qualifications,
clippy::cloned_instead_of_copied,
clippy::str_to_string
)]
#![allow(clippy::suspicious_else_formatting)]
2021-05-05 18:14:49 +02:00
#![deny(clippy::dbg_macro)]
2022-02-03 13:30:04 +01:00
mod config;
mod database;
mod service;
pub mod api;
mod utils;
2022-10-05 12:45:54 +02:00
use std::{cell::Cell, sync::{RwLock, Arc}};
2022-02-03 13:30:04 +01:00
pub use config::Config;
pub use utils::error::{Error, Result};
pub use service::{Services, pdu::PduEvent};
pub use api::ruma_wrapper::{Ruma, RumaResponse};
2022-10-05 15:33:57 +02:00
pub static SERVICES: RwLock<Option<&'static Services>> = RwLock::new(None);
2022-10-05 15:33:57 +02:00
pub fn services<'a>() -> &'static Services {
&SERVICES.read().unwrap().expect("SERVICES should be initialized when this is called")
}