use crate::context::Context;
use crate::error::FrameworkResult;
use async_trait::async_trait;
use std::fmt::Debug;
use std::sync::Arc;
#[async_trait]
pub trait Plugin: Send + Sync + Debug {
fn name(&self) -> &'static str;
async fn apply(&self, ctx: Arc<Context>) -> FrameworkResult<()>;
async fn on_load(&self) -> FrameworkResult<()> {
Ok(())
}
async fn on_unload(&self) -> FrameworkResult<()> {
Ok(())
}
}