pub fn parse_from_reader<R: Read>(
reader: R,
options: &Options,
) -> Result<Document, Error>Expand description
Parse AsciiDoc content from a reader.
This function reads the content from the provided reader and parses it as AsciiDoc.
§Example
use acdc_parser::{Options, SafeMode, parse_from_reader};
use std::fs::File;
let options = Options::builder()
.with_safe_mode(SafeMode::Unsafe)
.build();
let file = File::open("fixtures/samples/README.adoc").unwrap();
let document = parse_from_reader(file, &options).unwrap();§Errors
This function returns an error if the content cannot be parsed.