Skip to main content

declare_template_settings

Function declare_template_settings 

Source
pub fn declare_template_settings(
    decl: SettingsDecl,
    output: &str,
    name: &str,
    schema: Value,
) -> Result<SettingsDecl, SettingsError>
Expand description

Returns decl, the settings declaration of a feature that contributes the compose template name of the output output, declaring schema, the JSON Schema of the compose template’s settings, as the entry template_config.OUTPUT.NAME of the feature compose (SettingsDecl::entry_data), labeled compose template ‘NAME’ for the output ‘OUTPUT’. A schema without a description gets one that names the compose template. declare_settings declares the compose templates of a list this way; a feature that contributes a compose template known by its name and its output before it is made (a template module of an extension) calls this directly.

§Errors

The SettingsError of a schema whose marks are faulty, as SettingsDecl::entry_data states.