Trait script::script_runtime::ScriptPort

source ·
pub trait ScriptPort {
    // Required method
    fn recv(&self) -> Result<CommonScriptMsg, ()>;
}
Expand description

An interface for receiving ScriptMsg values in an event loop. Used for synchronous DOM APIs that need to abstract over multiple kinds of event loops (worker/main thread) with different Receiver interfaces.

Required Methods§

Implementations on Foreign Types§

source§

impl ScriptPort for Receiver<(Trusted<ServiceWorker>, CommonScriptMsg)>

source§

impl ScriptPort for Receiver<(Trusted<Worker>, MainThreadScriptMsg)>

source§

impl ScriptPort for Receiver<(Trusted<Worker>, CommonScriptMsg)>

source§

impl ScriptPort for Receiver<DedicatedWorkerScriptMsg>

source§

impl ScriptPort for Receiver<MainThreadScriptMsg>

source§

impl ScriptPort for Receiver<CommonScriptMsg>

Implementors§