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 set_semantic_markers(
&mut self,
markers: Option<Box<dyn SemanticPromptMarkers>>,
)
pub fn set_semantic_markers( &mut self, markers: Option<Box<dyn SemanticPromptMarkers>>, )
Sets the semantic prompt markers for terminal integration (OSC 133/633)
Sourcepub fn semantic_markers(&self) -> Option<&dyn SemanticPromptMarkers>
pub fn semantic_markers(&self) -> Option<&dyn SemanticPromptMarkers>
Returns a reference to the semantic prompt markers, if any
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 !RefUnwindSafe for Painter
impl !UnwindSafe for Painter
impl Freeze for Painter
impl Send for Painter
impl Sync for Painter
impl Unpin for Painter
impl UnsafeUnpin 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