Struct term::terminfo::TerminfoTerminal
[−]
[src]
pub struct TerminfoTerminal<T> { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A Terminal that knows how many colors it supports, with a reference to its parsed Terminfo database record.
Methods
impl<T: Write + Send> TerminfoTerminal<T>
[src]
ⓘImportant traits for TerminfoTerminal<T>pub fn new_with_terminfo(out: T, terminfo: TermInfo) -> TerminfoTerminal<T>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create a new TerminfoTerminal with the given TermInfo and Write.
pub fn new(out: T) -> Option<TerminfoTerminal<T>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Create a new TerminfoTerminal for the current environment with the given Write.
Returns None
when the terminfo cannot be found or parsed.
Trait Implementations
impl<T: Write + Send> Terminal for TerminfoTerminal<T>
[src]
type Output = T
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The terminal's output writer type.
fn fg(&mut self, color: Color) -> Result<bool>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Sets the foreground color to the given color. Read more
fn bg(&mut self, color: Color) -> Result<bool>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Sets the background color to the given color. Read more
fn attr(&mut self, attr: Attr) -> Result<bool>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Sets the given terminal attribute, if supported. Returns Ok(true)
if the attribute was supported, Ok(false)
otherwise, and Err(e)
if there was an I/O error. Read more
fn supports_attr(&self, attr: Attr) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns whether the given terminal attribute is supported.
fn reset(&mut self) -> Result<bool>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Resets all terminal attributes and colors to their defaults. Read more
fn get_ref(&self) -> &T
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Gets an immutable reference to the stream inside
fn get_mut(&mut self) -> &mut T
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Gets a mutable reference to the stream inside
fn into_inner(self) -> T where
Self: Sized,
[src]
Self: Sized,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns the contained stream, destroying the Terminal
impl<T: Write> Write for TerminfoTerminal<T>
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
Write a buffer into this object, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<()>
[src]
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
Attempts to write an entire buffer into this write. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
Writes a formatted string into this writer, returning any error encountered. Read more
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
Creates a "by reference" adaptor for this instance of Write
. Read more