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§
Sourceconst LQ_SUPPORT: bool = false
const LQ_SUPPORT: bool = false
Live queries are disabled by default
Required Methods§
Sourcefn session_mut(&mut self) -> &mut Session
fn session_mut(&mut self) -> &mut Session
Mutable access to the current session for this RPC context
Sourcefn vars_mut(&mut self) -> &mut BTreeMap<String, Value>
fn vars_mut(&mut self) -> &mut BTreeMap<String, Value>
Mutable access to the current parameters stored on this RPC context
Sourcefn version_data(&self) -> Data
fn version_data(&self) -> Data
The version information for this RPC context
Provided Methods§
Sourcefn handle_live(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send
fn handle_live(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send
Handles the execution of a LIVE statement
Sourcefn handle_kill(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send
fn handle_kill(&self, _lqid: &Uuid) -> impl Future<Output = ()> + Send
Handles the execution of a KILL statement
Sourcefn cleanup_lqs(&self) -> impl Future<Output = ()> + Send
fn cleanup_lqs(&self) -> impl Future<Output = ()> + Send
Handles the cleanup of live queries
Sourceasync fn execute_mutable(
&mut self,
method: Method,
params: Array,
) -> Result<Data, RpcError>
async fn execute_mutable( &mut self, method: Method, params: Array, ) -> Result<Data, RpcError>
Executes any method on this RPC implementation
Sourceasync fn execute_immutable(
&self,
method: Method,
params: Array,
) -> Result<Data, RpcError>
async fn execute_immutable( &self, method: Method, params: Array, ) -> Result<Data, RpcError>
Executes any immutable method on this RPC implementation
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)
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.