Struct Plugin Runtime
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
Cloneable handle for calling the Relay host runtime from worker callbacks.
Implementations
impl PluginRuntime
impl PluginRuntime
emit_mark
pub async fn emit_mark(
&self,
name: &str,
data: Option<Json>,
metadata: Option<Json>,
) -> Result<()>
Emits a mark event through the host runtime.
create_scope_stack
pub async fn create_scope_stack(&self) -> Result<String>
Creates an isolated host-owned scope stack.
drop_scope_stack
pub async fn drop_scope_stack(&self, scope_stack_id: &str) -> Result<()>
Drops an isolated host-owned scope stack.
with_scope_stack
pub async fn with_scope_stack<F, Fut, T>(&self, scope_stack_id: &str, f: F) -> Twhere
F: FnOnce() -> Fut,
Fut: Future<Output = T>,
Runs an async operation with runtime calls bound to a specific host-owned scope stack.
This is useful for isolated stacks created with Self::create_scope_stack. The previous worker invocation scope is restored after the future completes.
push_scope
pub async fn push_scope(
&self,
scope_stack_id: Option<&str>,
name: &str,
scope_type: ScopeType,
data: Option<Json>,
metadata: Option<Json>,
input: Option<Json>,
) -> Result<String>
Pushes a scope through the host runtime.
pop_scope
pub async fn pop_scope(
&self,
scope_handle_id: &str,
output: Option<Json>,
metadata: Option<Json>,
) -> Result<()>
Pops a scope through the host runtime.
Trait Implementations
impl Clone for PluginRuntime
impl Clone for PluginRuntime
clone
fn clone(&self) -> PluginRuntime
clone_from
fn clone_from(&mut self, source: &Self)