Struct terminfo::Database [] [src]

pub struct Database { /* fields omitted */ }

A capability database.

Methods

impl Database
[src]

Create a new database from the given values.

Load a database from the current environment.

Load a database for the given name.

Load a database from the given path.

Load a database from a buffer.

The terminal name.

The terminal aliases.

The terminal description.

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();

Get a capability by name.

This interface only makes sense for extended capabilities since they don't have standardized types.

Example

use terminfo::Database;

let info      = Database::from_env().unwrap();
let truecolor = info.raw("Tc").is_some();

Trait Implementations

impl Eq for Database
[src]

impl PartialEq for Database
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for Database
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Database
[src]

Formats the value using the given formatter.

impl Default for Database
[src]

Returns the "default value" for a type. Read more