Skip to main content

ScionDnsResolver

Trait ScionDnsResolver 

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

DNS resolver trait for SCION address discovery.

Implementations return zero or more ScionAddr values for a given domain name. The resolver is expected to be async and safe to share across tasks.

§Error handling

Implementations SHOULD return ResolveError::NoValidEntries only when a lookup succeeds but yields no valid SCION TXT entries. Partial failures SHOULD return the valid addresses and log warnings for invalid entries.

Required Methods§

Source

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

Resolve a domain into SCION addresses.

Implementations SHOULD return only valid addresses and log warnings for invalid TXT entries. Errors are reserved for lookup failures or when no valid addresses can be produced.

Implementors§