mirror of https://gitlab.com/famedly/conduit.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
912 B
28 lines
912 B
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; |
|
use ruma::api::MatrixVersion; |
|
pub use service::{pdu::PduEvent, Services}; |
|
pub use utils::error::{Error, Result}; |
|
|
|
pub static SERVICES: RwLock<Option<&'static Services>> = RwLock::new(None); |
|
pub const MATRIX_VERSIONS: &[MatrixVersion] = &[MatrixVersion::V1_13]; |
|
|
|
pub fn services() -> &'static Services { |
|
SERVICES |
|
.read() |
|
.unwrap() |
|
.expect("SERVICES should be initialized when this is called") |
|
}
|
|
|