[][src]Struct term::terminfo::TermInfo

pub struct TermInfo {
    pub names: Vec<String>,
    pub bools: HashMap<&'static str, bool>,
    pub numbers: HashMap<&'static str, u32>,
    pub strings: HashMap<&'static str, Vec<u8>>,
}

A parsed terminfo database entry.

Fields

names: Vec<String>

Names for the terminal

bools: HashMap<&'static str, bool>

Map of capability name to boolean value

numbers: HashMap<&'static str, u32>

Map of capability name to numeric value

strings: HashMap<&'static str, Vec<u8>>

Map of capability name to raw (unexpanded) string

Methods

impl TermInfo[src]

pub fn from_env() -> Result<TermInfo>[src]

Create a TermInfo based on current environment.

pub fn from_name(name: &str) -> Result<TermInfo>[src]

Create a TermInfo for the named terminal.

pub fn from_path<P: AsRef<Path>>(path: P) -> Result<TermInfo>[src]

Parse the given TermInfo.

pub fn apply_cap(
    &self,
    cmd: &str,
    params: &[Param],
    out: &mut dyn Write
) -> Result<()>
[src]

Retrieve a capability cmd and expand it with params, writing result to out.

pub fn reset(&self, out: &mut dyn Write) -> Result<()>[src]

Write the reset string to out.

Trait Implementations

impl Clone for TermInfo[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for TermInfo[src]

Auto Trait Implementations

impl Send for TermInfo

impl Sync for TermInfo

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

The type returned in the event of a conversion error.

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