Skip to main content

Reader

Trait Reader 

Source
pub trait Reader {
    // Required method
    fn read(
        &self,
        input: &str,
        options: &ReaderOptions,
    ) -> Result<Document, Error>;

    // Provided method
    fn read_media(
        &self,
        input: &str,
        options: &ReaderOptions,
    ) -> Result<(Document, MediaBag), Error> { ... }
}
Expand description

Parses input text in some source format into the document model.

Required Methods§

Source

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Parses input text into a document.

§Errors

Propagates any error from parsing the input.

Provided Methods§

Source

fn read_media( &self, input: &str, options: &ReaderOptions, ) -> Result<(Document, MediaBag), Error>

Reads input into a document together with the embedded resources it references. The default carries no resources; a container format — a notebook with image outputs — overrides this to decode those bytes into the returned MediaBag, and implements read by discarding the bag.

§Errors

Propagates any error from parsing the input.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Reader for CommonmarkReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for CsvReader

Source§

fn read(&self, input: &str, _options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for DokuwikiReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for HtmlReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for IpynbReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

fn read_media( &self, input: &str, options: &ReaderOptions, ) -> Result<(Document, MediaBag), Error>

Source§

impl Reader for JiraReader

Source§

fn read(&self, input: &str, _options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for JsonReader

Source§

fn read(&self, input: &str, _options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for LatexReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for ManReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for MediawikiReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for NativeReader

Source§

fn read(&self, input: &str, _options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for OpmlReader

Source§

fn read(&self, input: &str, _options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for OrgReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for RstReader

Source§

fn read(&self, input: &str, options: &ReaderOptions) -> Result<Document, Error>

Source§

impl Reader for TsvReader

Source§

fn read(&self, input: &str, _options: &ReaderOptions) -> Result<Document, Error>

Implementors§