[−][src]Struct terminfo::Database
A capability database.
Implementations
impl Database
[src]
pub fn new() -> Builder
[src]
Create a new empty database.
pub fn from_env() -> Result<Self>
[src]
Load a database from the current environment.
pub fn from_name<N: AsRef<str>>(name: N) -> Result<Self>
[src]
Load a database for the given name.
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self>
[src]
Load a database from the given path.
pub fn from_buffer<T: AsRef<[u8]>>(buffer: T) -> Result<Self>
[src]
Load a database from a buffer.
pub fn name(&self) -> &str
[src]
The terminal name.
pub fn aliases(&self) -> &[String]
[src]
The terminal aliases.
pub fn description(&self) -> &str
[src]
The terminal description.
pub 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: i32 = info.get::<cap::MaxColors>().unwrap().into();
pub fn raw<S: AsRef<str>>(&self, name: S) -> Option<&Value>
[src]
Trait Implementations
impl Clone for Database
[src]
impl Debug for Database
[src]
impl Eq for Database
[src]
impl<'a> Into<Database> for Database<'a>
[src]
impl PartialEq<Database> for Database
[src]
impl StructuralEq for Database
[src]
impl StructuralPartialEq for Database
[src]
Auto Trait Implementations
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,