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§
sourcefn send(&self, msg: CommonScriptMsg) -> Result<(), ()>
fn send(&self, msg: CommonScriptMsg) -> Result<(), ()>
Send a message to the associated event loop.
sourcefn clone(&self) -> Box<dyn ScriptChan + Send>
fn clone(&self) -> Box<dyn ScriptChan + Send>
Clone this handle.
Trait Implementations§
source§impl OpaqueSender<CommonScriptMsg> for Box<dyn ScriptChan + Send>
impl OpaqueSender<CommonScriptMsg> for Box<dyn ScriptChan + Send>
source§fn send(&self, msg: CommonScriptMsg)
fn send(&self, msg: CommonScriptMsg)
Send a message.