[−][src]Function pulldown_cmark_to_cmark::fmt::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.
- events
- formatter
- A format writer, can be a
String
.
- state
- The optional initial state of the serialization.
- 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.