pub struct BackgroundExecutor { /* private fields */ }Implementations§
Source§impl BackgroundExecutor
impl BackgroundExecutor
pub fn new(scheduler: Arc<dyn Scheduler>) -> Self
pub fn spawn<F>(&self, future: F) -> Task<F::Output> ⓘ
pub fn spawn_with_priority<F>( &self, priority: Priority, future: F, ) -> Task<F::Output> ⓘ
Sourcepub fn spawn_realtime<F>(&self, future: F) -> Task<F::Output> ⓘ
pub fn spawn_realtime<F>(&self, future: F) -> Task<F::Output> ⓘ
Spawns a future on a dedicated realtime thread for audio processing.
pub fn timer(&self, duration: Duration) -> Timer ⓘ
pub fn now(&self) -> Instant
pub fn scheduler(&self) -> &Arc<dyn Scheduler>
Trait Implementations§
Source§impl Clone for BackgroundExecutor
impl Clone for BackgroundExecutor
Source§fn clone(&self) -> BackgroundExecutor
fn clone(&self) -> BackgroundExecutor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BackgroundExecutor
impl !RefUnwindSafe for BackgroundExecutor
impl Send for BackgroundExecutor
impl Sync for BackgroundExecutor
impl Unpin for BackgroundExecutor
impl UnsafeUnpin for BackgroundExecutor
impl !UnwindSafe for BackgroundExecutor
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