pub struct AutoLive<W: Write + Send + 'static> { /* private fields */ }Expand description
Implementations§
Source§impl<W: Write + Send + 'static> AutoLive<W>
impl<W: Write + Send + 'static> AutoLive<W>
Sourcepub fn update(&self, renderable: Box<dyn Renderable + Send>)
pub fn update(&self, renderable: Box<dyn Renderable + Send>)
Swap in a new renderable; the thread redraws it promptly.
Sourcepub fn print(&self, renderable: Box<dyn Renderable + Send>)
pub fn print(&self, renderable: Box<dyn Renderable + Send>)
Print renderable above the display (Live::print), on the thread.
Sourcepub fn print_str(&self, content: impl Into<String>)
pub fn print_str(&self, content: impl Into<String>)
Print a string as console markup above the display
(Live::print_str), on the thread.
Sourcepub fn log(
&self,
objects: &[LogObject<'_>],
options: &LogOptions<'_>,
) -> Result<()>
pub fn log( &self, objects: &[LogObject<'_>], options: &LogOptions<'_>, ) -> Result<()>
Log above the display (Live::log), on the thread.
Sourcepub fn handle(&self) -> LiveHandle<W>
pub fn handle(&self) -> LiveHandle<W>
A cloneable handle to the thread, for proxies and prints from other threads.
Sourcepub fn stdout(&self) -> FileProxy<LiveHandle<W>, Stdout> ⓘ
pub fn stdout(&self) -> FileProxy<LiveHandle<W>, Stdout> ⓘ
A writer standing in for stdout while the display runs (upstream’s
sys.stdout FileProxy); see Live::stdout.
Sourcepub fn file_proxy<F: Write>(
&self,
stream: ProxyStream,
file: F,
) -> FileProxy<LiveHandle<W>, F> ⓘ
pub fn file_proxy<F: Write>( &self, stream: ProxyStream, file: F, ) -> FileProxy<LiveHandle<W>, F> ⓘ
A proxy for stream over any file, which receives the writes when
the display is not redirecting.
Sourcepub fn refresh_wait(&self)
pub fn refresh_wait(&self)
Redraw now and wait until the frame is written, as upstream’s
Live.refresh() renders in the caller’s thread. A renderable that reads
shared state then shows the state as of this call.
Trait Implementations§
Auto Trait Implementations§
impl<W> !RefUnwindSafe for AutoLive<W>
impl<W> !UnwindSafe for AutoLive<W>
impl<W> Freeze for AutoLive<W>
impl<W> Send for AutoLive<W>
impl<W> Sync for AutoLive<W>
impl<W> Unpin for AutoLive<W>
impl<W> UnsafeUnpin for AutoLive<W>
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