pub struct TerminalFrontend<W> { /* private fields */ }Expand description
A standard terminal frontend that uses ANSI escape sequences.
This frontend renders output in-place by issuing cursor-up ANSI commands
(\x1b[{n}A) and clearing the current line (\x1b[2K\r).
Implementations§
Source§impl<W: Write> TerminalFrontend<W>
impl<W: Write> TerminalFrontend<W>
Sourcepub const fn with_theme(self, theme: Theme) -> Self
pub const fn with_theme(self, theme: Theme) -> Self
Customizes the visual theme.
Sourcepub const fn with_width(self, width: usize) -> Self
pub const fn with_width(self, width: usize) -> Self
Sets the width of the progress bar (in characters).
Sourcepub const fn with_byte_formatting(self, formatter: ByteFormatter) -> Self
pub const fn with_byte_formatting(self, formatter: ByteFormatter) -> Self
Enables automatic byte formatting for position, total, and throughput
using the provided prettier_bytes::ByteFormatter rules.
Trait Implementations§
Source§impl<W: Write> Frontend for TerminalFrontend<W>
impl<W: Write> Frontend for TerminalFrontend<W>
Source§fn render(&mut self, snapshot: &ProgressSnapshot) -> Result<()>
fn render(&mut self, snapshot: &ProgressSnapshot) -> Result<()>
Renders a single progress snapshot.
Source§fn render_stack(&mut self, stack: &ProgressStackSnapshot) -> Result<()>
fn render_stack(&mut self, stack: &ProgressStackSnapshot) -> Result<()>
Renders a snapshot of a progress stack (multiple trackers).
Auto Trait Implementations§
impl<W> Freeze for TerminalFrontend<W>where
W: Freeze,
impl<W> RefUnwindSafe for TerminalFrontend<W>where
W: RefUnwindSafe,
impl<W> Send for TerminalFrontend<W>where
W: Send,
impl<W> Sync for TerminalFrontend<W>where
W: Sync,
impl<W> Unpin for TerminalFrontend<W>where
W: Unpin,
impl<W> UnsafeUnpin for TerminalFrontend<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for TerminalFrontend<W>where
W: UnwindSafe,
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