pub struct EngineManager {
pub registry: Arc<RwLock<EngineRegistry>>,
pub downloader: Arc<EngineDownloader>,
pub analyzer: Arc<HardwareAnalyzer>,
pub hardware_capabilities: HardwareCapabilities,
}Expand description
Main engine management service
Fields§
§registry: Arc<RwLock<EngineRegistry>>§downloader: Arc<EngineDownloader>§analyzer: Arc<HardwareAnalyzer>§hardware_capabilities: HardwareCapabilitiesImplementations§
Source§impl EngineManager
impl EngineManager
pub fn new() -> Result<Self>
Sourcepub async fn initialize(&self, _cfg: &Config) -> Result<bool>
pub async fn initialize(&self, _cfg: &Config) -> Result<bool>
Initialize the engine manager and ensure a suitable engine is available
Sourcepub async fn check_suitable_engine(&self) -> Result<bool>
pub async fn check_suitable_engine(&self) -> Result<bool>
Check if we have an engine suitable for current hardware
Sourcepub async fn select_best_engine(&self) -> Result<Option<EngineInfo>>
pub async fn select_best_engine(&self) -> Result<Option<EngineInfo>>
Select and set the best engine for current hardware as default
Sourcepub async fn download_suitable_engine(&self) -> Result<EngineInfo>
pub async fn download_suitable_engine(&self) -> Result<EngineInfo>
Download and install a suitable engine for current hardware
Sourcepub async fn ensure_engine_available(&self) -> Result<bool>
pub async fn ensure_engine_available(&self) -> Result<bool>
Ensures an engine is available, downloading if necessary. This method is designed for automatic recovery scenarios. Returns Ok(true) if engine is available, Ok(false) if download failed.
Sourcepub fn get_hardware_info(&self) -> &HardwareCapabilities
pub fn get_hardware_info(&self) -> &HardwareCapabilities
Get information about current hardware capabilities
Sourcepub async fn refresh_available_engines(&self) -> Result<()>
pub async fn refresh_available_engines(&self) -> Result<()>
Refresh available engines from remote sources
Sourcepub async fn get_status_info(&self) -> String
pub async fn get_status_info(&self) -> String
Get detailed status information about the engine manager
Sourcepub async fn install_engine_by_id(&self, engine_id: &str) -> Result<EngineInfo>
pub async fn install_engine_by_id(&self, engine_id: &str) -> Result<EngineInfo>
Install a specific engine by ID
Auto Trait Implementations§
impl Freeze for EngineManager
impl !RefUnwindSafe for EngineManager
impl Send for EngineManager
impl Sync for EngineManager
impl Unpin for EngineManager
impl UnsafeUnpin for EngineManager
impl !UnwindSafe for EngineManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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