use std::sync::Arc;
use async_trait::async_trait;
use tokio::sync::RwLock;
use crate::error::Result;
use crate::store::SharedConfer;
pub type SharedConferModule<T> = Arc<RwLock<T>>;
#[async_trait]
pub trait ConferModule: Send + Sync + Sized + 'static {
async fn from_confer(store: SharedConfer) -> Result<SharedConferModule<Self>>;
async fn load(module: &SharedConferModule<Self>, store: SharedConfer) -> Result<()>;
async fn save(module: &SharedConferModule<Self>, store: SharedConfer) -> Result<()>;
}