use crate::command::CommandBuilder;
use crate::config::Config;
use crate::hook::HookBuilder;
use crate::server::ServerType;
use crate::task::TaskBuilder;
use crate::version::Version;
use async_trait::async_trait;
#[async_trait]
pub trait PluginBuilder: Send + Sync {
fn name(&self) -> &str;
fn version(&self) -> Version;
fn abi_version(&self) -> Version;
fn description(&self) -> Option<&str>;
fn author(&self) -> Option<&str> {
None
}
fn prefix(&self) -> Option<&str> {
None
}
fn tasks(&self) -> Vec<Box<dyn TaskBuilder>> {
Vec::new()
}
fn commands(&self) -> Vec<Box<dyn CommandBuilder>>{
Vec::new()
}
fn hooks(&self) -> Vec<Box<dyn HookBuilder>> {
Vec::new()
}
fn config(&self) -> Vec<Box<dyn Config>> {
Vec::new()
}
fn server(&self) -> Option<ServerType> {
None
}
async fn init(&self) -> Result<(), Box<dyn std::error::Error>>;
}