IdentityResolver

Trait IdentityResolver 

Source
pub trait IdentityResolver: Send + Sync {
    // Required method
    fn resolve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        subject: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Document>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for AT Protocol identity resolution.

Implementations must be thread-safe (Send + Sync) and usable in async environments. This trait provides the core functionality for resolving AT Protocol subjects (handles or DIDs) to their corresponding DID documents.

Required Methods§

Source

fn resolve<'life0, 'life1, 'async_trait>( &'life0 self, subject: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Document>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolves an AT Protocol subject to its DID document.

Takes a handle or DID, resolves it to a canonical DID, then retrieves the corresponding DID document from the appropriate source (PLC directory or web).

§Arguments
  • subject - The AT Protocol handle or DID to resolve
§Returns
  • Ok(Document) - The resolved DID document
  • Err(anyhow::Error) - Resolution error with detailed context

Implementors§