Struct terminfo::Database [] [src]

pub struct Database { /* fields omitted */ }

A capability database.

Methods

impl Database
[src]

[src]

Create a new empty database.

[src]

Load a database from the current environment.

[src]

Load a database for the given name.

[src]

Load a database from the given path.

[src]

Load a database from a buffer.

[src]

The terminal name.

[src]

The terminal aliases.

[src]

The terminal description.

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

[src]

Get a capability by name.

Note

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]

[src]

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

[src]

This method tests for !=.

impl Clone for Database
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Database
[src]

[src]

Formats the value using the given formatter.