dynamic network loading for omgxxx
This commit is contained in:
@@ -47,6 +47,12 @@ pub static ALL_PROVIDERS: Lazy<HashMap<&'static str, DynProvider>> = Lazy::new(|
|
||||
m
|
||||
});
|
||||
|
||||
pub fn init_providers_now() {
|
||||
// Idempotent & thread-safe: runs the Lazy init exactly once.
|
||||
Lazy::force(&ALL_PROVIDERS);
|
||||
}
|
||||
|
||||
|
||||
#[async_trait]
|
||||
pub trait Provider: Send + Sync {
|
||||
async fn get_videos(
|
||||
|
||||
Reference in New Issue
Block a user