pub struct EngineRegistry { /* private fields */ }Expand description
Holds every registered engine, keyed by task and name.
Feature crates (ffai-mercury, ffai-carmenta, ffai-argus) each expose
a register(&mut EngineRegistry) that installs their engines; the CLI (or
any embedding application) composes the registry it wants. A future plugin
is just an engine registered at runtime — the architecture doesn’t change.
Implementations§
Source§impl EngineRegistry
impl EngineRegistry
pub fn new() -> Self
pub fn register_asr(&mut self, engine: Arc<dyn AsrEngine>)
pub fn register_tts(&mut self, engine: Arc<dyn TtsEngine>)
pub fn register_ocr(&mut self, engine: Arc<dyn OcrEngine>)
pub fn register_vlm(&mut self, engine: Arc<dyn VlmEngine>)
pub fn register_depth(&mut self, engine: Arc<dyn DepthEngine>)
pub fn register_detect(&mut self, engine: Arc<dyn DetectEngine>)
Sourcepub fn asr(&self, name: Option<&str>) -> Result<Arc<dyn AsrEngine>>
pub fn asr(&self, name: Option<&str>) -> Result<Arc<dyn AsrEngine>>
Resolve an ASR engine; None selects the default (first registered).
pub fn tts(&self, name: Option<&str>) -> Result<Arc<dyn TtsEngine>>
pub fn ocr(&self, name: Option<&str>) -> Result<Arc<dyn OcrEngine>>
pub fn vlm(&self, name: Option<&str>) -> Result<Arc<dyn VlmEngine>>
pub fn depth(&self, name: Option<&str>) -> Result<Arc<dyn DepthEngine>>
pub fn detect(&self, name: Option<&str>) -> Result<Arc<dyn DetectEngine>>
Sourcepub fn list(&self) -> Vec<EngineInfo>
pub fn list(&self) -> Vec<EngineInfo>
All engine metadata, ordered by task then name (for ffai engines).
Trait Implementations§
Source§impl Default for EngineRegistry
impl Default for EngineRegistry
Source§fn default() -> EngineRegistry
fn default() -> EngineRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for EngineRegistry
impl !UnwindSafe for EngineRegistry
impl Freeze for EngineRegistry
impl Send for EngineRegistry
impl Sync for EngineRegistry
impl Unpin for EngineRegistry
impl UnsafeUnpin for EngineRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more