Struct mdcat::AnsiTerminal [−][src]
pub struct AnsiTerminal<W: Write> { /* fields omitted */ }
A simple ANSI terminal with support for basic ANSI styles.
This represents most ordinary terminal emulators.
Methods
impl<W: Write> AnsiTerminal<W>
[src]
impl<W: Write> AnsiTerminal<W>
pub fn new(writer: W) -> AnsiTerminal<W>
[src]
pub fn new(writer: W) -> AnsiTerminal<W>
Create a new ANSI terminal for th given writer.
pub fn write_osc(&mut self, command: &str) -> Result<()>
[src]
pub fn write_osc(&mut self, command: &str) -> Result<()>
Write an OSC command
to this terminal.
pub fn write_sgr(&mut self, command: &str) -> Result<()>
[src]
pub fn write_sgr(&mut self, command: &str) -> Result<()>
Write a CSI SGR command
to this terminal.
See https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_sequences.
pub fn write_style(&mut self, style: AnsiStyle) -> Result<()>
[src]
pub fn write_style(&mut self, style: AnsiStyle) -> Result<()>
Write an ANSI style to this terminal.
Trait Implementations
impl<W: Write> Terminal for AnsiTerminal<W>
[src]
impl<W: Write> Terminal for AnsiTerminal<W>
type TerminalWrite = W
The associated writer of this terminal.
fn name(&self) -> &'static str
[src]
fn name(&self) -> &'static str
Get a descriptive name for this terminal.
fn write(&mut self) -> &mut W
[src]
fn write(&mut self) -> &mut W
Get a writer for this terminal.
fn supports_styles(&self) -> bool
[src]
fn supports_styles(&self) -> bool
Whether this terminal supports styles.
fn set_style(&mut self, style: AnsiStyle) -> Result<(), Error>
[src]
fn set_style(&mut self, style: AnsiStyle) -> Result<(), Error>
Active a style on the terminal. Read more
fn set_link(&mut self, _destination: &str) -> Result<(), Error>
[src]
fn set_link(&mut self, _destination: &str) -> Result<(), Error>
Set a link to the given destination on the terminal. Read more
fn set_mark(&mut self) -> Result<(), Error>
[src]
fn set_mark(&mut self) -> Result<(), Error>
Set a jump mark on the terminal. Read more
fn write_inline_image(
&mut self,
_max_size: Size,
_resources: &Resource,
_access: ResourceAccess
) -> Result<(), Error>
[src]
fn write_inline_image(
&mut self,
_max_size: Size,
_resources: &Resource,
_access: ResourceAccess
) -> Result<(), Error>
Write an inline image from the given resource to the terminal. Read more
Auto Trait Implementations
impl<W> Send for AnsiTerminal<W> where
W: Send,
impl<W> Send for AnsiTerminal<W> where
W: Send,
impl<W> Sync for AnsiTerminal<W> where
W: Sync,
impl<W> Sync for AnsiTerminal<W> where
W: Sync,