pub trait AsAnyAsyncEngine {
// Required method
fn into_any_engine(self) -> Arc<dyn AnyAsyncEngine>;
}Expand description
An extension trait that provides a convenient way to type-erase an AsyncEngine.
This trait provides the .into_any_engine() method on any Arc<dyn AsyncEngine<...>>,
enabling ergonomic type erasure without explicit wrapper construction.
§Usage
ⓘ
use crate::engine::AsAnyAsyncEngine;
let typed_engine: Arc<dyn AsyncEngine<String, String, ()>> = Arc::new(MyEngine::new());
let any_engine = typed_engine.into_any_engine();Required Methods§
Sourcefn into_any_engine(self) -> Arc<dyn AnyAsyncEngine>
fn into_any_engine(self) -> Arc<dyn AnyAsyncEngine>
Converts a typed AsyncEngine into a type-erased AnyAsyncEngine.