pub struct EngineDownloader { /* private fields */ }Expand description
Handles downloading and installing engines
Implementations§
Source§impl EngineDownloader
impl EngineDownloader
pub fn new() -> Self
Sourcepub async fn download_engine(
&self,
engine_info: &EngineInfo,
) -> Result<EngineInfo>
pub async fn download_engine( &self, engine_info: &EngineInfo, ) -> Result<EngineInfo>
Download and install an engine
Sourcepub async fn is_engine_downloaded(&self, engine_id: &str) -> Result<bool>
pub async fn is_engine_downloaded(&self, engine_id: &str) -> Result<bool>
Check if an engine is already downloaded
Sourcepub async fn get_download_progress(
&self,
engine_id: &str,
) -> Result<Option<f64>>
pub async fn get_download_progress( &self, engine_id: &str, ) -> Result<Option<f64>>
Get download progress for an engine
Sourcepub async fn get_all_download_progress(&self) -> Vec<EngineDownloadProgress>
pub async fn get_all_download_progress(&self) -> Vec<EngineDownloadProgress>
Get all download progresses
Sourcepub fn progress_tracker(&self) -> &Arc<EngineDownloadProgressTracker>
pub fn progress_tracker(&self) -> &Arc<EngineDownloadProgressTracker>
Get reference to progress tracker
Sourcepub async fn cancel_download(&self, engine_id: &str) -> Result<()>
pub async fn cancel_download(&self, engine_id: &str) -> Result<()>
Cancel an ongoing download
Auto Trait Implementations§
impl Freeze for EngineDownloader
impl !RefUnwindSafe for EngineDownloader
impl Send for EngineDownloader
impl Sync for EngineDownloader
impl Unpin for EngineDownloader
impl UnsafeUnpin for EngineDownloader
impl !UnwindSafe for EngineDownloader
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