[][src]Struct tuikit::output::Output

pub struct Output { /* fields omitted */ }

Output is an abstraction over the ANSI codes.

Implementations

impl Output[src]

pub fn new(stdout: Box<dyn WriteAndAsRawFdAndSend>) -> Result<Self>[src]

pub fn write(&mut self, data: &str)[src]

Write text (Terminal escape sequences will be removed/escaped.)

pub fn write_raw(&mut self, data: &[u8])[src]

Write raw texts to the terminal.

pub fn encoding(&self) -> &str[src]

Return the encoding for this output, e.g. 'utf-8'. (This is used mainly to know which characters are supported by the output the data, so that the UI can provide alternatives, when required.)

pub fn set_title(&mut self, title: &str)[src]

Set terminal title.

pub fn clear_title(&mut self)[src]

Clear title again. (or restore previous title.)

pub fn flush(&mut self)[src]

Write to output stream and flush.

pub fn erase_screen(&mut self)[src]

Erases the screen with the background colour and moves the cursor to home.

pub fn enter_alternate_screen(&mut self)[src]

Go to the alternate screen buffer. (For full screen applications).

pub fn quit_alternate_screen(&mut self)[src]

Leave the alternate screen buffer.

pub fn enable_mouse_support(&mut self)[src]

Enable mouse.

pub fn disable_mouse_support(&mut self)[src]

Disable mouse.

pub fn erase_end_of_line(&mut self)[src]

Erases from the current cursor position to the end of the current line.

pub fn erase_down(&mut self)[src]

Erases the screen from the current line down to the bottom of the screen.

pub fn reset_attributes(&mut self)[src]

Reset color and styling attributes.

pub fn set_fg(&mut self, color: Color)[src]

Set current foreground color

pub fn set_bg(&mut self, color: Color)[src]

Set current background color

pub fn set_effect(&mut self, effect: Effect)[src]

Set current effect (underline, bold, etc)

pub fn set_attribute(&mut self, attr: Attr)[src]

Set new color and styling attributes.

pub fn disable_autowrap(&mut self)[src]

Disable auto line wrapping.

pub fn enable_autowrap(&mut self)[src]

Enable auto line wrapping.

pub fn cursor_goto(&mut self, row: usize, column: usize)[src]

Move cursor position.

pub fn cursor_up(&mut self, amount: usize)[src]

Move cursor amount place up.

pub fn cursor_down(&mut self, amount: usize)[src]

Move cursor amount place down.

pub fn cursor_forward(&mut self, amount: usize)[src]

Move cursor amount place forward.

pub fn cursor_backward(&mut self, amount: usize)[src]

Move cursor amount place backward.

pub fn hide_cursor(&mut self)[src]

Hide cursor.

pub fn show_cursor(&mut self)[src]

Show cursor.

pub fn ask_for_cpr(&mut self)[src]

Asks for a cursor position report (CPR). (VT100 only.)

pub fn bell(&mut self)[src]

Sound bell.

pub fn terminal_size(&self) -> Result<(usize, usize)>[src]

get terminal size (width, height)

pub fn enable_bracketed_paste(&mut self)[src]

For vt100/xterm etc.

pub fn disable_bracketed_paste(&mut self)[src]

For vt100/xterm etc.

pub fn execute(&mut self, cmd: Command)[src]

Execute the command

Auto Trait Implementations

impl !RefUnwindSafe for Output

impl Send for Output

impl !Sync for Output

impl Unpin for Output

impl !UnwindSafe for Output

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.