pub struct BackgroundHandle { /* private fields */ }Expand description
Cheap, clonable submission side of a BackgroundExecutor. Every method
enqueues and returns immediately; the work runs on a background thread.
This is the type the sans-io seam routes RTEMS tail hand-offs into — the
runtime-free counterpart of crate::runtime::task::spawn.
Implementations§
Source§impl BackgroundHandle
impl BackgroundHandle
Sourcepub fn callback(
&self,
priority: CallbackPriority,
cb: Callback,
) -> Result<(), CallbackError>
pub fn callback( &self, priority: CallbackPriority, cb: Callback, ) -> Result<(), CallbackError>
Enqueue an immediate callback on priority — C callbackRequest
(callback.c:341).
Sourcepub fn callback_delayed(
&self,
delay: Duration,
priority: CallbackPriority,
cb: Callback,
)
pub fn callback_delayed( &self, delay: Duration, priority: CallbackPriority, cb: Callback, )
Enqueue a callback to run after delay on priority — C
callbackRequestDelayed (callback.c:410).
Sourcepub fn scan_once(&self, cb: OnceCallback) -> Result<(), ScanOnceOverflow>
pub fn scan_once(&self, cb: OnceCallback) -> Result<(), ScanOnceOverflow>
Enqueue a one-shot record-process tail — C scanOnce (dbScan.c:664).
Sourcepub fn callbacks(&self) -> &CallbackHandle
pub fn callbacks(&self) -> &CallbackHandle
The callback-submission handle alone.
Sourcepub fn timer(&self) -> &TimerHandle
pub fn timer(&self) -> &TimerHandle
The delayed-timer handle alone.
Sourcepub fn scan_once_handle(&self) -> &ScanOnceHandle
pub fn scan_once_handle(&self) -> &ScanOnceHandle
The scanOnce-submission handle alone.
Trait Implementations§
Source§impl Clone for BackgroundHandle
impl Clone for BackgroundHandle
Source§fn clone(&self) -> BackgroundHandle
fn clone(&self) -> BackgroundHandle
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 BackgroundHandle
impl RefUnwindSafe for BackgroundHandle
impl Send for BackgroundHandle
impl Sync for BackgroundHandle
impl Unpin for BackgroundHandle
impl UnsafeUnpin for BackgroundHandle
impl UnwindSafe for BackgroundHandle
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