pub struct EventLoop {
pub extensions: Vec<Box<dyn MacroTaskExtension>>,
/* private fields */
}Fields§
§extensions: Vec<Box<dyn MacroTaskExtension>>Implementations§
Source§impl EventLoop
impl EventLoop
pub fn new() -> Self
pub fn set_max_iterations(&mut self, max: u64)
pub fn schedule_timer( &mut self, callback: JSValue, args: Vec<JSValue>, delay_ms: u64, is_interval: bool, ) -> TimerId
pub fn clear_timer(&mut self, timer_id: TimerId)
pub fn is_timer_active(&self, timer_id: TimerId) -> bool
pub fn schedule_macrotask(&mut self, callback: JSValue, args: Vec<JSValue>)
pub fn schedule_animation_callback( &mut self, callback: JSValue, ) -> AnimationCallbackId
pub fn cancel_animation_callback(&mut self, id: AnimationCallbackId)
pub fn has_pending_tasks(&self) -> bool
pub fn macrotask_count(&self) -> usize
pub fn timer_count(&self) -> usize
pub fn animation_callback_count(&self) -> usize
pub fn run_until_complete( &mut self, ctx: &mut JSContext, timeout_ms: Option<u64>, ) -> Result<EventLoopResult, String>
pub fn tick(&mut self, ctx: &mut JSContext) -> Result<EventLoopResult, String>
pub fn advance_time( &mut self, ctx: &mut JSContext, _duration_ms: u64, ) -> Result<EventLoopResult, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventLoop
impl !RefUnwindSafe for EventLoop
impl !Send for EventLoop
impl !Sync for EventLoop
impl Unpin for EventLoop
impl UnsafeUnpin for EventLoop
impl !UnwindSafe for EventLoop
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