pub struct AudioDecoderCallbacksBuilder {
eos: Option<Box<dyn FnOnce() + Send + 'static>>,
error: Option<Box<dyn FnOnce(AudioDecoderError) + Send + 'static>>,
progress: Option<Box<dyn Fn(Box<dyn AsRef<[f32]>>, u32) + Send + Sync + 'static>>,
ready: Option<Box<dyn FnOnce(u32) + Send + 'static>>,
}
Fields§
§eos: Option<Box<dyn FnOnce() + Send + 'static>>
§error: Option<Box<dyn FnOnce(AudioDecoderError) + Send + 'static>>
§progress: Option<Box<dyn Fn(Box<dyn AsRef<[f32]>>, u32) + Send + Sync + 'static>>
§ready: Option<Box<dyn FnOnce(u32) + Send + 'static>>
Implementations§
source§impl AudioDecoderCallbacksBuilder
impl AudioDecoderCallbacksBuilder
pub fn eos<F: FnOnce() + Send + 'static>(self, eos: F) -> Self
pub fn error<F: FnOnce(AudioDecoderError) + Send + 'static>( self, error: F, ) -> Self
pub fn progress<F: Fn(Box<dyn AsRef<[f32]>>, u32) + Send + Sync + 'static>( self, progress: F, ) -> Self
pub fn ready<F: FnOnce(u32) + Send + 'static>(self, ready: F) -> Self
pub fn build(self) -> AudioDecoderCallbacks
Auto Trait Implementations§
impl Freeze for AudioDecoderCallbacksBuilder
impl !RefUnwindSafe for AudioDecoderCallbacksBuilder
impl Send for AudioDecoderCallbacksBuilder
impl !Sync for AudioDecoderCallbacksBuilder
impl Unpin for AudioDecoderCallbacksBuilder
impl !UnwindSafe for AudioDecoderCallbacksBuilder
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