Struct terminfo::Database
[−]
[src]
pub struct Database { /* fields omitted */ }
A capability database.
Methods
impl Database
[src]
fn new() -> Builder
[src]
Create a new empty database.
fn from_env() -> Result<Self>
[src]
Load a database from the current environment.
fn from_name<N: AsRef<str>>(name: N) -> Result<Self>
[src]
Load a database for the given name.
fn from_path<P: AsRef<Path>>(path: P) -> Result<Self>
[src]
Load a database from the given path.
fn from_buffer<T: AsRef<[u8]>>(buffer: T) -> Result<Self>
[src]
Load a database from a buffer.
fn name(&self) -> &str
[src]
The terminal name.
fn aliases(&self) -> &[String]
[src]
The terminal aliases.
fn description(&self) -> &str
[src]
The terminal description.
fn get<'a, C: Capability<'a>>(&'a self) -> Option<C>
[src]
Get a capability.
Example
use terminfo::{Database, capability as cap}; let info = Database::from_env().unwrap(); let colors: i16 = info.get::<cap::MaxColors>().unwrap().into();
fn raw<S: AsRef<str>>(&self, name: S) -> Option<&Value>
[src]
Trait Implementations
impl Eq for Database
[src]
impl PartialEq for Database
[src]
fn eq(&self, __arg_0: &Database) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Database) -> bool
[src]
This method tests for !=
.
impl Clone for Database
[src]
fn clone(&self) -> Database
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more