[−][src]Trait mdcat::Terminal
Write to terminals.
Associated Types
type TerminalWrite: Write
The associated writer of this terminal.
Required Methods
fn name(&self) -> &str
Get a descriptive name for this terminal.
fn write(&mut self) -> &mut Self::TerminalWrite
Get a writer for this terminal.
fn supports_styles(&self) -> bool
Whether this terminal supports styles.
fn set_link(&mut self, destination: &str) -> Result<(), Error>
Set a link to the given destination on the terminal.
To stop a link write a link with an empty destination.
The default implementation errors with NotSupportedError
.
fn set_mark(&mut self) -> Result<(), Error>
Set a jump mark on the terminal.
The default implementation errors with NotSupportedError
.
fn write_inline_image(
&mut self,
max_size: Size,
resource: &Resource,
access: ResourceAccess
) -> Result<(), Error>
&mut self,
max_size: Size,
resource: &Resource,
access: ResourceAccess
) -> Result<(), Error>
Write an inline image from the given resource to the terminal.
The default implementation errors with NotSupportedError
.
Implementors
impl<W: Write> Terminal for AnsiTerminal<W>
[src]
impl<W: Write> Terminal for AnsiTerminal<W>
type TerminalWrite = W
fn name(&self) -> &'static str
[src]
fn name(&self) -> &'static str
fn write(&mut self) -> &mut W
[src]
fn write(&mut self) -> &mut W
fn supports_styles(&self) -> bool
[src]
fn supports_styles(&self) -> bool
fn set_link(&mut self, _destination: &str) -> Result<(), Error>
[src]
fn set_link(&mut self, _destination: &str) -> Result<(), Error>
fn set_mark(&mut self) -> Result<(), Error>
[src]
fn set_mark(&mut self) -> Result<(), Error>
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>
impl<W: Write> Terminal for DumbTerminal<W>
[src]
impl<W: Write> Terminal for DumbTerminal<W>
type TerminalWrite = W
fn name(&self) -> &'static str
[src]
fn name(&self) -> &'static str
fn write(&mut self) -> &mut W
[src]
fn write(&mut self) -> &mut W
fn supports_styles(&self) -> bool
[src]
fn supports_styles(&self) -> bool
fn set_link(&mut self, _destination: &str) -> Result<(), Error>
[src]
fn set_link(&mut self, _destination: &str) -> Result<(), Error>
fn set_mark(&mut self) -> Result<(), Error>
[src]
fn set_mark(&mut self) -> Result<(), Error>
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>