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§
Sourcefn adapter_identity(&self) -> &str
fn adapter_identity(&self) -> &str
Unique identity of this adapter.
Sourcefn declared_capabilities(&self) -> BTreeSet<NodeCapability>
fn declared_capabilities(&self) -> BTreeSet<NodeCapability>
Truthful set of declared capabilities.
Sourcefn supports_inflight_steer(&self) -> bool
fn supports_inflight_steer(&self) -> bool
Whether native in-flight steering is supported (without killing process).
Sourcefn supports_inflight_pause(&self) -> bool
fn supports_inflight_pause(&self) -> bool
Whether native in-flight suspension is supported (without killing process).
Sourcefn supports_cooperative_cancel(&self) -> bool
fn supports_cooperative_cancel(&self) -> bool
Whether cooperative cancellation is acknowledged.
Sourcefn start_invocation(
&self,
invocation: &NodeInvocation,
) -> Result<(), AdapterError>
fn start_invocation( &self, invocation: &NodeInvocation, ) -> Result<(), AdapterError>
Start a new invocation.
Sourcefn steer_invocation(
&self,
invocation_id: &str,
instruction: &str,
) -> Result<SteerOutcome, AdapterError>
fn steer_invocation( &self, invocation_id: &str, instruction: &str, ) -> Result<SteerOutcome, AdapterError>
Deliver steer intervention to an active invocation.
Sourcefn pause_invocation(
&self,
invocation_id: &str,
) -> Result<PauseOutcome, AdapterError>
fn pause_invocation( &self, invocation_id: &str, ) -> Result<PauseOutcome, AdapterError>
Request pause of an active invocation.
Sourcefn resume_invocation(
&self,
invocation_id: &str,
) -> Result<ResumeOutcome, AdapterError>
fn resume_invocation( &self, invocation_id: &str, ) -> Result<ResumeOutcome, AdapterError>
Request resume of a paused invocation.
Sourcefn cancel_invocation(
&self,
invocation_id: &str,
) -> Result<CancelOutcome, AdapterError>
fn cancel_invocation( &self, invocation_id: &str, ) -> Result<CancelOutcome, AdapterError>
Cooperatively cancel an invocation.
Sourcefn poll_status(
&self,
invocation_id: &str,
) -> Result<AdapterExecutionStatus, AdapterError>
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".