pub struct SpinPeriodPollingResult {
pub work: SpinOnceResult,
pub remaining_ms: u64,
}Expand description
Result from a single period of polling execution (no_std compatible).
Contains the work performed and the remaining time the caller should sleep. The caller is responsible for the actual delay (platform-specific).
§Example
ⓘ
loop {
let r = executor.spin_one_period(10, elapsed_ms);
platform_sleep_ms(r.remaining_ms);
}Fields§
§work: SpinOnceResultWork performed during this iteration
remaining_ms: u64Remaining time in ms that the caller should sleep
Trait Implementations§
Source§impl Clone for SpinPeriodPollingResult
impl Clone for SpinPeriodPollingResult
Source§fn clone(&self) -> SpinPeriodPollingResult
fn clone(&self) -> SpinPeriodPollingResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpinPeriodPollingResult
impl Debug for SpinPeriodPollingResult
impl Copy for SpinPeriodPollingResult
Auto Trait Implementations§
impl Freeze for SpinPeriodPollingResult
impl RefUnwindSafe for SpinPeriodPollingResult
impl Send for SpinPeriodPollingResult
impl Sync for SpinPeriodPollingResult
impl Unpin for SpinPeriodPollingResult
impl UnsafeUnpin for SpinPeriodPollingResult
impl UnwindSafe for SpinPeriodPollingResult
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