VariableCapableRpcTarget

Trait VariableCapableRpcTarget 

Source
pub trait VariableCapableRpcTarget: Send + Sync {
    // Required methods
    fn set_variable<'life0, 'async_trait>(
        &'life0 self,
        name: String,
        value: Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_variable<'life0, 'async_trait>(
        &'life0 self,
        name: String,
    ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn clear_all_variables<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn has_variable<'life0, 'async_trait>(
        &'life0 self,
        name: String,
    ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_variables<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        method: &'life1 str,
        args: Vec<Value>,
    ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Enhanced RPC target trait with variable management

Required Methods§

Source

fn set_variable<'life0, 'async_trait>( &'life0 self, name: String, value: Value, ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set a variable

Source

fn get_variable<'life0, 'async_trait>( &'life0 self, name: String, ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a variable

Source

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

Clear all variables

Source

fn has_variable<'life0, 'async_trait>( &'life0 self, name: String, ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check if variable exists

Source

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

Get all variable names

Source

fn call<'life0, 'life1, 'async_trait>( &'life0 self, method: &'life1 str, args: Vec<Value>, ) -> Pin<Box<dyn Future<Output = Result<Value, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Regular RPC method calls (fallback)

Implementors§