pub enum WaitUntilStrategy {
Scheduler,
Worker,
}
Available on
web_platform
only.Expand description
Strategy used for ControlFlow::WaitUntil
.
Variants§
Scheduler
Uses the Prioritized Task Scheduling API to queue the next event loop. If not available
this will fallback to setTimeout()
.
This strategy is commonly not affected by browser throttling unless the window is not focused.
This is the default strategy.
Worker
Trait Implementations§
Source§impl Clone for WaitUntilStrategy
impl Clone for WaitUntilStrategy
Source§fn clone(&self) -> WaitUntilStrategy
fn clone(&self) -> WaitUntilStrategy
Returns a copy 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 WaitUntilStrategy
impl Debug for WaitUntilStrategy
Source§impl Default for WaitUntilStrategy
impl Default for WaitUntilStrategy
Source§fn default() -> WaitUntilStrategy
fn default() -> WaitUntilStrategy
Returns the “default value” for a type. Read more
Source§impl PartialEq for WaitUntilStrategy
impl PartialEq for WaitUntilStrategy
impl Copy for WaitUntilStrategy
impl Eq for WaitUntilStrategy
impl StructuralPartialEq for WaitUntilStrategy
Auto Trait Implementations§
impl Freeze for WaitUntilStrategy
impl RefUnwindSafe for WaitUntilStrategy
impl Send for WaitUntilStrategy
impl Sync for WaitUntilStrategy
impl Unpin for WaitUntilStrategy
impl UnwindSafe for WaitUntilStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.