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§
Sourcefn help(&self) -> TemplateHelp
fn help(&self) -> TemplateHelp
How a user makes a template. The missing-template error prints it.
Sourcefn candidates(&self) -> Vec<PathBuf>
fn candidates(&self) -> Vec<PathBuf>
Files searched after the command-line path, in order. May be empty.
Sourcefn builtin(&self) -> Option<Vec<u8>>
fn builtin(&self) -> Option<Vec<u8>>
A template built into the binary, or None when the synth needs a
file saved by the app.
Sourcefn check(&self, model: &dyn PresetModel) -> Vec<TemplateCheck>
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".