1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-06-27 16:35:59 +00:00
conduit/src/lib.rs

23 lines
518 B
Rust
Raw Normal View History

2022-10-05 20:34:31 +02:00
pub mod api;
2022-02-03 13:30:04 +01:00
mod config;
mod database;
mod service;
mod utils;
2022-10-08 13:03:07 +02:00
use std::sync::RwLock;
2022-10-05 20:34:31 +02:00
pub use api::ruma_wrapper::{Ruma, RumaResponse};
2022-02-03 13:30:04 +01:00
pub use config::Config;
2022-10-08 13:03:07 +02:00
pub use database::KeyValueDatabase;
2022-10-05 20:34:31 +02:00
pub use service::{pdu::PduEvent, Services};
pub use utils::error::{Error, Result};
2022-10-05 15:33:57 +02:00
pub static SERVICES: RwLock<Option<&'static Services>> = RwLock::new(None);
2022-11-21 09:51:39 +01:00
pub fn services() -> &'static Services {
2022-10-10 14:09:11 +02:00
SERVICES
2022-10-05 20:34:31 +02:00
.read()
.unwrap()
.expect("SERVICES should be initialized when this is called")
}