pub trait AgentResolverPort: Send + Sync {
// Required method
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn AgentPort>, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn resolve_all<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [AgentId],
) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn AgentPort>>, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Methods§
Sourcefn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn AgentPort>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 AgentId,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn AgentPort>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve a single agent identity. Returns
DomainError::NotFound when the id is unknown to the adapter.
Provided Methods§
Sourcefn resolve_all<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [AgentId],
) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn AgentPort>>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_all<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [AgentId],
) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn AgentPort>>, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve a batch of agent identities preserving input order.
Returns DomainError::NotFound on the first unresolved id.
Default implementation calls Self::resolve in order; adapters
can override to batch lookups.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".