Trait RpcContext

Source
pub trait RpcContext {
    const LQ_SUPPORT: bool = false;
Show 38 methods // Required methods fn kvs(&self) -> &Datastore; fn session(&self) -> &Session; fn session_mut(&mut self) -> &mut Session; fn vars(&self) -> &BTreeMap<String, Value>; fn vars_mut(&mut self) -> &mut BTreeMap<String, Value>; fn version_data(&self) -> Data; // Provided methods fn handle_live(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send { ... } fn handle_kill(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send { ... } fn cleanup_lqs(&self) -> impl Future<Output = ()> + Send { ... } async fn execute_mutable( &mut self, method: Method, params: Array, ) -> Result<Data, RpcError> { ... } async fn execute_immutable( &self, method: Method, params: Array, ) -> Result<Data, RpcError> { ... } async fn yuse(&mut self, params: Array) -> Result<Data, RpcError> { ... } async fn signup(&mut self, params: Array) -> Result<Data, RpcError> { ... } async fn signin(&mut self, params: Array) -> Result<Data, RpcError> { ... } async fn authenticate(&mut self, params: Array) -> Result<Data, RpcError> { ... } async fn invalidate(&mut self) -> Result<Data, RpcError> { ... } async fn reset(&mut self) -> Result<Data, RpcError> { ... } async fn info(&self) -> Result<Data, RpcError> { ... } async fn set(&mut self, params: Array) -> Result<Data, RpcError> { ... } async fn unset(&mut self, params: Array) -> Result<Data, RpcError> { ... } async fn kill(&mut self, params: Array) -> Result<Data, RpcError> { ... } async fn live(&mut self, params: Array) -> Result<Data, RpcError> { ... } async fn select(&self, params: Array) -> Result<Data, RpcError> { ... } async fn insert(&self, params: Array) -> Result<Data, RpcError> { ... } async fn insert_relation(&self, params: Array) -> Result<Data, RpcError> { ... } async fn create(&self, params: Array) -> Result<Data, RpcError> { ... } async fn upsert(&self, params: Array) -> Result<Data, RpcError> { ... } async fn update(&self, params: Array) -> Result<Data, RpcError> { ... } async fn merge(&self, params: Array) -> Result<Data, RpcError> { ... } async fn patch(&self, params: Array) -> Result<Data, RpcError> { ... } async fn relate(&self, params: Array) -> Result<Data, RpcError> { ... } async fn delete(&self, params: Array) -> Result<Data, RpcError> { ... } async fn version(&self, params: Array) -> Result<Data, RpcError> { ... } async fn query(&self, params: Array) -> Result<Data, RpcError> { ... } async fn run(&self, params: Array) -> Result<Data, RpcError> { ... } async fn graphql(&self, _: Array) -> Result<Data, RpcError> { ... } async fn query_inner( &self, query: Value, vars: Option<BTreeMap<String, Value>>, ) -> Result<Vec<Response>, RpcError> { ... } async fn handle_live_query_results(&self, res: &Response) { ... }
}

Provided Associated Constants§

Source

const LQ_SUPPORT: bool = false

Live queries are disabled by default

Required Methods§

Source

fn kvs(&self) -> &Datastore

The datastore for this RPC interface

Source

fn session(&self) -> &Session

The current session for this RPC context

Source

fn session_mut(&mut self) -> &mut Session

Mutable access to the current session for this RPC context

Source

fn vars(&self) -> &BTreeMap<String, Value>

The current parameters stored on this RPC context

Source

fn vars_mut(&mut self) -> &mut BTreeMap<String, Value>

Mutable access to the current parameters stored on this RPC context

Source

fn version_data(&self) -> Data

The version information for this RPC context

Provided Methods§

Source

fn handle_live(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send

Handles the execution of a LIVE statement

Source

fn handle_kill(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send

Handles the execution of a KILL statement

Source

fn cleanup_lqs(&self) -> impl Future<Output = ()> + Send

Handles the cleanup of live queries

Source

async fn execute_mutable( &mut self, method: Method, params: Array, ) -> Result<Data, RpcError>

Executes any method on this RPC implementation

Source

async fn execute_immutable( &self, method: Method, params: Array, ) -> Result<Data, RpcError>

Executes any immutable method on this RPC implementation

Source

async fn yuse(&mut self, params: Array) -> Result<Data, RpcError>

Source

async fn signup(&mut self, params: Array) -> Result<Data, RpcError>

Source

async fn signin(&mut self, params: Array) -> Result<Data, RpcError>

Source

async fn authenticate(&mut self, params: Array) -> Result<Data, RpcError>

Source

async fn invalidate(&mut self) -> Result<Data, RpcError>

Source

async fn reset(&mut self) -> Result<Data, RpcError>

Source

async fn info(&self) -> Result<Data, RpcError>

Source

async fn set(&mut self, params: Array) -> Result<Data, RpcError>

Source

async fn unset(&mut self, params: Array) -> Result<Data, RpcError>

Source

async fn kill(&mut self, params: Array) -> Result<Data, RpcError>

Source

async fn live(&mut self, params: Array) -> Result<Data, RpcError>

Source

async fn select(&self, params: Array) -> Result<Data, RpcError>

Source

async fn insert(&self, params: Array) -> Result<Data, RpcError>

Source

async fn insert_relation(&self, params: Array) -> Result<Data, RpcError>

Source

async fn create(&self, params: Array) -> Result<Data, RpcError>

Source

async fn upsert(&self, params: Array) -> Result<Data, RpcError>

Source

async fn update(&self, params: Array) -> Result<Data, RpcError>

Source

async fn merge(&self, params: Array) -> Result<Data, RpcError>

Source

async fn patch(&self, params: Array) -> Result<Data, RpcError>

Source

async fn relate(&self, params: Array) -> Result<Data, RpcError>

Source

async fn delete(&self, params: Array) -> Result<Data, RpcError>

Source

async fn version(&self, params: Array) -> Result<Data, RpcError>

Source

async fn query(&self, params: Array) -> Result<Data, RpcError>

Source

async fn run(&self, params: Array) -> Result<Data, RpcError>

Source

async fn graphql(&self, _: Array) -> Result<Data, RpcError>

Source

async fn query_inner( &self, query: Value, vars: Option<BTreeMap<String, Value>>, ) -> Result<Vec<Response>, RpcError>

Source

async fn handle_live_query_results(&self, res: &Response)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§