Skip to main content

NodeCapabilityAdapter

Trait NodeCapabilityAdapter 

Source
pub trait NodeCapabilityAdapter: Send + Sync {
    // Required methods
    fn adapter_identity(&self) -> &str;
    fn declared_capabilities(&self) -> BTreeSet<NodeCapability>;
    fn supports_inflight_steer(&self) -> bool;
    fn supports_inflight_pause(&self) -> bool;
    fn supports_cooperative_cancel(&self) -> bool;
    fn start_invocation(
        &self,
        invocation: &NodeInvocation,
    ) -> Result<(), AdapterError>;
    fn steer_invocation(
        &self,
        invocation_id: &str,
        instruction: &str,
    ) -> Result<SteerOutcome, AdapterError>;
    fn pause_invocation(
        &self,
        invocation_id: &str,
    ) -> Result<PauseOutcome, AdapterError>;
    fn resume_invocation(
        &self,
        invocation_id: &str,
    ) -> Result<ResumeOutcome, AdapterError>;
    fn cancel_invocation(
        &self,
        invocation_id: &str,
    ) -> Result<CancelOutcome, AdapterError>;
    fn poll_status(
        &self,
        invocation_id: &str,
    ) -> Result<AdapterExecutionStatus, AdapterError>;
}
Expand description

Abstract native capability adapter for node execution.

Required Methods§

Source

fn adapter_identity(&self) -> &str

Unique identity of this adapter.

Source

fn declared_capabilities(&self) -> BTreeSet<NodeCapability>

Truthful set of declared capabilities.

Source

fn supports_inflight_steer(&self) -> bool

Whether native in-flight steering is supported (without killing process).

Source

fn supports_inflight_pause(&self) -> bool

Whether native in-flight suspension is supported (without killing process).

Source

fn supports_cooperative_cancel(&self) -> bool

Whether cooperative cancellation is acknowledged.

Source

fn start_invocation( &self, invocation: &NodeInvocation, ) -> Result<(), AdapterError>

Start a new invocation.

Source

fn steer_invocation( &self, invocation_id: &str, instruction: &str, ) -> Result<SteerOutcome, AdapterError>

Deliver steer intervention to an active invocation.

Source

fn pause_invocation( &self, invocation_id: &str, ) -> Result<PauseOutcome, AdapterError>

Request pause of an active invocation.

Source

fn resume_invocation( &self, invocation_id: &str, ) -> Result<ResumeOutcome, AdapterError>

Request resume of a paused invocation.

Source

fn cancel_invocation( &self, invocation_id: &str, ) -> Result<CancelOutcome, AdapterError>

Cooperatively cancel an invocation.

Source

fn poll_status( &self, invocation_id: &str, ) -> Result<AdapterExecutionStatus, AdapterError>

Poll execution status.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§