pub struct SyntheticCapabilityAdapter { /* private fields */ }Expand description
Synthetic adapter for testing and deterministic verification of capability combinations.
Implementations§
Source§impl SyntheticCapabilityAdapter
impl SyntheticCapabilityAdapter
pub fn new(identity: impl Into<String>) -> SyntheticCapabilityAdapter
pub fn with_capabilities( self, caps: impl IntoIterator<Item = NodeCapability>, ) -> SyntheticCapabilityAdapter
pub fn with_inflight_steer(self, enabled: bool) -> SyntheticCapabilityAdapter
pub fn with_inflight_pause(self, enabled: bool) -> SyntheticCapabilityAdapter
pub fn with_forced_cancel_outcome( self, outcome: CancelOutcome, ) -> SyntheticCapabilityAdapter
pub fn set_status(&self, invocation_id: &str, status: AdapterExecutionStatus)
Trait Implementations§
Source§impl NodeCapabilityAdapter for SyntheticCapabilityAdapter
impl NodeCapabilityAdapter for SyntheticCapabilityAdapter
Source§fn adapter_identity(&self) -> &str
fn adapter_identity(&self) -> &str
Unique identity of this adapter.
Source§fn declared_capabilities(&self) -> BTreeSet<NodeCapability>
fn declared_capabilities(&self) -> BTreeSet<NodeCapability>
Truthful set of declared capabilities.
Source§fn supports_inflight_steer(&self) -> bool
fn supports_inflight_steer(&self) -> bool
Whether native in-flight steering is supported (without killing process).
Source§fn supports_inflight_pause(&self) -> bool
fn supports_inflight_pause(&self) -> bool
Whether native in-flight suspension is supported (without killing process).
Source§fn supports_cooperative_cancel(&self) -> bool
fn supports_cooperative_cancel(&self) -> bool
Whether cooperative cancellation is acknowledged.
Source§fn start_invocation(
&self,
invocation: &NodeInvocation,
) -> Result<(), AdapterError>
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>
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>
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>
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>
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>
fn poll_status( &self, invocation_id: &str, ) -> Result<AdapterExecutionStatus, AdapterError>
Poll execution status.
Auto Trait Implementations§
impl Forget for SyntheticCapabilityAdapter
impl Freeze for SyntheticCapabilityAdapter
impl Move for SyntheticCapabilityAdapter
impl RefUnwindSafe for SyntheticCapabilityAdapter
impl Send for SyntheticCapabilityAdapter
impl Sync for SyntheticCapabilityAdapter
impl Unpin for SyntheticCapabilityAdapter
impl UnsafeUnpin for SyntheticCapabilityAdapter
impl UnwindSafe for SyntheticCapabilityAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more