messing around with arcs

This commit is contained in:
Timo Kösters
2022-10-05 15:33:57 +02:00
committed by Nyaaori
parent face766e0f
commit cff52d7ebb
77 changed files with 598 additions and 434 deletions

View File

@@ -1,6 +1,6 @@
use crate::Result;
pub trait Data {
pub trait Data: Send + Sync {
/// Registers an appservice and returns the ID to the caller
fn register_appservice(&self, yaml: serde_yaml::Value) -> Result<String>;

View File

@@ -1,10 +1,12 @@
mod data;
use std::sync::Arc;
pub use data::Data;
use crate::Result;
pub struct Service {
db: Box<dyn Data>,
db: Arc<dyn Data>,
}
impl Service {