pub trait Evaluator {
    // Required methods
    fn send(&self, data: Value) -> Result<(), EvalError>;
    fn recv<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Value, EvalError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn join<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Value, EvalError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
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 recv<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Value, EvalError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Receive any queued messages from the evaluated JavaScript.

source

fn join<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Value, EvalError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Gets the return value of the JavaScript

Implementors§