pub struct Termcap { /* private fields */ }Expand description
The core interface for querying the system’s termcap database for capabilities of a terminal.
Implementations§
Source§impl Termcap
impl Termcap
Sourcepub fn load_from_path(path: &Path) -> IoResult<Termcap>
pub fn load_from_path(path: &Path) -> IoResult<Termcap>
Loads the specified termcap file.
Sourcepub fn get_env<'a>(&'a self) -> Option<Capabilities<'a>>
pub fn get_env<'a>(&'a self) -> Option<Capabilities<'a>>
Gets the matching termcap(5) entry for the current value of $TERM.
Returns None if $TERM is not set or if there is no entry in the termcap database for the
current $TERM value. See get() to look up by terminal name without relying
on the presence of any particular environment value.
Sourcepub fn get<'a>(&'a self, term: &str) -> Option<Capabilities<'a>>
pub fn get<'a>(&'a self, term: &str) -> Option<Capabilities<'a>>
Gets the matching termcap(5) entry for the terminal with a name or code matching term.
Returns None if there is no match for this terminal name/code in the termcap(5) database
or if the termcap database could not be found.
Auto Trait Implementations§
impl Freeze for Termcap
impl RefUnwindSafe for Termcap
impl Send for Termcap
impl Sync for Termcap
impl Unpin for Termcap
impl UnwindSafe for Termcap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more