Skip to main content

execute

Function execute 

Source
pub async fn execute<'store, A, T, F>(
    caller: &mut Caller<'store, StoreData>,
    operation: &'static str,
    arguments: A,
    action: F,
) -> Result<T>
where A: Serialize + Send + 'static, T: Serialize + DeserializeOwned + Send + 'static, F: for<'call> FnOnce(&'call mut Caller<'store, StoreData>, EffectId, A) -> BoxFuture<'call, Result<T>> + Send,
Expand description

Execute one native action, or return its committed native outcome.

arguments are hashed in memory only. The action owns them, avoiding copies of large requests. It must not call guest code or manufacture guest exceptions: return native values/errors and convert them after this boundary instead.