pub trait InvocationContext: Send + Sync {
// Required methods
fn sql<'life0, 'life1, 'async_trait>(
&'life0 mut self,
config: &'life1 SurrealismConfig,
query: String,
vars: Object,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn run<'life0, 'life1, 'async_trait>(
&'life0 mut self,
config: &'life1 SurrealismConfig,
fnc: String,
version: Option<String>,
args: Vec<Value>,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn kv(&mut self) -> Result<&dyn KVStore>;
// Provided methods
fn stdout(&mut self, output: &str) -> Result<()> { ... }
fn stderr(&mut self, output: &str) -> Result<()> { ... }
}Expand description
Context provided for each WASM function invocation. Created per-call with borrowed execution context (stack, query context, etc).