Struct term::terminfo::TermInfo [−][src]
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]
impl TermInfo
pub fn from_env() -> Result<TermInfo>
[src]
pub fn from_env() -> Result<TermInfo>
Create a TermInfo
based on current environment.
pub fn from_name(name: &str) -> Result<TermInfo>
[src]
pub fn from_name(name: &str) -> Result<TermInfo>
Create a TermInfo
for the named terminal.
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<TermInfo>
[src]
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<TermInfo>
Parse the given TermInfo
.
pub fn apply_cap(
&self,
cmd: &str,
params: &[Param],
out: &mut Write
) -> Result<()>
[src]
pub fn apply_cap(
&self,
cmd: &str,
params: &[Param],
out: &mut Write
) -> Result<()>
Retrieve a capability cmd
and expand it with params
, writing result to out
.
pub fn reset(&self, out: &mut Write) -> Result<()>
[src]
pub fn reset(&self, out: &mut Write) -> Result<()>
Write the reset string to out
.
Trait Implementations
impl Debug for TermInfo
[src]
impl Debug for TermInfo
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for TermInfo
[src]
impl Clone for TermInfo