Skip to main content

Includer

Trait Includer 

Source
pub trait Includer<'t> {
    type Error;

    // Required methods
    fn include_pages(
        &mut self,
        includes: &[IncludeRef<'t>],
    ) -> Result<Vec<FetchedPage<'t>>, Self::Error>;
    fn no_such_include(
        &mut self,
        page_ref: &PageRef,
    ) -> Result<Cow<'t, str>, Self::Error>;
}
Expand description

A trait that handles the formatting of included pages.

Required Associated Types§

Required Methods§

Source

fn include_pages( &mut self, includes: &[IncludeRef<'t>], ) -> Result<Vec<FetchedPage<'t>>, Self::Error>

Returns a list of the pages included.

Source

fn no_such_include( &mut self, page_ref: &PageRef, ) -> Result<Cow<'t, str>, Self::Error>

Handles the inclusion of a page not found.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§