pub struct Terminal { num_colors: u16, priv out: @std::io::Writer, priv ti: ~TermInfo, }
impl Terminal
fn new(out: @std::io::Writer) -> std::result::Result
fn fg(&self, color: Color) -> bool
Sets the foreground color to the given color.
If the color is a bright color, but the terminal only supports 8 colors, the corresponding normal color will be used instead.
Returns true if the color was set, false otherwise.
fn bg(&self, color: Color) -> bool
Sets the background color to the given color.
If the color is a bright color, but the terminal only supports 8 colors, the corresponding normal color will be used instead.
Returns true if the color was set, false otherwise.
fn attr(&self, attr: Attr) -> bool
Sets the given terminal attribute, if supported. Returns true if the attribute was supported, false otherwise.
fn supports_attr(&self, attr: Attr) -> bool
Returns whether the given terminal attribute is supported.
fn reset(&self)
Resets all terminal attributes and color to the default.
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).