Skip to main content

LiveStatus

Struct LiveStatus 

Source
pub struct LiveStatus<W: Write + Send + 'static> { /* private fields */ }
Expand description

A running Status display, returned by Status::start.

Implementations§

Source§

impl<W: Write + Send + 'static> LiveStatus<W>

Source

pub fn update( &self, status: Option<&str>, spinner: Option<&str>, spinner_style: Option<StyleType>, speed: Option<f64>, )

Status::update on the running status. As upstream, a new spinner redraws at once (and returns once drawn); other changes show at the next refresh.

Source

pub fn with<R>(&self, f: impl FnOnce(&mut Status) -> R) -> R

Run f on the running status (for Status::update_text and Status::update_renderable); the change shows at the next refresh.

Source

pub fn refresh(&self)

Redraw now, returning once the frame is written (upstream’s status._live.refresh()).

Source

pub fn print(&self, renderable: Box<dyn Renderable + Send>)

Print renderable above the status (upstream’s status.console.print).

Source

pub fn print_str(&self, content: impl Into<String>)

print a string as console markup.

Source

pub fn stdout(&self) -> FileProxy<LiveHandle<W>, Stdout> ⓘ

A writer standing in for stdout while the status runs; see AutoLive::stdout.

Source

pub fn stderr(&self) -> FileProxy<LiveHandle<W>, Stderr> ⓘ

stdout for stderr.

Source

pub fn file_proxy<F: Write>( &self, stream: ProxyStream, file: F, ) -> FileProxy<LiveHandle<W>, F> ⓘ

A proxy for stream over any file.

Source

pub fn stop(self) -> W

Stop the animation, erase the status, and return the output sink. Port of Status.stop.

Auto Trait Implementations§

§

impl<W> !RefUnwindSafe for LiveStatus<W>

§

impl<W> !UnwindSafe for LiveStatus<W>

§

impl<W> Freeze for LiveStatus<W>
where AutoLive<W>: Freeze,

§

impl<W> Send for LiveStatus<W>
where AutoLive<W>: Send,

§

impl<W> Sync for LiveStatus<W>
where AutoLive<W>: Sync,

§

impl<W> Unpin for LiveStatus<W>
where AutoLive<W>: Unpin,

§

impl<W> UnsafeUnpin for LiveStatus<W>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.