pub enum IdleDeadline {
Real(IdleDeadline),
Polyfill {
start: f64,
},
}
Expand description
Idle deadline interface which could be the real idle deadline if supported, otherwise the polyfill
Variants§
Real(IdleDeadline)
the web native IdleDeadline object wrap together with polyfill version
Polyfill
A polyfill for simulating IdleDeadline
Implementations§
Source§impl IdleDeadline
impl IdleDeadline
Sourcepub fn time_remaining(&self) -> f64
pub fn time_remaining(&self) -> f64
calculate the remaining time for the IdleDeadline
Sourcepub fn did_timeout(&self) -> bool
pub fn did_timeout(&self) -> bool
returns true if there is no more time for executing more work
Trait Implementations§
Source§impl Clone for IdleDeadline
impl Clone for IdleDeadline
Source§fn clone(&self) -> IdleDeadline
fn clone(&self) -> IdleDeadline
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 moreAuto Trait Implementations§
impl Freeze for IdleDeadline
impl RefUnwindSafe for IdleDeadline
impl !Send for IdleDeadline
impl !Sync for IdleDeadline
impl Unpin for IdleDeadline
impl UnwindSafe for IdleDeadline
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