Trait script::script_runtime::ScriptChan

source ·
pub trait ScriptChan: JSTraceable {
    // Required methods
    fn send(&self, msg: CommonScriptMsg) -> Result<(), ()>;
    fn clone(&self) -> Box<dyn ScriptChan + Send>;
}
Expand description

A cloneable interface for communicating with an event loop.

Required Methods§

source

fn send(&self, msg: CommonScriptMsg) -> Result<(), ()>

Send a message to the associated event loop.

source

fn clone(&self) -> Box<dyn ScriptChan + Send>

Clone this handle.

Trait Implementations§

source§

impl OpaqueSender<CommonScriptMsg> for Box<dyn ScriptChan + Send>

source§

fn send(&self, msg: CommonScriptMsg)

Send a message.

Implementors§