Struct term::terminfo::TerminfoTerminal [] [src]

pub struct TerminfoTerminal<T> {
    // some fields omitted
}

A Terminal that knows how many colors it supports, with a reference to its parsed Terminfo database record.

Methods

impl<T: Write + Send> TerminfoTerminal<T>

fn new_with_terminfo(out: T, terminfo: TermInfo) -> TerminfoTerminal<T>

Create a new TerminfoTerminal with the given TermInfo and Write.

fn new(out: T) -> Option<TerminfoTerminal<T>>

Create a new TerminfoTerminal for the current environment with the given Write.

Returns None when the terminfo cannot be found or parsed.

Trait Implementations

impl<T: Write + Send> Terminal for TerminfoTerminal<T>

type Output = T

fn fg(&mut self, color: Color) -> Result<bool>

fn bg(&mut self, color: Color) -> Result<bool>

fn attr(&mut self, attr: Attr) -> Result<bool>

fn supports_attr(&self, attr: Attr) -> bool

fn reset(&mut self) -> Result<bool>

fn cursor_up(&mut self) -> Result<bool>

fn delete_line(&mut self) -> Result<bool>

fn carriage_return(&mut self) -> Result<bool>

fn get_ref<'a>(&'a self) -> &'a T

fn get_mut<'a>(&'a mut self) -> &'a mut T

fn into_inner(self) -> T where Self: Sized

impl<T: Write> Write for TerminfoTerminal<T>

fn write(&mut self, buf: &[u8]) -> Result<usize>

fn flush(&mut self) -> Result<()>

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>

fn by_ref(&mut self) -> &mut Self

fn broadcast<W>(self, other: W) -> Broadcast<Self, W> where W: Write