[][src]Struct struckdown::html::HtmlRenderer

pub struct HtmlRenderer<'data, 'options, F> { /* fields omitted */ }

Object capable of rendering events to HTML.

Implementations

impl<'data, 'options, F: Write> HtmlRenderer<'data, 'options, F>[src]

pub fn new(
    out: F,
    options: &'options HtmlRendererOptions
) -> HtmlRenderer<'data, 'options, F>
[src]

Creates a new renderer that writes into a writer.

pub fn into_writer(self) -> F[src]

Consumes the writer and returns the inner file.

pub fn feed_event(&mut self, event: &AnnotatedEvent<'data>) -> Result<(), Error>[src]

Feeds a single event into the renderer.

pub fn feed_stream<I>(&mut self, iter: I) -> Result<(), Error> where
    I: Iterator<Item = AnnotatedEvent<'data>>, 
[src]

Feeds an event stream into the renderer.

In this case the iterator is consumed. Alternatively you can/have to use feed_event directly which lets you pass events by reference instead.

impl<'data, 'options> HtmlRenderer<'data, 'options, Vec<u8>>[src]

pub fn new_buffered(options: &'options HtmlRendererOptions) -> Self[src]

Creates a new html renderer writing into a buffer.

pub fn into_string(self) -> String[src]

Converts the renderer into a string.

Auto Trait Implementations

impl<'data, 'options, F> RefUnwindSafe for HtmlRenderer<'data, 'options, F> where
    F: RefUnwindSafe
[src]

impl<'data, 'options, F> Send for HtmlRenderer<'data, 'options, F> where
    F: Send
[src]

impl<'data, 'options, F> Sync for HtmlRenderer<'data, 'options, F> where
    F: Sync
[src]

impl<'data, 'options, F> Unpin for HtmlRenderer<'data, 'options, F> where
    F: Unpin
[src]

impl<'data, 'options, F> UnwindSafe for HtmlRenderer<'data, 'options, F> where
    F: UnwindSafe
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,