Skip to main content

DownloadProgress

Trait DownloadProgress 

Source
pub trait DownloadProgress: Send + Sync {
    // Provided methods
    fn on_phase(&self, _version: Option<&Version>, _phase: InstallPhase) { ... }
    fn on_download_start(&self, _total_bytes: Option<u64>) { ... }
    fn on_download_chunk(&self, _bytes: u64) { ... }
    fn on_done(&self) { ... }
    fn on_external_tool_start(&self) { ... }
    fn on_external_tool_end(&self) { ... }
}

Provided Methods§

Source

fn on_phase(&self, _version: Option<&Version>, _phase: InstallPhase)

version is None during InstallPhase::Resolving — the exact version isn’t known until resolution finishes.

Source

fn on_download_start(&self, _total_bytes: Option<u64>)

Source

fn on_download_chunk(&self, _bytes: u64)

Source

fn on_done(&self)

Source

fn on_external_tool_start(&self)

An external tool (mise) is about to inherit the terminal for its own progress output — the CLI pauses any live progress renderer so the two don’t interleave.

Source

fn on_external_tool_end(&self)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§