Skip to main content

TemplateSource

Trait TemplateSource 

Source
pub trait TemplateSource: Send + Sync {
    // Required methods
    fn help(&self) -> TemplateHelp;
    fn candidates(&self) -> Vec<PathBuf>;
    fn builtin(&self) -> Option<Vec<u8>>;
    fn check(&self, model: &dyn PresetModel) -> Vec<TemplateCheck>;
}
Expand description

The template rules of one synth.

Required Methods§

Source

fn help(&self) -> TemplateHelp

How a user makes a template. The missing-template error prints it.

Source

fn candidates(&self) -> Vec<PathBuf>

Files searched after the command-line path, in order. May be empty.

Source

fn builtin(&self) -> Option<Vec<u8>>

A template built into the binary, or None when the synth needs a file saved by the app.

Source

fn check(&self, model: &dyn PresetModel) -> Vec<TemplateCheck>

Errors and warnings about a template.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§