[][src]Function pulldown_cmark_to_cmark::cmark_with_options

pub fn cmark_with_options<'a, I, E, F>(
    events: I,
    formatter: F,
    state: Option<State<'static>>,
    options: Options
) -> Result<State<'static>, Error> where
    I: Iterator<Item = E>,
    E: Borrow<Event<'a>>,
    F: Write

Serialize a stream of pulldown-cmark-Events into a string-backed buffer.

  1. events
  • An iterator over Events, for example as returned by the Parser
  1. formatter
  • A format writer, can be a String.
  1. state
  • The optional initial state of the serialization.
  1. options
  • Customize the appearance of the serialization. All otherwise magic values are contained here.

Returns the State of the serialization on success. You can use it as initial state in the next call if you are halting event serialization. Errors are only happening if the underlying buffer fails, which is unlikely.