address-lookup-pkarr-dht only.Expand description
Pkarr based address lookup for iroh, supporting both relay servers and the DHT.
+Module dht
address-lookup-pkarr-dht only.Expand description
Pkarr based address lookup for iroh, supporting both relay servers and the DHT.
This module contains pkarr-based address lookup for iroh which can use both pkarr relay servers as well as the Mainline DHT directly. See the pkarr module for an overview of pkarr.
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/dht/struct.Builder.html b/pr/4012/docs/iroh/address_lookup/pkarr/dht/struct.Builder.html index 779428612a..ba0d5c90cd 100644 --- a/pr/4012/docs/iroh/address_lookup/pkarr/dht/struct.Builder.html +++ b/pr/4012/docs/iroh/address_lookup/pkarr/dht/struct.Builder.html @@ -1,29 +1,32 @@ -Builder
pub struct Builder { /* private fields */ }address-lookup-pkarr-dht only.Expand description
Builder for DhtAddressLookup.
Builder
pub struct Builder { /* private fields */ }address-lookup-pkarr-dht only.Expand description
Builder for DhtAddressLookup.
By default, publishing to the DHT is enabled, and relay publishing is disabled.
-Implementations§
Source§impl Builder
impl Builder
Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
pub fn secret_key(self, secret_key: SecretKey) -> Self
Sets the secret key to use for signing the DNS packets.
+Implementations§
Source§impl Builder
impl Builder
Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
pub fn secret_key(self, secret_key: SecretKey) -> Self
Sets the secret key to use for signing the DNS packets.
Without a secret key, the endpoint will not publish its address to the DHT.
-Sourcepub fn pkarr_relay(self, pkarr_relay: Url) -> Self
pub fn pkarr_relay(self, pkarr_relay: Url) -> Self
Sets the pkarr relay URL to use.
-Sourcepub fn n0_dns_pkarr_relay(self) -> Self
pub fn n0_dns_pkarr_relay(self) -> Self
Uses the default number 0 pkarr relay URL.
-Sourcepub fn republish_delay(self, republish_delay: Duration) -> Self
pub fn republish_delay(self, republish_delay: Duration) -> Self
Sets the republish delay for the DHT.
-Sourcepub fn no_publish(self) -> Self
pub fn no_publish(self) -> Self
Disables publishing even if a secret key is set.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
pub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the DHT.
-By default (when not called), AddrFilter::relay_only is used when relays are
-enabled, or AddrFilter::unfiltered when relays are disabled. This avoids
-leaking IP addresses to the public DHT when a relay is available.
Sourcepub fn pkarr_relay(self, pkarr_relay: Url) -> Self
pub fn pkarr_relay(self, pkarr_relay: Url) -> Self
Sets the pkarr relay URL to use.
+Sourcepub fn n0_dns_pkarr_relay(self) -> Self
pub fn n0_dns_pkarr_relay(self) -> Self
Uses the default number 0 pkarr relay URL.
+Sourcepub fn republish_delay(self, republish_delay: Duration) -> Self
pub fn republish_delay(self, republish_delay: Duration) -> Self
Sets the republish delay for the DHT.
+Sourcepub fn no_publish(self) -> Self
pub fn no_publish(self) -> Self
Disables publishing even if a secret key is set.
+Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
pub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the DHT.
+By default AddrFilter::relay_only is used. This avoids leaking IP addresses
+to the public DHT.
It can be useful to override this with AddrFilter::unfiltered, if this is
+not a concern, e.g. when this endpoint runs on a machine with public IP
+addresses and without a firewall. In such cases connecting to this endpoint
+with just an EndpointId and DHT lookup can become faster and potentially
+even bypass a relay connection entirely.
Sourcepub fn build(
self,
- relays_enabled: bool,
) -> Result<FilteredAddressLookup<DhtAddressLookup>, AddressLookupBuilderError>
pub fn build( self, - relays_enabled: bool, ) -> Result<FilteredAddressLookup<DhtAddressLookup>, AddressLookupBuilderError>
Builds the address lookup mechanism.
relays_enabled determines the default address filter when none was set via
Builder::addr_filter: when true, AddrFilter::relay_only is used;
when false, AddrFilter::unfiltered is used.
Trait Implementations§
Source§impl AddressLookupBuilder for Builder
impl AddressLookupBuilder for Builder
Trait Implementations§
Source§impl AddressLookupBuilder for Builder
impl AddressLookupBuilder for Builder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
fn into_address_lookup( self, endpoint: &Endpoint, -) -> Result<impl AddressLookup, AddressLookupBuilderError>
AddressLookup. Read moreAuto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
AddressLookup. Read moreAuto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/dht/struct.DhtAddressLookup.html b/pr/4012/docs/iroh/address_lookup/pkarr/dht/struct.DhtAddressLookup.html
index 7e5083802a..1b0eac6f01 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/dht/struct.DhtAddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/dht/struct.DhtAddressLookup.html
@@ -1,4 +1,4 @@
-DhtAddressLookup in iroh::address_lookup::pkarr::dht - Rust DhtAddressLookup
pub struct DhtAddressLookup(/* private fields */);
Available on crate feature address-lookup-pkarr-dht only.Expand description
Pkarr Mainline DHT and relay server address lookup.
+DhtAddressLookup in iroh::address_lookup::pkarr::dht - Rust DhtAddressLookup
pub struct DhtAddressLookup(/* private fields */);
Available on crate feature address-lookup-pkarr-dht only.Expand description
Pkarr Mainline DHT and relay server address lookup.
It stores endpoint addresses in DNS records, signed by the endpoint’s private key, and publishes
them to the BitTorrent Mainline DHT. See the pkarr module for more details.
This implements the AddressLookup trait to be used as an address lookup service which can
@@ -8,11 +8,11 @@ a background task that periodically publishes the endpoint address.
configuration by default: when relays are enabled, only relay addresses are published
(AddrFilter::relay_only); when relays are disabled, all addresses are published
(AddrFilter::unfiltered). You can override this via Builder::addr_filter.
-Implementations§
Source§impl DhtAddressLookup
Sourcepub fn builder() -> Builder
Creates a new builder for DhtAddressLookup.
-Trait Implementations§
Source§impl AddressLookup for DhtAddressLookup
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreImplementations§
Source§impl DhtAddressLookup
Sourcepub fn builder() -> Builder
Creates a new builder for DhtAddressLookup.
+Trait Implementations§
Source§impl AddressLookup for DhtAddressLookup
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§impl Clone for DhtAddressLookup
Source§fn clone(&self) -> DhtAddressLookup
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for DhtAddressLookup
§impl !RefUnwindSafe for DhtAddressLookup
§impl Send for DhtAddressLookup
§impl Sync for DhtAddressLookup
§impl Unpin for DhtAddressLookup
§impl !UnwindSafe for DhtAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
Source§impl Clone for DhtAddressLookup
Source§fn clone(&self) -> DhtAddressLookup
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for DhtAddressLookup
§impl !RefUnwindSafe for DhtAddressLookup
§impl Send for DhtAddressLookup
§impl Sync for DhtAddressLookup
§impl Unpin for DhtAddressLookup
§impl !UnwindSafe for DhtAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/index.html b/pr/4012/docs/iroh/address_lookup/pkarr/index.html
index 34a1933208..1271755b4b 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/index.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/index.html
@@ -1,4 +1,4 @@
-iroh::address_lookup::pkarr - Rust Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
+iroh::address_lookup::pkarr - Rust Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
Public-Key Addressable Resource Records, pkarr, is a system which allows publishing
DNS Resource Records owned by a particular SecretKey under a name derived from its
corresponding PublicKey, also known as the EndpointId. Additionally this pkarr
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
index 70e4a53f7f..022e7ef301 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
@@ -1,28 +1,28 @@
-
PkarrPublisher in iroh::address_lookup::pkarr - Rust PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }
Expand description
Publisher of address lookup information to a pkarr relay.
+PkarrPublisher in iroh::address_lookup::pkarr - Rust PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }
Expand description
Publisher of address lookup information to a pkarr relay.
This publisher uses HTTP to publish address lookup information to a pkarr relay
server, see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only publishes address lookup information, for the corresponding resolver use
the PkarrResolver together with ConcurrentAddressLookup.
This publisher will only publish the RelayUrl if it is set, otherwise the direct addresses are published instead.
-Implementations§
Source§impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
+Implementations§
Source§impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
If no further options are set, the pkarr publisher will use DEFAULT_PKARR_TTL as the
time-to-live value for the published packets, and it will republish Address Lookup information
every DEFAULT_REPUBLISH_INTERVAL, even if the information is unchanged.
PkarrPublisherBuilder implements AddressLookupBuilder, so it can be passed to address_lookup.
It will then use the endpoint’s secret key to sign published packets.
-Sourcepub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0, at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable
IROH_FORCE_STAGING_RELAYS set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
+Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
This is a nonblocking function, the actual update is performed in the background.
-Trait Implementations§
Source§impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreTrait Implementations§
Source§impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisher
§impl RefUnwindSafe for PkarrPublisher
§impl Send for PkarrPublisher
§impl Sync for PkarrPublisher
§impl Unpin for PkarrPublisher
§impl UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
Source§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisher
§impl RefUnwindSafe for PkarrPublisher
§impl Send for PkarrPublisher
§impl Sync for PkarrPublisher
§impl Unpin for PkarrPublisher
§impl UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
index c779fc7ad0..30841bd63e 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
@@ -1,22 +1,24 @@
PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
-Implementations§
Source§impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
-By default (when not called), AddrFilter::relay_only is used when relays are
-enabled, or AddrFilter::unfiltered when relays are disabled. This avoids
-leaking IP addresses to the public pkarr server when the endpoint is configured with relays.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
+public pkarr server.
+However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine
+connected to the internet via public IP addresses without a firewall.
+In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup
+faster, potentially skipping a relay connection altogether.
+Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
- relays_enabled: bool,
) -> FilteredAddressLookup<PkarrPublisher>
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index 9989f89474..ee3936253a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index bdda99ce28..04fcc8c10f 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
DhtAddressLookup
pub struct DhtAddressLookup(/* private fields */);address-lookup-pkarr-dht only.Expand description
Pkarr Mainline DHT and relay server address lookup.
+DhtAddressLookup
pub struct DhtAddressLookup(/* private fields */);address-lookup-pkarr-dht only.Expand description
Pkarr Mainline DHT and relay server address lookup.
It stores endpoint addresses in DNS records, signed by the endpoint’s private key, and publishes them to the BitTorrent Mainline DHT. See the pkarr module for more details.
This implements the AddressLookup trait to be used as an address lookup service which can
@@ -8,11 +8,11 @@ a background task that periodically publishes the endpoint address.
AddrFilter::relay_only); when relays are disabled, all addresses are published
(AddrFilter::unfiltered). You can override this via Builder::addr_filter.
-Implementations§
Source§impl DhtAddressLookup
impl DhtAddressLookup
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder for DhtAddressLookup.
Trait Implementations§
Source§impl AddressLookup for DhtAddressLookup
impl AddressLookup for DhtAddressLookup
Source§fn publish(&self, data: &EndpointData)
fn publish(&self, data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreImplementations§
Source§impl DhtAddressLookup
impl DhtAddressLookup
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder for DhtAddressLookup.
Trait Implementations§
Source§impl AddressLookup for DhtAddressLookup
impl AddressLookup for DhtAddressLookup
Source§fn publish(&self, data: &EndpointData)
fn publish(&self, data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreSource§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
fn resolve( &self, endpoint_id: EndpointId, -) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§impl Clone for DhtAddressLookup
impl Clone for DhtAddressLookup
Source§fn clone(&self) -> DhtAddressLookup
fn clone(&self) -> DhtAddressLookup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DhtAddressLookup
impl !RefUnwindSafe for DhtAddressLookup
impl Send for DhtAddressLookup
impl Sync for DhtAddressLookup
impl Unpin for DhtAddressLookup
impl !UnwindSafe for DhtAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
impl<T> AddressLookupBuilder for T
Source§impl Clone for DhtAddressLookup
impl Clone for DhtAddressLookup
Source§fn clone(&self) -> DhtAddressLookup
fn clone(&self) -> DhtAddressLookup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DhtAddressLookup
impl !RefUnwindSafe for DhtAddressLookup
impl Send for DhtAddressLookup
impl Sync for DhtAddressLookup
impl Unpin for DhtAddressLookup
impl !UnwindSafe for DhtAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/index.html b/pr/4012/docs/iroh/address_lookup/pkarr/index.html
index 34a1933208..1271755b4b 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/index.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/index.html
@@ -1,4 +1,4 @@
-iroh::address_lookup::pkarr - Rust Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
+iroh::address_lookup::pkarr - Rust Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
Public-Key Addressable Resource Records, pkarr, is a system which allows publishing
DNS Resource Records owned by a particular SecretKey under a name derived from its
corresponding PublicKey, also known as the EndpointId. Additionally this pkarr
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
index 70e4a53f7f..022e7ef301 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
@@ -1,28 +1,28 @@
-
PkarrPublisher in iroh::address_lookup::pkarr - Rust PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }
Expand description
Publisher of address lookup information to a pkarr relay.
+PkarrPublisher in iroh::address_lookup::pkarr - Rust PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }
Expand description
Publisher of address lookup information to a pkarr relay.
This publisher uses HTTP to publish address lookup information to a pkarr relay
server, see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only publishes address lookup information, for the corresponding resolver use
the PkarrResolver together with ConcurrentAddressLookup.
This publisher will only publish the RelayUrl if it is set, otherwise the direct addresses are published instead.
-Implementations§
Source§impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
+Implementations§
Source§impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
If no further options are set, the pkarr publisher will use DEFAULT_PKARR_TTL as the
time-to-live value for the published packets, and it will republish Address Lookup information
every DEFAULT_REPUBLISH_INTERVAL, even if the information is unchanged.
PkarrPublisherBuilder implements AddressLookupBuilder, so it can be passed to address_lookup.
It will then use the endpoint’s secret key to sign published packets.
-Sourcepub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0, at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable
IROH_FORCE_STAGING_RELAYS set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
+Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
This is a nonblocking function, the actual update is performed in the background.
-Trait Implementations§
Source§impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreTrait Implementations§
Source§impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisher
§impl RefUnwindSafe for PkarrPublisher
§impl Send for PkarrPublisher
§impl Sync for PkarrPublisher
§impl Unpin for PkarrPublisher
§impl UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
Source§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisher
§impl RefUnwindSafe for PkarrPublisher
§impl Send for PkarrPublisher
§impl Sync for PkarrPublisher
§impl Unpin for PkarrPublisher
§impl UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
index c779fc7ad0..30841bd63e 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
@@ -1,22 +1,24 @@
PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
-Implementations§
Source§impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
-By default (when not called), AddrFilter::relay_only is used when relays are
-enabled, or AddrFilter::unfiltered when relays are disabled. This avoids
-leaking IP addresses to the public pkarr server when the endpoint is configured with relays.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
+public pkarr server.
+However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine
+connected to the internet via public IP addresses without a firewall.
+In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup
+faster, potentially skipping a relay connection altogether.
+Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
- relays_enabled: bool,
) -> FilteredAddressLookup<PkarrPublisher>
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index 9989f89474..ee3936253a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index bdda99ce28..04fcc8c10f 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/index.html b/pr/4012/docs/iroh/address_lookup/pkarr/index.html
index 34a1933208..1271755b4b 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/index.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/index.html
@@ -1,4 +1,4 @@
-iroh::address_lookup::pkarr - Rust Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
+iroh::address_lookup::pkarr - Rust Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
Public-Key Addressable Resource Records, pkarr, is a system which allows publishing
DNS Resource Records owned by a particular SecretKey under a name derived from its
corresponding PublicKey, also known as the EndpointId. Additionally this pkarr
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
index 70e4a53f7f..022e7ef301 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
@@ -1,28 +1,28 @@
-
PkarrPublisher in iroh::address_lookup::pkarr - Rust PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }
Expand description
Publisher of address lookup information to a pkarr relay.
+PkarrPublisher in iroh::address_lookup::pkarr - Rust PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }
Expand description
Publisher of address lookup information to a pkarr relay.
This publisher uses HTTP to publish address lookup information to a pkarr relay
server, see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only publishes address lookup information, for the corresponding resolver use
the PkarrResolver together with ConcurrentAddressLookup.
This publisher will only publish the RelayUrl if it is set, otherwise the direct addresses are published instead.
-Implementations§
Source§impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
+Implementations§
Source§impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
If no further options are set, the pkarr publisher will use DEFAULT_PKARR_TTL as the
time-to-live value for the published packets, and it will republish Address Lookup information
every DEFAULT_REPUBLISH_INTERVAL, even if the information is unchanged.
PkarrPublisherBuilder implements AddressLookupBuilder, so it can be passed to address_lookup.
It will then use the endpoint’s secret key to sign published packets.
-Sourcepub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0, at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable
IROH_FORCE_STAGING_RELAYS set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
+Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
This is a nonblocking function, the actual update is performed in the background.
-Trait Implementations§
Source§impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreTrait Implementations§
Source§impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisher
§impl RefUnwindSafe for PkarrPublisher
§impl Send for PkarrPublisher
§impl Sync for PkarrPublisher
§impl Unpin for PkarrPublisher
§impl UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
Source§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisher
§impl RefUnwindSafe for PkarrPublisher
§impl Send for PkarrPublisher
§impl Sync for PkarrPublisher
§impl Unpin for PkarrPublisher
§impl UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
index c779fc7ad0..30841bd63e 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
@@ -1,22 +1,24 @@
PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
-Implementations§
Source§impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
-By default (when not called), AddrFilter::relay_only is used when relays are
-enabled, or AddrFilter::unfiltered when relays are disabled. This avoids
-leaking IP addresses to the public pkarr server when the endpoint is configured with relays.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
+public pkarr server.
+However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine
+connected to the internet via public IP addresses without a firewall.
+In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup
+faster, potentially skipping a relay connection altogether.
+Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
- relays_enabled: bool,
) -> FilteredAddressLookup<PkarrPublisher>
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index 9989f89474..ee3936253a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index bdda99ce28..04fcc8c10f 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
+Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
Public-Key Addressable Resource Records, pkarr, is a system which allows publishing
DNS Resource Records owned by a particular SecretKey under a name derived from its
corresponding PublicKey, also known as the EndpointId. Additionally this pkarr
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
index 70e4a53f7f..022e7ef301 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
@@ -1,28 +1,28 @@
-
PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }Expand description
Publisher of address lookup information to a pkarr relay.
+PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }Expand description
Publisher of address lookup information to a pkarr relay.
This publisher uses HTTP to publish address lookup information to a pkarr relay server, see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only publishes address lookup information, for the corresponding resolver use
the PkarrResolver together with ConcurrentAddressLookup.
This publisher will only publish the RelayUrl if it is set, otherwise the direct addresses are published instead.
Implementations§
Source§impl PkarrPublisher
impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
pub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
Implementations§
Source§impl PkarrPublisher
impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
pub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
If no further options are set, the pkarr publisher will use DEFAULT_PKARR_TTL as the
time-to-live value for the published packets, and it will republish Address Lookup information
every DEFAULT_REPUBLISH_INTERVAL, even if the information is unchanged.
PkarrPublisherBuilder implements AddressLookupBuilder, so it can be passed to address_lookup.
It will then use the endpoint’s secret key to sign published packets.
Sourcepub fn n0_dns() -> PkarrPublisherBuilder
pub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrPublisherBuilder
pub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0, at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable
IROH_FORCE_STAGING_RELAYS set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
pub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
+Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
pub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
This is a nonblocking function, the actual update is performed in the background.
-Trait Implementations§
Source§impl AddressLookup for PkarrPublisher
impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
fn publish(&self, data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreTrait Implementations§
Source§impl AddressLookup for PkarrPublisher
impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
fn publish(&self, data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrPublisher
impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
fn clone(&self) -> PkarrPublisher
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PkarrPublisher
impl RefUnwindSafe for PkarrPublisher
impl Send for PkarrPublisher
impl Sync for PkarrPublisher
impl Unpin for PkarrPublisher
impl UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
impl<T> AddressLookupBuilder for T
Source§impl Clone for PkarrPublisher
impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
fn clone(&self) -> PkarrPublisher
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PkarrPublisher
impl RefUnwindSafe for PkarrPublisher
impl Send for PkarrPublisher
impl Sync for PkarrPublisher
impl Unpin for PkarrPublisher
impl UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
index c779fc7ad0..30841bd63e 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
@@ -1,22 +1,24 @@
PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
-Implementations§
Source§impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
-By default (when not called), AddrFilter::relay_only is used when relays are
-enabled, or AddrFilter::unfiltered when relays are disabled. This avoids
-leaking IP addresses to the public pkarr server when the endpoint is configured with relays.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
+public pkarr server.
+However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine
+connected to the internet via public IP addresses without a firewall.
+In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup
+faster, potentially skipping a relay connection altogether.
+Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
- relays_enabled: bool,
) -> FilteredAddressLookup<PkarrPublisher>
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index 9989f89474..ee3936253a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index bdda99ce28..04fcc8c10f 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
index c779fc7ad0..30841bd63e 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
@@ -1,22 +1,24 @@
PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
-Implementations§
Source§impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
-By default (when not called), AddrFilter::relay_only is used when relays are
-enabled, or AddrFilter::unfiltered when relays are disabled. This avoids
-leaking IP addresses to the public pkarr server when the endpoint is configured with relays.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
+public pkarr server.
+However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine
+connected to the internet via public IP addresses without a firewall.
+In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup
+faster, potentially skipping a relay connection altogether.
+Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
- relays_enabled: bool,
) -> FilteredAddressLookup<PkarrPublisher>
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index 9989f89474..ee3936253a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index bdda99ce28..04fcc8c10f 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }Expand description
Builder for PkarrPublisher.
Implementations§
Source§impl PkarrPublisherBuilder
impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
pub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
pub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
wasm_browser only.Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
pub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
-By default (when not called), AddrFilter::relay_only is used when relays are
-enabled, or AddrFilter::unfiltered when relays are disabled. This avoids
-leaking IP addresses to the public pkarr server when the endpoint is configured with relays.
Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
pub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
+public pkarr server.
However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine +connected to the internet via public IP addresses without a firewall. +In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup +faster, potentially skipping a relay connection altogether.
+Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
- relays_enabled: bool,
) -> FilteredAddressLookup<PkarrPublisher>
pub fn build( self, secret_key: SecretKey, tls_config: ClientConfig, - relays_enabled: bool, ) -> FilteredAddressLookup<PkarrPublisher>
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>
fn into_address_lookup( self, endpoint: &Endpoint, ) -> Result<impl AddressLookup, AddressLookupBuilderError>
AddressLookup. Read moreAuto Trait Implementations§
impl Freeze for PkarrPublisherBuilder
impl !RefUnwindSafe for PkarrPublisherBuilder
impl Send for PkarrPublisherBuilder
impl Sync for PkarrPublisherBuilder
impl Unpin for PkarrPublisherBuilder
impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index 9989f89474..ee3936253a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index bdda99ce28..04fcc8c10f 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
impl<T> Any for Twhere
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index 9989f89474..ee3936253a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index bdda99ce28..04fcc8c10f 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
Implementations§
Source§impl PkarrRelayClient
impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
pub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
Implementations§
Source§impl PkarrRelayClient
impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
pub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
pub fn builder( pkarr_relay_url: Url, tls_config: ClientConfig, ) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
pub async fn resolve( &self, endpoint_id: EndpointId, ) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
pub async fn publish( &self, signed_packet: &SignedPacket, ) -> Result<(), PkarrError>
Publishes a [SignedPacket].
Trait Implementations§
Source§impl Clone for PkarrRelayClient
impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
fn clone(&self) -> PkarrRelayClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PkarrRelayClient
impl !RefUnwindSafe for PkarrRelayClient
impl Send for PkarrRelayClient
impl Sync for PkarrRelayClient
impl Unpin for PkarrRelayClient
impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
fn clone(&self) -> PkarrRelayClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PkarrRelayClient
impl !RefUnwindSafe for PkarrRelayClient
impl Send for PkarrRelayClient
impl Sync for PkarrRelayClient
impl Unpin for PkarrRelayClient
impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index bdda99ce28..04fcc8c10f 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }Expand description
A builder for the PkarrRelayClient
Implementations§
Source§impl PkarrRelayClientBuilder
impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
pub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
wasm_browser only.Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
pub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
fn clone(&self) -> PkarrRelayClientBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PkarrRelayClientBuilder
impl !RefUnwindSafe for PkarrRelayClientBuilder
impl Send for PkarrRelayClientBuilder
impl Sync for PkarrRelayClientBuilder
impl Unpin for PkarrRelayClientBuilder
impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }Expand description
A builder for the PkarrRelayClient
Implementations§
Source§impl PkarrRelayClientBuilder
impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
pub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
wasm_browser only.Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
pub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
fn clone(&self) -> PkarrRelayClientBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PkarrRelayClientBuilder
impl !RefUnwindSafe for PkarrRelayClientBuilder
impl Send for PkarrRelayClientBuilder
impl Sync for PkarrRelayClientBuilder
impl Unpin for PkarrRelayClientBuilder
impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index eed9feffe1..acfb56cfd6 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 02f06b7c36..5c1525a050 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
index 4d35d702f0..ada6256a81 100644
--- a/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/4012/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
Source§impl Copy for DirectAddrType
Source§impl Eq for DirectAddrType
Source§impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
§impl Freeze for DirectAddrType
§impl RefUnwindSafe for DirectAddrType
§impl Send for DirectAddrType
§impl Sync for DirectAddrType
§impl Unpin for DirectAddrType
§impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
PkarrResolver
pub struct PkarrResolver { /* private fields */ }Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver
pub struct PkarrResolver { /* private fields */ }Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server, see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
Implementations§
Source§impl PkarrResolver
impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
pub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
pub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
Sourcepub fn n0_dns() -> PkarrResolverBuilder
pub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
pub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
fn resolve( &self, endpoint_id: EndpointId, -) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
fn publish(&self, _data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
fn clone(&self) -> PkarrResolver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PkarrResolver
impl !RefUnwindSafe for PkarrResolver
impl Send for PkarrResolver
impl Sync for PkarrResolver
impl Unpin for PkarrResolver
impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§fn publish(&self, _data: &EndpointData)
fn publish(&self, _data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
fn clone(&self) -> PkarrResolver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PkarrResolver
impl !RefUnwindSafe for PkarrResolver
impl Send for PkarrResolver
impl Sync for PkarrResolver
impl Unpin for PkarrResolver
impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 787223b687..50a25374b2 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 6fe78fcf35..0a40440263 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index df332a1646..eda72ab28a 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
+ 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 MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht 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.
PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }Expand description
Builder for PkarrResolver.
PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }Expand description
Builder for PkarrResolver.
Implementations§
Source§impl PkarrResolverBuilder
impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
wasm_browser only.Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
pub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
wasm_browser only.Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
pub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
fn into_address_lookup( self, endpoint: &Endpoint, -) -> Result<impl AddressLookup, AddressLookupBuilderError>
AddressLookup. Read moreAuto Trait Implementations§
impl Freeze for PkarrResolverBuilder
impl !RefUnwindSafe for PkarrResolverBuilder
impl Send for PkarrResolverBuilder
impl Sync for PkarrResolverBuilder
impl Unpin for PkarrResolverBuilder
impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
AddressLookup. Read moreAuto Trait Implementations§
impl Freeze for PkarrResolverBuilder
impl !RefUnwindSafe for PkarrResolverBuilder
impl Send for PkarrResolverBuilder
impl Sync for PkarrResolverBuilder
impl Unpin for PkarrResolverBuilder
impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit( diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html index 6fe78fcf35..0a40440263 100644 --- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html +++ b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html @@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
impl AddressLookup for DnsAddressLookup
wasm_browser only.impl AddressLookup for MdnsAddressLookup
address-lookup-mdns only.impl AddressLookup for MemoryLookup
impl AddressLookup for DhtAddressLookup
address-lookup-pkarr-dht only.impl AddressLookup for PkarrPublisher
impl AddressLookup for PkarrResolver
impl AddressLookup for ConcurrentAddressLookup
impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
Implementors§
impl AddressLookup for DnsAddressLookup
wasm_browser only.impl AddressLookup for MdnsAddressLookup
address-lookup-mdns only.impl AddressLookup for MemoryLookup
impl AddressLookup for DhtAddressLookup
address-lookup-pkarr-dht only.impl AddressLookup for PkarrPublisher
impl AddressLookup for PkarrResolver
impl AddressLookup for ConcurrentAddressLookup
impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
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§
impl AddressLookupBuilder for DnsAddressLookupBuilder
wasm_browser only.impl AddressLookupBuilder for MdnsAddressLookupBuilder
address-lookup-mdns only.impl AddressLookupBuilder for Builder
address-lookup-pkarr-dht only.impl AddressLookupBuilder for PkarrPublisherBuilder
impl AddressLookupBuilder for PkarrResolverBuilder
impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
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§
impl AddressLookupBuilder for DnsAddressLookupBuilder
wasm_browser only.impl AddressLookupBuilder for MdnsAddressLookupBuilder
address-lookup-mdns only.impl AddressLookupBuilder for Builder
address-lookup-pkarr-dht only.impl AddressLookupBuilder for PkarrPublisherBuilder
impl AddressLookupBuilder for PkarrResolverBuilder
impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS
DirectAddrType
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
fn clone(&self) -> DirectAddrType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DirectAddrType
impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
impl Hash for DirectAddrType
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Trait Implementations§
Source§impl Clone for DirectAddrType
impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
fn clone(&self) -> DirectAddrType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DirectAddrType
impl Debug for DirectAddrType
Source§impl Display for DirectAddrType
impl Display for DirectAddrType
Source§impl Hash for DirectAddrType
impl Hash for DirectAddrType
Source§impl Ord for DirectAddrType
impl Ord for DirectAddrType
Source§impl Ord for DirectAddrType
impl Ord for DirectAddrType
Source§fn cmp(&self, other: &DirectAddrType) -> Ordering
fn cmp(&self, other: &DirectAddrType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DirectAddrType
impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
impl PartialOrd for DirectAddrType
Source§impl PartialEq for DirectAddrType
impl PartialEq for DirectAddrType
Source§impl PartialOrd for DirectAddrType
impl PartialOrd for DirectAddrType
impl Copy for DirectAddrType
impl Eq for DirectAddrType
impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
impl Freeze for DirectAddrType
impl RefUnwindSafe for DirectAddrType
impl Send for DirectAddrType
impl Sync for DirectAddrType
impl Unpin for DirectAddrType
impl UnwindSafe for DirectAddrType
Blanket Implementations§
impl Copy for DirectAddrType
impl Eq for DirectAddrType
impl StructuralPartialEq for DirectAddrType
Auto Trait Implementations§
impl Freeze for DirectAddrType
impl RefUnwindSafe for DirectAddrType
impl Send for DirectAddrType
impl Sync for DirectAddrType
impl Unpin for DirectAddrType
impl UnwindSafe for DirectAddrType
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index cbad1d3da1..f702c4a9c8 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-Implementations§
Source§impl RelayMode
impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
pub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
Implementations§
Trait Implementations§
impl Eq for RelayMode
impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
impl Freeze for RelayMode
impl RefUnwindSafe for RelayMode
impl Send for RelayMode
impl Sync for RelayMode
impl Unpin for RelayMode
impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
impl Eq for RelayMode
impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
impl Freeze for RelayMode
impl RefUnwindSafe for RelayMode
impl Send for RelayMode
impl Sync for RelayMode
impl Unpin for RelayMode
impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 477a1f8ac0..29a92b2538 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 3314afe610..ca14313e82 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index f5e88ee8ec..05b91ad6d1 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 2ae7d597c2..c6afc577cb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
default_relay_mode
pub fn default_relay_mode() -> RelayModeExpand description
Returns the default relay mode.
+default_relay_mode
force_staging_infra
pub fn force_staging_infra() -> boolExpand description
Returns true if the use of staging relays is forced.
force_staging_infra
Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
ConnectOptions
pub struct ConnectOptions { /* private fields */ }Expand description
Options for the Endpoint::connect_with_opts function.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Initializes new connection options.
+ConnectOptions
pub struct ConnectOptions { /* private fields */ }Expand description
Options for the Endpoint::connect_with_opts function.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
Sourcepub fn with_transport_config(
+
pub fn with_transport_config( +
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
pub fn with_transport_config( self, transport_config: QuicTransportConfig, ) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
pub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in +
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
pub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
fn default() -> ConnectOptions
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl !RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
fn default() -> ConnectOptions
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl !RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
index 8ce094f85f..34812c995e 100644
--- a/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/4012/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§
DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index d8d9b6ebd6..d99d64fe06 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -36,9 +36,7 @@ the request to set new ALPNs.
Will also return None if the endpoint is closed.
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -58,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -78,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -98,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -141,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -174,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -262,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));
Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -277,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -310,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -320,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index cb5c3127b4..90e8860421 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
index 61b3ea0ab6..92667c6174 100644
--- a/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/4012/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust ClientBuilder
pub struct ClientBuilder { /* private fields */ }
Expand description
Build a Client.
Implementations§
Source§impl ClientBuilder
Sourcepub fn new(
- url: impl Into<RelayUrl>,
- secret_key: SecretKey,
+ url: impl Into<RelayUrl>,
+ secret_key: SecretKey,
dns_resolver: DnsResolver,
) -> Self
Create a new ClientBuilder
Sourcepub fn tls_client_config(self, tls_config: ClientConfig) -> Self
Sets a custom TLS config.
diff --git a/pr/4012/docs/iroh_relay/dns/index.html b/pr/4012/docs/iroh_relay/dns/index.html
index 7604d15781..8026ee1f62 100644
--- a/pr/4012/docs/iroh_relay/dns/index.html
+++ b/pr/4012/docs/iroh_relay/dns/index.html
@@ -1,7 +1,7 @@
iroh_relay::dns - Rust Module dns
Available on non-wasm_browser only.Expand description
Configurable DNS resolver for iroh-relay and iroh.
The main export is the DnsResolver struct. It provides methods to resolve domain names
to IPv4 and IPv6 addresses. Additionally, the resolver features methods to resolve the
-EndpointInfo for an iroh EndpointId from _iroh TXT records.
+EndpointInfo for an iroh [EndpointId] from _iroh TXT records.
See the endpoint_info module documentation for details on how iroh endpoint records
are structured.
Structs§
- Builder
- Builder for
DnsResolver. - DnsResolver
- The DNS resolver used throughout
iroh. - Staggered
Error - Error returned when a staggered call fails.
- TxtRecord
Data - Record data for a TXT record.
Enums§
- DnsError
- Potential errors related to DNS operations.
- DnsProtocol
- Protocols over which DNS records can be resolved.
- Lookup
Error - Potential errors related to DNS endpoint address lookups.
Constants§
- N0_
DNS_ENDPOINT_ORIGIN_PROD - The n0 address lookup DNS origin, for production.
- N0_
DNS_ENDPOINT_ORIGIN_STAGING - The n0 address lookup DNS origin, for testing.
Traits§
- Resolver
- Trait for DNS resolvers used in iroh.
Type Aliases§
- BoxIter
- Boxed iterator alias.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
index b58360bc10..07c329b32d 100644
--- a/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh_relay/dns/struct.DnsResolver.html
@@ -77,9 +77,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
-) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, LookupError>Looks up endpoint info by [EndpointId] and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
@@ -97,10 +97,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
- endpoint_id: &EndpointId,
+ endpoint_id: &EndpointId,
origin: &str,
delays_ms: &[u64],
-) -> Result<EndpointInfo, StaggeredError<LookupError>>
Looks up endpoint info by EndpointId and origin domain name.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by [EndpointId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
index 807be259fa..06829f13d7 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/enum.DecodingError.html
@@ -8,12 +8,12 @@
meta: Meta,
},
InvalidKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for DecodingError
Source§impl Display for DecodingError
Source§impl Error for DecodingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodingError> for AnyError
Source§fn from(value: DecodingError) -> AnyError
Converts to this type from the input type.Source§impl From<DecodingError> for ParseError
Source§fn from(source: DecodingError) -> Self
Converts to this type from the input type.Source§impl StackError for DecodingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for DecodingError
§impl !RefUnwindSafe for DecodingError
§impl Send for DecodingError
§impl Sync for DecodingError
§impl Unpin for DecodingError
§impl !UnwindSafe for DecodingError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/index.html b/pr/4012/docs/iroh_relay/endpoint_info/index.html
index 22eb336b89..11e69a6214 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/index.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
-Dialing by EndpointId is supported by iroh endpoints publishing Pkarr records to DNS
+
iroh_relay::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by [EndpointId].
+Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-endpoint-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-endpoint-id> is the z-base-32 encoding of the EndpointId.
+<z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,7 +23,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from [z32],
+typically used by AddressLookup services in iroh before publishing. - Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for [
EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
index 3f096af47e..4517207db1 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.AddrFilter.html
@@ -7,12 +7,12 @@ type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
- f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
+ f: impl Fn(&BTreeSet<TransportAddr>) -> Vec<TransportAddr> + Send + Sync + 'static,
) -> Self
Create a new AddrFilter
Sourcepub fn unfiltered() -> Self
Constructs a filter that doesn’t filter addresses and passes all through.
Sourcepub fn relay_only() -> Self
Only keep relay addresses.
Sourcepub fn apply(&self, addrs: &BTreeSet<TransportAddr>) -> Vec<TransportAddr>
Apply the address filter function to a set of addresses.
+Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
index bda99ae4d9..0f4a4dd198 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointData.html
@@ -1,25 +1,25 @@
EndpointData in iroh_relay::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
-This includes an optional RelayUrl, a set of direct addresses, and the optional
+
This includes an optional [RelayUrl], a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
-This struct does not include the endpoint’s EndpointId, only the data about a certain
-endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
-Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
+This struct does not include the endpoint’s [EndpointId], only the data about a certain
+endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self
Creates a new EndpointData with a relay URL and a set of direct addresses.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint data.
Sourcepub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated endpoint data.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<EndpointAddr> for EndpointData
Source§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
index b62d260c2b..4d5151dd15 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html
@@ -1,17 +1,17 @@
EndpointInfo in iroh_relay::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
- pub endpoint_id: EndpointId,
+ pub endpoint_id: EndpointId,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
-This struct couples a EndpointId with its associated EndpointData.
-Fields§
§endpoint_id: EndpointIdThe EndpointId of the endpoint this is about.
+This struct couples a [EndpointId] with its associated EndpointData.
+Fields§
§endpoint_id: EndpointIdThe [EndpointId] of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
+Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: EndpointId) -> Self
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self
Sets the relay URL and returns the updated endpoint info.
Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self
Sets the IP based addresses and returns the updated endpoint info.
Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> Self
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a [EndpointAddr] by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a [EndpointAddr] without cloning.
Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = TxtRecordData>,
@@ -21,23 +21,23 @@
) -> Result<Self, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a SecretKey.
+This constructs a DNS packet and signs it with a [SecretKey].
Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Vec<TransportAddr>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> Self
Converts to this type from the input type.Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
Source§impl Deref for EndpointInfo
Source§impl DerefMut for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> Self
Converts to this type from the input type.Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
index 57884727d8..b36042bff9 100644
--- a/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
+++ b/pr/4012/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html
@@ -1,9 +1,9 @@
EndpointIdExt in iroh_relay::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<EndpointId, DecodingError>;
+}Expand description
Extension methods for [EndpointId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-
Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<EndpointId, DecodingError>
Parses a EndpointId from z-base-32 encoding.
-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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
+Required Methods§
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.
Implementations on Foreign Types§
Source§impl EndpointIdExt for EndpointId
Implementors§
\ No newline at end of file
diff --git a/pr/4012/docs/iroh_relay/enum.KeyCache.html b/pr/4012/docs/iroh_relay/enum.KeyCache.html
index 0f3da2bdd0..854c0161ff 100644
--- a/pr/4012/docs/iroh_relay/enum.KeyCache.html
+++ b/pr/4012/docs/iroh_relay/enum.KeyCache.html
@@ -1,20 +1,20 @@
KeyCache in iroh_relay - Rust KeyCache
pub enum KeyCache {
Disabled,
- Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
+ Shared(Arc<Mutex<LruCache<PublicKey, ()>>>),
}
Expand description
A cache for public keys.
This is used solely to make parsing public keys from byte slices more
efficient for the very common case where a large number of identical keys
are being parsed, like in the relay server.
The cache stores only successful parse results.
Variants§
§Disabled
The key cache is disabled.
-The key cache is enabled with a fixed capacity. It is shared between
+
The key cache is enabled with a fixed capacity. It is shared between
multiple threads.
Implementations§
Source§impl KeyCache
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for KeyCache
§impl RefUnwindSafe for KeyCache
§impl Send for KeyCache
§impl Sync for KeyCache
§impl Unpin for KeyCache
§impl UnwindSafe for KeyCache
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh_relay/index.html b/pr/4012/docs/iroh_relay/index.html
index 071728d784..c324d44d01 100644
--- a/pr/4012/docs/iroh_relay/index.html
+++ b/pr/4012/docs/iroh_relay/index.html
@@ -25,7 +25,7 @@ Tailscale.
QAD support and expose metrics.
-
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by
EndpointId. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
+
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non-wasm_browser - Configurable DNS resolver for
iroh-relay and iroh. - endpoint_
info - Support for handling DNS resource records for dialing by [
EndpointId]. - http
- HTTP-specific constants for the relay server and client.
- protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections
for QUIC address discovery.
- server
server - A fully-fledged iroh-relay server over HTTP or HTTPS.
- tls
- TLS verification configuration for iroh and iroh-relay.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Config - Information on a specific relay server.
- Relay
Map - List of relay server configurations to be used in an iroh endpoint.
- Relay
QuicConfig - Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.
Enums§
- KeyCache
- A cache for public keys.
Traits§
- Export
KeyingMaterial - This trait allows anything that ends up potentially
wrapping a TLS stream use the underlying
export_keying_material
diff --git a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
index 6bf4bfd38d..792f4ea6d7 100644
--- a/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
+++ b/pr/4012/docs/iroh_relay/protos/handshake/struct.SuccessfulAuthentication.html
@@ -1,5 +1,5 @@
SuccessfulAuthentication in iroh_relay::protos::handshake - Rust SuccessfulAuthentication
pub struct SuccessfulAuthentication {
- pub client_key: PublicKey,
+ pub client_key: PublicKey,
pub mechanism: Mechanism,
}
Available on crate feature server only.Expand description
This represents successful authentication for the client with the client_key public key
via the authentication Mechanism mechanism.
@@ -8,13 +8,13 @@ Result of a successful authentication handshake.
This struct represents a client that has successfully authenticated itself to the relay
server. The authorization must still be confirmed by calling Self::authorize_if to
complete the protocol and notify the client of success or failure.
-Fields§
§client_key: PublicKeyThe authenticated client’s public key.
+Fields§
§client_key: PublicKeyThe authenticated client’s public key.
§mechanism: MechanismThe authentication mechanism that was used.
Implementations§
Source§impl SuccessfulAuthentication
Completes the authorization protocol by notifying the client of success or failure.
+) -> Result<PublicKey, Error>Completes the authorization protocol by notifying the client of success or failure.
After a client has been successfully authenticated via serverside, the server must
decide whether to authorize the client (allow access) or deny it. This method sends
the authorization decision to the client and completes the handshake protocol.
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
index 0c25cf9d54..c864cce80c 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html
@@ -2,7 +2,7 @@
Ping([u8; 8]),
Pong([u8; 8]),
Datagrams {
- dst_endpoint_id: EndpointId,
+ dst_endpoint_id: EndpointId,
datagrams: Datagrams,
},
}Expand description
Messages that clients send to relays.
@@ -11,7 +11,7 @@ other side with a §Pong([u8; 8])
Reply to a RelayToClientMsg::Ping from a server
with the payload sent previously in the ping.
§Datagrams
Request from the client to relay datagrams to given remote endpoint.
-Fields
§dst_endpoint_id: EndpointIdThe remote endpoint to relay to.
+Trait Implementations§
Source§impl Clone for ClientToRelayMsg
Source§fn clone(&self) -> ClientToRelayMsg
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for ClientToRelayMsg
Source§impl PartialEq for ClientToRelayMsg
Source§impl Sink<ClientToRelayMsg> for Client
Source§fn poll_ready(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
index 83d9df5b82..8e8006fed3 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.Error.html
@@ -17,7 +17,7 @@
meta: Meta,
},
InvalidPublicKey {
- source: KeyParsingError,
+ source: KeyParsingError,
meta: Meta,
},
InvalidFrame {
@@ -39,12 +39,12 @@
§FrameTooLarge
§SerDe
§FrameTypeError
§InvalidPublicKey
§InvalidPublicKey
§InvalidFrame
Fields
§meta: MetaCaptured call-site metadata
§InvalidFrameType
§InvalidProtocolMessageEncoding
§TooSmall
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl From<KeyParsingError> for Error
Source§fn from(source: KeyParsingError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
Source§impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<Error> for RecvError
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<Error> for RecvError
Available on crate feature server only.
Source§fn from(source: ProtoError) -> Self
Converts to this type from the input type.Source§impl From<FrameTypeError> for Error
Source§fn from(source: FrameTypeError) -> Self
Converts to this type from the input type.Source§impl StackError for Error
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Returns the next source in the chain, if any.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for Error
§impl !RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl !UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
index 75ed075f07..b596a8eb85 100644
--- a/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
+++ b/pr/4012/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html
@@ -1,9 +1,9 @@
RelayToClientMsg in iroh_relay::protos::relay - Rust RelayToClientMsg
pub enum RelayToClientMsg {
Datagrams {
- remote_endpoint_id: EndpointId,
+ remote_endpoint_id: EndpointId,
datagrams: Datagrams,
},
- EndpointGone(EndpointId),
+ EndpointGone(EndpointId),
Health {
problem: String,
},
@@ -15,9 +15,9 @@
Pong([u8; 8]),
}
Expand description
The messages that a relay sends to clients or the clients receive from the relay.
Variants§