Function cmark_resume_with_options

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

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
  2. formatter
    • A format writer, can be a String.
  3. state
    • The optional initial state of the serialization.
  4. 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 if the underlying buffer fails (which is unlikely) or if the Event stream cannot ever be produced by deserializing valid Markdown. Each failure mode corresponds to one of Error’s variants.