pub struct Painter { /* private fields */ }Expand description
Implementation of the output to the terminal
Implementations§
Source§impl Painter
impl Painter
Sourcepub fn screen_height(&self) -> u16
pub fn screen_height(&self) -> u16
Height of the current terminal window
Sourcepub fn screen_width(&self) -> u16
pub fn screen_width(&self) -> u16
Width of the current terminal window
Sourcepub fn remaining_lines_real(&self) -> u16
pub fn remaining_lines_real(&self) -> u16
Returns the empty lines from the prompt down.
Sourcepub fn remaining_lines(&self) -> u16
pub fn remaining_lines(&self) -> u16
Returns the number of lines that are available or can be made available by stripping the prompt.
If you want the number of empty lines below the prompt,
use Painter::remaining_lines_real instead.
Sourcepub fn state_before_suspension(&self) -> PainterSuspendedState
pub fn state_before_suspension(&self) -> PainterSuspendedState
Returns the state necessary before suspending the painter (to run a host command event).
This state will be used to re-initialize the painter to re-use last prompt if possible.
Auto Trait Implementations§
impl Freeze for Painter
impl RefUnwindSafe for Painter
impl Send for Painter
impl Sync for Painter
impl Unpin for Painter
impl UnwindSafe for Painter
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more