AddressLookupBuilder

Trait AddressLookupBuilder 

Source
pub trait AddressLookupBuilder:
    Send
    + Sync
    + Debug
    + 'static {
    // Required method
    fn into_address_lookup(
        self,
        endpoint: &Endpoint,
    ) -> Result<impl AddressLookup, AddressLookupBuilderError>;
}
Expand description

Trait for structs that can be converted into AddressLookups.

This trait is implemented on builders for Address Lookup’s. Any type that implements this trait can be added as a Address Lookup in Builder::address_lookup.

Any type that implements AddressLookup also implements AddressLookupBuilder.

Iroh uses this trait to allow configuring the set of address lookup services on the endpoint builder, while also providing them access to information about the endpoint to AddressLookupBuilder::into_address_lookup.

Required Methods§

Source

fn into_address_lookup( self, endpoint: &Endpoint, ) -> Result<impl AddressLookup, AddressLookupBuilderError>

Turns this builder into a ready-to-use AddressLookup.

If an error is returned, building the endpoint will fail with this error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AddressLookupBuilder for DnsAddressLookupBuilder

Available on non-wasm_browser only.
Source§

impl AddressLookupBuilder for PkarrPublisherBuilder

Source§

impl AddressLookupBuilder for PkarrResolverBuilder

Source§

impl<T: AddressLookup> AddressLookupBuilder for T

Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.