Struct term_transcript::Captured [−][src]
pub struct Captured(_);
Expand description
Output captured from the terminal.
Implementations
impl Captured
[src]
impl Captured
[src]pub fn to_html(&self) -> Result<String, TermError>
[src]
pub fn to_html(&self) -> Result<String, TermError>
[src]Converts this terminal output to an HTML string.
The conversion applies styles by wrapping colored / styled text into span
s with
the following class
es:
bold
,italic
,dimmed
,underline
are self-explanatoryfg0
,fg1
, …,fg15
are used to indicate indexed 4-bit ANSI color of the text. Indexes 0..=7 correspond to the ordinary color variations, and 8..=15 to the intense ones.bg0
,bg1
, …,bg15
work similarly, but for the background color instead of text color.
Indexed ANSI colors with indexes >15 and ANSI RGB colors are rendered using the style
attribute.
The output string retains whitespace of the input. Hence, it needs to be wrapped
into a pre
element or an element with the white-space
CSS property set to pre
in order to be displayed properly.
Errors
Returns an error if there was an issue processing output.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Captured
impl Send for Captured
impl Sync for Captured
impl Unpin for Captured
impl UnwindSafe for Captured
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more