pub trait WorkflowHost: Send + Sync {
// Required methods
fn service(
&self,
catalog: ToolCatalog,
retry: RetryPolicy,
) -> Result<Arc<dyn CodeModeService>, String>;
fn database(
&self,
kind: WorkflowDatabaseKind,
) -> Result<Arc<dyn WorkflowDatabase>, String>;
fn fixture_service(
&self,
connectors: Vec<Arc<dyn Connector>>,
) -> Result<Arc<dyn CodeModeService>, String>;
fn sleep<'life0, 'async_trait>(
&'life0 self,
milliseconds: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn service_with_limits(
&self,
catalog: ToolCatalog,
retry: RetryPolicy,
limits: WorkflowLimits,
) -> Result<Arc<dyn CodeModeService>, String> { ... }
fn wake_at<'life0, 'async_trait>(
&'life0 self,
_timestamp: u64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_fixture(&self, source: &str) -> Result<Vec<u8>, String> { ... }
}Expand description
Host capabilities required by the shared workflow commands.
Hosts own a tenant’s execution and database lifetime. The catalog supplied to
service excludes lifecycle commands; callable workflow composition uses the shared runtime.
Required Methods§
Sourcefn service(
&self,
catalog: ToolCatalog,
retry: RetryPolicy,
) -> Result<Arc<dyn CodeModeService>, String>
fn service( &self, catalog: ToolCatalog, retry: RetryPolicy, ) -> Result<Arc<dyn CodeModeService>, String>
Opens the execution service with isolated host-call options and this retry policy.
Sourcefn database(
&self,
kind: WorkflowDatabaseKind,
) -> Result<Arc<dyn WorkflowDatabase>, String>
fn database( &self, kind: WorkflowDatabaseKind, ) -> Result<Arc<dyn WorkflowDatabase>, String>
Supplies durable SQL storage for the selected workflow subsystem.
Sourcefn fixture_service(
&self,
connectors: Vec<Arc<dyn Connector>>,
) -> Result<Arc<dyn CodeModeService>, String>
fn fixture_service( &self, connectors: Vec<Arc<dyn Connector>>, ) -> Result<Arc<dyn CodeModeService>, String>
Creates an isolated executor that can invoke only these fixture connectors.
Provided Methods§
Sourcefn service_with_limits(
&self,
catalog: ToolCatalog,
retry: RetryPolicy,
limits: WorkflowLimits,
) -> Result<Arc<dyn CodeModeService>, String>
fn service_with_limits( &self, catalog: ToolCatalog, retry: RetryPolicy, limits: WorkflowLimits, ) -> Result<Arc<dyn CodeModeService>, String>
Opens a service with host-owned composition budgets; older adapters reject custom limits.
Sourcefn wake_at<'life0, 'async_trait>(
&'life0 self,
_timestamp: u64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wake_at<'life0, 'async_trait>(
&'life0 self,
_timestamp: u64,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Persists a wakeup no later than this Unix millisecond timestamp. Hosts that poll independently may keep the default implementation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".