Trait Loader

Source
pub trait Loader:
    Debug
    + Serialize
    + Deserialize {
    // Required method
    fn load(
        &self,
        input: &str,
        accept_draft: bool,
    ) -> Result<Option<Document<Ast>>>;
}
Expand description

A loader creates an initial Document from a raw input string loaded from a content file.

Required Methods§

Source

fn load(&self, input: &str, accept_draft: bool) -> Result<Option<Document<Ast>>>

Perform any parsing/conversion necessary.

Trait Implementations§

Source§

impl<'typetag> Serialize for dyn Loader + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn Loader + Send + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn Loader + Send + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn Loader + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Implementors§