elemental_core/runtime/provider.rs
1use async_trait::async_trait;
2use std::{path::PathBuf, sync::Arc};
3
4#[async_trait]
5pub trait RuntimeProvider: Send + Sync {
6 async fn list(&self) -> Vec<PathBuf>;
7
8 #[inline(always)]
9 fn name(&self) -> &'static str {
10 "Provider"
11 }
12
13 fn arc_default() -> Arc<Self>
14 where
15 Self: Sized + Default,
16 {
17 Arc::new(Self::default())
18 }
19}
20
21pub type RuntimeProviderList = Vec<Arc<dyn RuntimeProvider>>;