pub trait Plugin: Default + Extensions<Self> {
type AudioThread: AudioThread<Self>;
const ID: &'static str;
const NAME: &'static str;
const VENDOR: &'static str = "";
const URL: &'static str = "";
const MANUAL_URL: &'static str = "";
const SUPPORT_URL: &'static str = "";
const VERSION: &'static str = "";
const DESCRIPTION: &'static str = "";
// Required method
fn activate(
&mut self,
sample_rate: f64,
min_frames: u32,
max_frames: u32,
) -> Result<Self::AudioThread, Error>;
// Provided methods
fn features() -> impl Iterator<Item = &'static str> { ... }
fn init(&mut self, host: Arc<Host>) -> Result<(), Error> { ... }
fn on_main_thread(&mut self) { ... }
}
Required Associated Constants§
Provided Associated Constants§
const VENDOR: &'static str = ""
const URL: &'static str = ""
const MANUAL_URL: &'static str = ""
const SUPPORT_URL: &'static str = ""
const VERSION: &'static str = ""
const DESCRIPTION: &'static str = ""
Required Associated Types§
type AudioThread: AudioThread<Self>
Required Methods§
fn activate( &mut self, sample_rate: f64, min_frames: u32, max_frames: u32, ) -> Result<Self::AudioThread, Error>
Provided Methods§
Sourcefn features() -> impl Iterator<Item = &'static str>
fn features() -> impl Iterator<Item = &'static str>
Plugin features as an arbitrary list of keywords.
They can be matched by the host indexer and used to classify the plugin.
For some standard features, see module: plugin_features
.
The default implementation returns an empty iterator.
§Example
fn features() -> impl Iterator<Item = &'static str> {
"instrument stereo sampler".split_whitespace()
}
fn init(&mut self, host: Arc<Host>) -> Result<(), Error>
fn on_main_thread(&mut self)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.