mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2024-11-29 09:38:39 +00:00
868976a149
Signed-off-by: strawberry <strawberry@puppygock.gay>
28 lines
811 B
Rust
28 lines
811 B
Rust
pub mod api;
|
|
pub mod clap;
|
|
mod config;
|
|
mod database;
|
|
mod service;
|
|
mod utils;
|
|
|
|
// Not async due to services() being used in many closures, and async closures
|
|
// are not stable as of writing This is the case for every other occurence of
|
|
// sync Mutex/RwLock, except for database related ones, where the current
|
|
// maintainer (Timo) has asked to not modify those
|
|
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<'static>>> = RwLock::new(None);
|
|
|
|
pub fn services() -> &'static Services<'static> {
|
|
SERVICES
|
|
.read()
|
|
.unwrap()
|
|
.expect("SERVICES should be initialized when this is called")
|
|
}
|