[][src]Struct html2text::render::text_renderer::TextRenderer

pub struct TextRenderer<D: TextDecorator> { /* fields omitted */ }

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 TaggedLines with therendered text.

Trait Implementations

impl<D: TextDecorator> Renderer for TextRenderer<D>[src]

Auto Trait Implementations

impl<D> RefUnwindSafe for TextRenderer<D> where
    D: RefUnwindSafe,
    <D as TextDecorator>::Annotation: RefUnwindSafe

impl<D> Send for TextRenderer<D> where
    D: Send,
    <D as TextDecorator>::Annotation: Send

impl<D> Sync for TextRenderer<D> where
    D: Sync,
    <D as TextDecorator>::Annotation: Sync

impl<D> Unpin for TextRenderer<D> where
    D: Unpin,
    <D as TextDecorator>::Annotation: Unpin

impl<D> UnwindSafe for TextRenderer<D> where
    D: UnwindSafe,
    <D as TextDecorator>::Annotation: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.