[−][src]Struct html2text::render::text_renderer::TextRenderer
A renderer which just outputs plain text with annotations depending on a decorator.
Methods
impl<D: TextDecorator> TextRenderer<D>
[src]
pub fn new(width: usize, decorator: D) -> TextRenderer<D>
[src]
Construct a new empty TextRenderer.
pub fn add_subblock(&mut self, s: &str)
[src]
Add a prerendered (multiline) string with the current annotations.
pub fn into_string(self) -> String
[src]
Consumes this renderer and return a multiline String
with the result.
pub fn into_lines(self) -> Vec<RenderLine<Vec<D::Annotation>>>
[src]
Returns a Vec
of TaggedLine
s with therendered text.
Trait Implementations
impl<D: TextDecorator> Renderer for TextRenderer<D>
[src]
fn add_empty_line(&mut self)
[src]
fn new_sub_renderer(&self, width: usize) -> Self
[src]
fn start_block(&mut self)
[src]
fn new_line(&mut self)
[src]
fn new_line_hard(&mut self)
[src]
fn add_horizontal_border(&mut self)
[src]
fn start_pre(&mut self)
[src]
fn end_pre(&mut self)
[src]
fn add_preformatted_block(&mut self, text: &str)
[src]
fn end_block(&mut self)
[src]
fn add_inline_text(&mut self, text: &str)
[src]
fn width(&self) -> usize
[src]
fn add_block_line(&mut self, line: &str)
[src]
fn append_subrender<'a, I>(&mut self, other: Self, prefixes: I) where
I: Iterator<Item = &'a str>,
[src]
I: Iterator<Item = &'a str>,
fn append_columns_with_borders<I>(&mut self, cols: I, collapse: bool) where
I: IntoIterator<Item = Self>,
[src]
I: IntoIterator<Item = Self>,
fn empty(&self) -> bool
[src]
fn text_len(&self) -> usize
[src]
fn start_link(&mut self, target: &str)
[src]
fn end_link(&mut self)
[src]
fn start_emphasis(&mut self)
[src]
fn end_emphasis(&mut self)
[src]
fn start_strong(&mut self)
[src]
fn end_strong(&mut self)
[src]
fn start_code(&mut self)
[src]
fn end_code(&mut self)
[src]
fn add_image(&mut self, title: &str)
[src]
fn record_frag_start(&mut self, fragname: &str)
[src]
Auto Trait Implementations
impl<D> RefUnwindSafe for TextRenderer<D> where
D: RefUnwindSafe,
<D as TextDecorator>::Annotation: RefUnwindSafe,
D: RefUnwindSafe,
<D as TextDecorator>::Annotation: RefUnwindSafe,
impl<D> Send for TextRenderer<D> where
D: Send,
<D as TextDecorator>::Annotation: Send,
D: Send,
<D as TextDecorator>::Annotation: Send,
impl<D> Sync for TextRenderer<D> where
D: Sync,
<D as TextDecorator>::Annotation: Sync,
D: Sync,
<D as TextDecorator>::Annotation: Sync,
impl<D> Unpin for TextRenderer<D> where
D: Unpin,
<D as TextDecorator>::Annotation: Unpin,
D: Unpin,
<D as TextDecorator>::Annotation: Unpin,
impl<D> UnwindSafe for TextRenderer<D> where
D: UnwindSafe,
<D as TextDecorator>::Annotation: UnwindSafe,
D: UnwindSafe,
<D as TextDecorator>::Annotation: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,