Skip to main content

HumusQuerySettings

Trait HumusQuerySettings 

Source
pub trait HumusQuerySettings: Clone {
    // Required methods
    fn get_format(&self) -> HumusFormatIdentifier;
    fn get_preferred_language(&self) -> Option<UnicodeLanguageIdentifier>;
}
Expand description

Provides context from the query for use in the crate::HumusEngine.

Its main job is the provide the requested format and the preferred language so that the Engine knows which output to produce.

For a default implementation see TemplateSetting.

Required Methods§

Source

fn get_format(&self) -> HumusFormatIdentifier

Returns the requested output format.

Source

fn get_preferred_language(&self) -> Option<UnicodeLanguageIdentifier>

Returns the preferred language for the template

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§