Skip to main content

PluginEditor

Trait PluginEditor 

Source
pub trait PluginEditor<S: Sample> {
    type Params: Params;

    // Required method
    fn editor(params: Arc<Self::Params>) -> Box<dyn Editor>;
}
Expand description

Precision-keyed editor factory, bridged from the leaf traits.

plugin! / export_static! / export_plugin! build the editor from the concrete logic type without naming which leaf trait (PluginLogic vs PluginLogic64) it implements. Keyed on S only so the two per-leaf blanket impls don’t overlap - the editor and param store are precision-independent.

This lives off PluginLogicCore on purpose: it carries an associated Params type and a receiverless editor, either of which would make PluginLogicCore non-object-safe and break the hot-reload loader’s type-erased Box<dyn PluginLogicCore<S>>. Only concrete code (the shells’ macros) ever names it, never dyn.

Required Associated Types§

Source

type Params: Params

The plugin’s parameter struct; mirrors the leaf’s Params.

Required Methods§

Source

fn editor(params: Arc<Self::Params>) -> Box<dyn Editor>

Build the editor from the lock-free param store. Receiverless, so the wrapper constructs it while the audio thread runs, without the plugin lock.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§