Fields
writer: Writer<W>
cursor: Cursor<W>
prompt: String
Implementations
sourceimpl<W: Write> Printer<W>
impl<W: Write> Printer<W>
pub fn print_input(
&mut self,
process_function: &dyn Fn(&Buffer) -> PrintQueue,
buffer: &Buffer
) -> Result<()>
sourcepub fn print_input_from_queue(
&mut self,
queue: PrintQueue,
buffer: &Buffer
) -> Result<()>
pub fn print_input_from_queue(
&mut self,
queue: PrintQueue,
buffer: &Buffer
) -> Result<()>
FIXME: This function takes the buffer just to calculate if it needs scrolling
pub fn print_output(&mut self, printer: PrintQueue) -> Result<()>
pub fn scroll_if_needed_for_input(&mut self, buffer: &Buffer)
pub fn recalculate_bounds(&mut self, printer: PrintQueue) -> Result<()>
pub fn print_prompt_if_set(&mut self) -> Result<()>
pub fn prompt_len(&self) -> usize
pub fn set_prompt(&mut self, prompt: String)
sourceimpl<W: Write> Printer<W>
impl<W: Write> Printer<W>
pub fn write_from_terminal_start(
&mut self,
out: &str,
color: Color
) -> Result<()>
pub fn clear(&mut self) -> Result<()>
pub fn clear_last_line(&mut self) -> Result<()>
pub fn write_newline(&mut self, buffer: &Buffer)
pub fn write(&mut self, out: &str, color: Color) -> Result<()>
pub fn write_at(&mut self, s: &str, x: usize, y: usize) -> Result<()>
pub fn write_at_no_cursor(
&mut self,
s: &str,
color: Color,
x: usize,
y: usize
) -> Result<()>
pub fn scroll_up(&mut self, n: usize)
pub fn print_extra_lines_indicator_if_needed(
&mut self,
from_start: bool
) -> Result<()>
Trait Implementations
Auto Trait Implementations
impl<W> !RefUnwindSafe for Printer<W>
impl<W> !Send for Printer<W>
impl<W> !Sync for Printer<W>
impl<W> Unpin for Printer<W>
impl<W> !UnwindSafe for Printer<W>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more