pub struct CodecRegistry { /* private fields */ }Expand description
Codec registry for managing multiple codec instances
Implementations§
Source§impl CodecRegistry
impl CodecRegistry
Sourcepub fn register(&mut self, name: String, codec: Box<dyn AudioCodec>)
pub fn register(&mut self, name: String, codec: Box<dyn AudioCodec>)
Register a codec with a name
Sourcepub fn get(&self, name: &str) -> Option<&dyn AudioCodec>
pub fn get(&self, name: &str) -> Option<&dyn AudioCodec>
Get a codec by name
Sourcepub fn get_mut(&mut self, name: &str) -> Option<&mut Box<dyn AudioCodec>>
pub fn get_mut(&mut self, name: &str) -> Option<&mut Box<dyn AudioCodec>>
Get a mutable codec by name
Sourcepub fn list_codecs(&self) -> Vec<&String>
pub fn list_codecs(&self) -> Vec<&String>
List all registered codec names
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodecRegistry
impl !RefUnwindSafe for CodecRegistry
impl Send for CodecRegistry
impl Sync for CodecRegistry
impl Unpin for CodecRegistry
impl !UnwindSafe for CodecRegistry
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