Skip to main content

TraverseEmbedderApi

Trait TraverseEmbedderApi 

Source
pub trait TraverseEmbedderApi {
    // Required methods
    fn submit(&mut self, target_id: &str, input: &Value) -> SubmitOutcome;
    fn subscribe(&mut self, callback: EventCallback);
    fn start_compatible(
        &mut self,
        capability_id: &str,
        input: &Value,
    ) -> CompatibleStartOutcome;
    fn stop_compatible(
        &mut self,
        capability_id: &str,
        instance_id: Option<&str>,
    ) -> CompatibleLifecycleOutcome;
    fn kill_compatible(
        &mut self,
        capability_id: &str,
        instance_id: Option<&str>,
    ) -> CompatibleLifecycleOutcome;
    fn shutdown(&mut self) -> ShutdownOutcome;
    fn release_evidence(&self) -> Value;
}
Expand description

The uniform embedder-api/1.0.0 operation surface (spec 057 FR-003).

BundleEmbedder is the production implementation; EmbedderTestDouble is the deterministic in-memory test double required by spec 068 FR-006. Both emit identical event envelopes.

Required Methods§

Source

fn submit(&mut self, target_id: &str, input: &Value) -> SubmitOutcome

runtime.submit: execute a bundled workflow or WASM capability.

Source

fn subscribe(&mut self, callback: EventCallback)

runtime.subscribe: register an ordered event callback. Previously emitted events are replayed to the new subscriber first, so late subscribers observe the identical ordered stream.

Source

fn start_compatible( &mut self, capability_id: &str, input: &Value, ) -> CompatibleStartOutcome

compatible.start: start a compatible-mode capability instance.

Source

fn stop_compatible( &mut self, capability_id: &str, instance_id: Option<&str>, ) -> CompatibleLifecycleOutcome

compatible.stop: gracefully stop one instance (instance_id) or every running instance of the capability (None).

Source

fn kill_compatible( &mut self, capability_id: &str, instance_id: Option<&str>, ) -> CompatibleLifecycleOutcome

compatible.kill: force-terminate one instance (instance_id) or every running instance of the capability (None).

Source

fn shutdown(&mut self) -> ShutdownOutcome

runtime.shutdown: kill running compatible instances and stop accepting operations. Idempotent.

Source

fn release_evidence(&self) -> Value

Release evidence connecting this embedder to its package version, linked runtime, conformance version, and bundle digests (spec 068 FR-008, NFR-002).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§