messing around with arcs
This commit is contained in:
@@ -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>;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user