Struct console_static_text::ConsoleStaticText
source · pub struct ConsoleStaticText { /* private fields */ }
Implementations§
source§impl ConsoleStaticText
impl ConsoleStaticText
pub fn new(console_size: impl Fn() -> ConsoleSize + Send + 'static) -> Self
sourcepub fn new_sized() -> Option<Self>
pub fn new_sized() -> Option<Self>
Gets a ConsoleStaticText
that knows how to get the console size.
Returns None
when stderr is not a tty or the console size can’t be
retrieved from stderr.
sourcepub fn keep_cursor_zero_column(&mut self, value: bool)
pub fn keep_cursor_zero_column(&mut self, value: bool)
Keeps the cursor at the zero column.
pub fn console_size(&self) -> ConsoleSize
pub fn eprint_clear(&mut self)
pub fn render_clear(&mut self) -> Option<String>
pub fn render_clear_with_size(&mut self, size: ConsoleSize) -> Option<String>
pub fn eprint(&mut self, new_text: &str)
pub fn eprint_with_size(&mut self, new_text: &str, size: ConsoleSize)
pub fn render(&mut self, new_text: &str) -> Option<String>
pub fn render_with_size( &mut self, new_text: &str, size: ConsoleSize ) -> Option<String>
pub fn eprint_items<'a>( &mut self, text_items: impl Iterator<Item = &'a TextItem<'a>> )
pub fn eprint_items_with_size<'a>( &mut self, text_items: impl Iterator<Item = &'a TextItem<'a>>, size: ConsoleSize )
pub fn render_items<'a>( &mut self, text_items: impl Iterator<Item = &'a TextItem<'a>> ) -> Option<String>
pub fn render_items_with_size<'a>( &mut self, text_items: impl Iterator<Item = &'a TextItem<'a>>, size: ConsoleSize ) -> Option<String>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ConsoleStaticText
impl Send for ConsoleStaticText
impl !Sync for ConsoleStaticText
impl Unpin for ConsoleStaticText
impl !UnwindSafe for ConsoleStaticText
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