EventLoopWaker

Trait EventLoopWaker 

Source
pub trait EventLoopWaker:
    'static
    + Send
    + Sync {
    // Required methods
    fn clone_box(&self) -> Box<dyn EventLoopWaker>;
    fn wake(&self);
}
Expand description

A way for Servo to request that the embedder wake up the main event loop.

A trait which embedders should implement to allow Servo to request that the embedder spin the Servo event loop on the main thread.

Required Methods§

Source

fn clone_box(&self) -> Box<dyn EventLoopWaker>

Source

fn wake(&self)

This method is called when Servo wants the embedder to wake up the event loop.

Note that this may be called on a different thread than the thread that was used to start Servo. When called, the embedder is expected to call [Servo::spin_event_loop] on the thread where Servo is running.

Trait Implementations§

Source§

impl Clone for Box<dyn EventLoopWaker>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§