pub struct EffectRegistry { /* private fields */ }Expand description
Effect registry - stores available effects and their processors
Implementations§
Source§impl EffectRegistry
impl EffectRegistry
pub fn new() -> Self
Sourcepub fn register_effect(
&mut self,
name: &'static str,
availability: EffectAvailability,
processor: Box<dyn CloneableEffect>,
)
pub fn register_effect( &mut self, name: &'static str, availability: EffectAvailability, processor: Box<dyn CloneableEffect>, )
Register a new effect with its availability and processor
Sourcepub fn get_effect(
&self,
name: &str,
synth_context: bool,
) -> Option<Box<dyn CloneableEffect>>
pub fn get_effect( &self, name: &str, synth_context: bool, ) -> Option<Box<dyn CloneableEffect>>
Get an effect processor by name if it’s available for the given context
Sourcepub fn is_effect_available(&self, name: &str, synth_context: bool) -> bool
pub fn is_effect_available(&self, name: &str, synth_context: bool) -> bool
Check if an effect exists and is available in the given context
Sourcepub fn list_available_effects(&self, synth_context: bool) -> Vec<&'static str>
pub fn list_available_effects(&self, synth_context: bool) -> Vec<&'static str>
List all available effects for a given context
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EffectRegistry
impl !RefUnwindSafe for EffectRegistry
impl Send for EffectRegistry
impl !Sync for EffectRegistry
impl Unpin for EffectRegistry
impl !UnwindSafe for EffectRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more