pub struct ModulatorRegistry { /* private fields */ }Expand description
All modulator instances in a genome, keyed by instance id.
Implementations§
Source§impl ModulatorRegistry
impl ModulatorRegistry
pub fn new() -> Self
pub fn insert(&mut self, id: String, instance: ModulatorInstance)
pub fn get(&self, id: &str) -> Option<&ModulatorInstance>
pub fn get_mut(&mut self, id: &str) -> Option<&mut ModulatorInstance>
pub fn contains(&self, id: &str) -> bool
pub fn remove(&mut self, id: &str) -> Option<ModulatorInstance>
pub fn rename(&mut self, old_id: &str, new_id: String) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn ids(&self) -> Vec<String>
pub fn iter(&self) -> impl Iterator<Item = (&String, &ModulatorInstance)>
Trait Implementations§
Source§impl Clone for ModulatorRegistry
impl Clone for ModulatorRegistry
Source§impl Debug for ModulatorRegistry
impl Debug for ModulatorRegistry
Auto Trait Implementations§
impl Freeze for ModulatorRegistry
impl RefUnwindSafe for ModulatorRegistry
impl Send for ModulatorRegistry
impl Sync for ModulatorRegistry
impl Unpin for ModulatorRegistry
impl UnsafeUnpin for ModulatorRegistry
impl UnwindSafe for ModulatorRegistry
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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