pub trait PluginSetup:
Clone
+ Send
+ 'static {
// Required method
fn extract(host: &HostSetup) -> Self;
}Expand description
Trait for plugin setup requirements.
Plugins declare what host information they need via Descriptor::Setup.
The framework extracts only the requested data from the host.
§Composable Setup Types
Request exactly what you need using individual types or tuples:
ⓘ
type Setup = (); // No setup needed
type Setup = SampleRate; // Just sample rate
type Setup = (SampleRate, MaxBufferSize); // Sample rate + buffer size
type Setup = (SampleRate, MainOutputChannels); // Sample rate + channels§Available Types
| Type | Value | Use Case |
|---|---|---|
() | - | Stateless plugins (gain, pan) |
SampleRate | f64 | Time-based DSP (delay, filter, envelope) |
MaxBufferSize | usize | FFT, lookahead buffers |
MainInputChannels | u32 | Per-channel input processing |
MainOutputChannels | u32 | Per-channel output state |
AuxInputCount | usize | Sidechain-aware processing |
AuxOutputCount | usize | Multi-bus output |
ProcessMode | enum | Quality settings for offline rendering |
Required Methods§
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.
Implementations on Foreign Types§
Source§impl PluginSetup for ()
Use () for stateless plugins that don’t depend on sample rate.
impl PluginSetup for ()
Use () for stateless plugins that don’t depend on sample rate.