pub struct ComposeOptions {
pub template: TemplateChoice,
pub template_config: BTreeMap<String, BTreeMap<String, Map<String, Value>>>,
}Expand description
The render options of the feature compose, set per render request: the compose
template each output is assembled with, and each compose template’s own settings.
It is an option type bound to the render request (Bind::Render;
crate::model::options). A host combines its value from its sources of settings.
§Examples
use flm_core::stdlib::features::compose::{ComposeOptions, DEFAULT_TEMPLATE};
assert_eq!(ComposeOptions::default().template.for_output("html"), DEFAULT_TEMPLATE);Fields§
§template: TemplateChoiceThe compose template: a name, or a map from an output’s name to a compose
template’s name. The default is DEFAULT_TEMPLATE, simple, for every output.
template_config: BTreeMap<String, BTreeMap<String, Map<String, Value>>>A map from an output’s name to a map from a compose template’s name to that
compose template’s own settings for that output, written over its defaults key by
key: {latex-rendered: {simple: {documentclass: report}}}. Two compose templates of
the same name for two outputs are two compose templates, so their settings are
given apart (ComposeOptions::config_for). An output’s name that names no output
a render makes is never read, as in TemplateChoice::ByOutput.
Implementations§
Source§impl ComposeOptions
impl ComposeOptions
Sourcepub fn config_for(
&self,
output: &str,
template: &str,
) -> Option<&Map<String, Value>>
pub fn config_for( &self, output: &str, template: &str, ) -> Option<&Map<String, Value>>
Returns the settings that template_config gives for the
compose template template of the output output, if it gives any.
Trait Implementations§
Source§impl Clone for ComposeOptions
impl Clone for ComposeOptions
Source§impl Debug for ComposeOptions
impl Debug for ComposeOptions
Source§impl Default for ComposeOptions
impl Default for ComposeOptions
Source§fn default() -> ComposeOptions
fn default() -> ComposeOptions
Source§impl<'de> Deserialize<'de> for ComposeOptionswhere
ComposeOptions: Default,
impl<'de> Deserialize<'de> for ComposeOptionswhere
ComposeOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ComposeOptions
impl Hash for ComposeOptions
Source§impl JsonSchema for ComposeOptions
impl JsonSchema for ComposeOptions
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ComposeOptions
impl PartialEq for ComposeOptions
impl StructuralPartialEq for ComposeOptions
Auto Trait Implementations§
impl Forget for ComposeOptions
impl Freeze for ComposeOptions
impl Move for ComposeOptions
impl RefUnwindSafe for ComposeOptions
impl Send for ComposeOptions
impl Sync for ComposeOptions
impl Unpin for ComposeOptions
impl UnsafeUnpin for ComposeOptions
impl UnwindSafe for ComposeOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more