[−][src]Struct mdcat::AnsiTerminal
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.
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_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,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Erased for T
impl<T> Erased for T