pub trait OrchestratorConnection: Send + Sync {
// Required methods
fn push<'life0, 'async_trait>(
&'life0 self,
message: OrchestratorMessage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<OrchestratorMessage>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_connected(&self) -> bool;
}Expand description
Trait for bidirectional orchestrator communication.
Required Methods§
Sourcefn push<'life0, 'async_trait>(
&'life0 self,
message: OrchestratorMessage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn push<'life0, 'async_trait>(
&'life0 self,
message: OrchestratorMessage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Push a message from agent to orchestrator (fire-and-forget)
Sourcefn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<OrchestratorMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<OrchestratorMessage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive the next message from orchestrator (blocking await)
Sourcefn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Check if connected
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".