Enum web_thread::web::YieldTime
source · pub enum YieldTime {
UserBlocking,
UserVisible,
Background,
Idle,
}
Web
only.Expand description
How long yield_now_async()
should yield execution to the event loop. See
yield_now_async()
for more information.
Variants§
UserBlocking
Shortest execution yield to the event loop. Translates to
TaskPriority."user-blocking"
.
§Notes
Will fall back to MessagePort.postMessage()
when Scheduler
is
not supported, which is at least as short as
UserVisible
.
UserVisible
Default. Translates to TaskPriority."user-visible"
.
§Notes
Will fall back to MessagePort.postMessage()
when Scheduler
is
not supported, which is at least as short as
UserVisible
.
Background
Translates to TaskPriority."background"
.
§Notes
Will fall back to MessagePort.postMessage()
when Scheduler
is
not supported, which is at least as short as
UserVisible
.
Idle
Longest execution yield to the event loop. Uses
Window.requestIdleCallback()
.
§Notes
Will fall back to MessagePort.postMessage()
when
Window.requestIdleCallback()
is not supported, which is at least as
short as UserVisible
.
Trait Implementations§
source§impl Ord for YieldTime
impl Ord for YieldTime
source§impl PartialOrd for YieldTime
impl PartialOrd for YieldTime
impl Copy for YieldTime
impl Eq for YieldTime
impl StructuralPartialEq for YieldTime
Auto Trait Implementations§
impl Freeze for YieldTime
impl RefUnwindSafe for YieldTime
impl Send for YieldTime
impl Sync for YieldTime
impl Unpin for YieldTime
impl UnwindSafe for YieldTime
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)