Skip to main content

AgentResolverPort

Trait AgentResolverPort 

Source
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§

Source

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§

Source

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".

Implementors§