Trait Evaluator

Source
pub trait Evaluator {
    // Required methods
    fn send(&self, data: Value) -> Result<(), EvalError>;
    fn poll_recv(
        &mut self,
        context: &mut Context<'_>,
    ) -> Poll<Result<Value, EvalError>>;
    fn poll_join(
        &mut self,
        context: &mut Context<'_>,
    ) -> Poll<Result<Value, EvalError>>;
}
Expand description

The platform’s evaluator.

Required Methods§

Source

fn send(&self, data: Value) -> Result<(), EvalError>

Sends a message to the evaluated JavaScript.

Source

fn poll_recv( &mut self, context: &mut Context<'_>, ) -> Poll<Result<Value, EvalError>>

Receive any queued messages from the evaluated JavaScript.

Source

fn poll_join( &mut self, context: &mut Context<'_>, ) -> Poll<Result<Value, EvalError>>

Gets the return value of the JavaScript

Implementors§