1
0
Fork 0

Require plugins to be 'static

They can't contain any references anyways since they're default
initialized. If they don't have a 'static lifetime, then it won't be
possible to pass a trait object casted from the inner wrapper to the
plugin.
This commit is contained in:
Robbert van der Helm 2022-02-05 16:03:16 +01:00
parent 78a83d5051
commit 1e77a92285

View file

@ -40,7 +40,7 @@ use crate::param::internals::Params;
/// - Outputting MIDI events /// - Outputting MIDI events
/// - GUIs /// - GUIs
#[allow(unused_variables)] #[allow(unused_variables)]
pub trait Plugin: Default + Send + Sync { pub trait Plugin: Default + Send + Sync + 'static {
/// The type of the GUI editor instance belonging to this plugin. Use [NoEditor] when you don't /// The type of the GUI editor instance belonging to this plugin. Use [NoEditor] when you don't
/// need an editor. Make sure to implement both the [Self::create_editor()] and /// need an editor. Make sure to implement both the [Self::create_editor()] and
/// [Self::editor_size()] functions when you do add an editor. /// [Self::editor_size()] functions when you do add an editor.