Skip to main content

Frontend

Trait Frontend 

Source
pub trait Frontend {
    // Required methods
    fn render(&mut self, snapshot: &ProgressSnapshot) -> Result<()>;
    fn render_stack(
        &mut self,
        stack_snapshot: &ProgressStackSnapshot,
    ) -> Result<()>;
    fn clear(&mut self) -> Result<()>;
    fn finish(&mut self) -> Result<()>;
}
Expand description

A trait for rendering progress state.

By implementing this trait, you can direct progress updates to any output mechanism: a terminal, a GUI framework, a log file, or a network socket.

Required Methods§

Source

fn render(&mut self, snapshot: &ProgressSnapshot) -> Result<()>

Renders a single progress snapshot.

Source

fn render_stack(&mut self, stack_snapshot: &ProgressStackSnapshot) -> Result<()>

Renders a snapshot of a progress stack (multiple trackers).

Source

fn clear(&mut self) -> Result<()>

Clears the rendered progress indicators from the screen.

Source

fn finish(&mut self) -> Result<()>

Signals that progress tracking is finished, allowing the frontend to clean up or flush its output.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§