Constant DEFAULT_RELAY_QUIC_PORT
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16Expand description
The default QUIC port used by the Relay server to accept QUIC connections +
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16Expand description
The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery
The port is “QUIC” typed on a phone keypad. The default QUIC port used by the Relay server to accept QUIC connections diff --git a/pr/3175/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html b/pr/3175/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html index a803eee012..ed94b0aecf 100644 --- a/pr/3175/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html +++ b/pr/3175/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html @@ -1,4 +1,4 @@ -
Constant DEFAULT_STUN_PORT
pub const DEFAULT_STUN_PORT: u16 = 3478; // 3_478u16Expand description
The default STUN port used by the Relay server.
+pub const DEFAULT_STUN_PORT: u16 = 3478; // 3_478u16Expand description
The default STUN port used by the Relay server.
The STUN port as defined by RFC 8489 The default STUN port used by the Relay server.
diff --git a/pr/3175/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html index b2c917a0a7..57d3042a63 100644 --- a/pr/3175/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html +++ b/pr/3175/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html @@ -1,2 +1,2 @@ -Constant N0_DNS_NODE_ORIGIN_PROD
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;Expand description
The n0 testing DNS node origin, for production.
+Constant N0_DNS_NODE_ORIGIN_STAGING
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;Expand description
The n0 testing DNS node origin, for testing.
+Expand description
DNS node discovery for iroh
+N0_DNS_NODE_ORIGIN_STAGING domain
with DnsDiscovery::new. This would then use a hosted staging discovery
service for testing purposes.
-Trait Implementations§
Trait Implementations§
Source§impl Debug for DnsDiscovery
impl Debug for DnsDiscovery
Auto Trait Implementations§
impl Freeze for DnsDiscovery
impl RefUnwindSafe for DnsDiscovery
impl Send for DnsDiscovery
impl Sync for DnsDiscovery
impl Unpin for DnsDiscovery
impl UnwindSafe for DnsDiscovery
Blanket Implementations§
Auto Trait Implementations§
impl Freeze for DnsDiscovery
impl RefUnwindSafe for DnsDiscovery
impl Send for DnsDiscovery
impl Sync for DnsDiscovery
impl Unpin for DnsDiscovery
impl UnwindSafe for DnsDiscovery
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/3175/docs/iroh/discovery/index.html b/pr/3175/docs/iroh/discovery/index.html
index 6920edd48b..939ea3edfb 100644
--- a/pr/3175/docs/iroh/discovery/index.html
+++ b/pr/3175/docs/iroh/discovery/index.html
@@ -1,4 +1,4 @@
-iroh::discovery - Rust Expand description
Node address discovery.
+iroh::discovery - Rust Expand description
Node address discovery.
To connect to an iroh node a NodeAddr is needed, which may contain a
RelayUrl or one or more direct addresses in addition to the NodeId.
Since there is a conversion from NodeId to NodeAddr, you can also use
@@ -69,4 +69,4 @@ perform lookups to all discovery systems at the same time.
Box::new(DnsDiscovery::n0_dns()),
Box::new(LocalSwarmDiscovery::new(secret_key.public())?),
]);
-Modules§
- DNS node discovery for iroh
- local_
swarm_discovery discovery-local-network A discovery service that uses an mdns-like service to discover local nodes. - A discovery service which publishes and resolves node information using a pkarr relay.
- A static node discovery to manually add node addressing information.
Structs§
- A discovery service that combines multiple discovery sources.
- The results returned from
Discovery::resolve. - The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAME TXT resource record.
Traits§
- Node discovery for
super::Endpoint.
\ No newline at end of file
+Modules§
- DNS node discovery for iroh
- local_
swarm_discovery discovery-local-network A discovery service that uses an mdns-like service to discover local nodes. - A discovery service which publishes and resolves node information using a pkarr relay.
- A static node discovery to manually add node addressing information.
Structs§
- A discovery service that combines multiple discovery sources.
- The results returned from
Discovery::resolve. - Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Traits§
- Node discovery for
super::Endpoint.
Expand description
Node address discovery.
+Expand description
Node address discovery.
To connect to an iroh node a NodeAddr is needed, which may contain a
RelayUrl or one or more direct addresses in addition to the NodeId.
Since there is a conversion from NodeId to NodeAddr, you can also use
@@ -69,4 +69,4 @@ perform lookups to all discovery systems at the same time.
Modules§
- DNS node discovery for iroh
- local_
swarm_ discovery discovery-local-networkA discovery service that uses an mdns-like service to discover local nodes. - A discovery service which publishes and resolves node information using a pkarr relay.
- A static node discovery to manually add node addressing information.
Structs§
- A discovery service that combines multiple discovery sources.
- The results returned from
Discovery::resolve. - The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAMETXT resource record.
Traits§
- Node discovery for
super::Endpoint.
Modules§
- DNS node discovery for iroh
- local_
swarm_ discovery discovery-local-networkA discovery service that uses an mdns-like service to discover local nodes. - A discovery service which publishes and resolves node information using a pkarr relay.
- A static node discovery to manually add node addressing information.
Structs§
- A discovery service that combines multiple discovery sources.
- The results returned from
Discovery::resolve. - Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Traits§
- Node discovery for
super::Endpoint.
discovery-local-network only.Expand description
A discovery service that uses an mdns-like service to discover local nodes.
+discovery-local-network only.Expand description
A discovery service that uses an mdns-like service to discover local nodes.
This allows you to use an mdns-like swarm discovery service to find address information about nodes that are on your local network, no relay or outside internet needed.
See the swarm-discovery crate for more details.
When LocalSwarmDiscovery is enabled, it’s possible to get a list of the locally discovered nodes by filtering a list of RemoteInfos.
pub struct LocalSwarmDiscovery { /* private fields */ }discovery-local-network only.Expand description
Discovery using swarm-discovery, a variation on mdns
Implementations§
Source§impl LocalSwarmDiscovery
impl LocalSwarmDiscovery
Sourcepub fn new(node_id: NodeId) -> Result<Self>
pub fn new(node_id: NodeId) -> Result<Self>
Create a new LocalSwarmDiscovery Service.
Implementations§
Source§impl LocalSwarmDiscovery
impl LocalSwarmDiscovery
Sourcepub fn new(node_id: NodeId) -> Result<Self>
pub fn new(node_id: NodeId) -> Result<Self>
Create a new LocalSwarmDiscovery Service.
This starts a [Discoverer] that broadcasts your addresses and receives addresses from other nodes in your local network.
§Errors
Returns an error if the network does not allow ipv4 OR ipv6.
§Panics
This relies on [tokio::runtime::Handle::current] and will panic if called outside of the context of a tokio runtime.
Trait Implementations§
Trait Implementations§
Source§impl Debug for LocalSwarmDiscovery
impl Debug for LocalSwarmDiscovery
Auto Trait Implementations§
impl Freeze for LocalSwarmDiscovery
impl RefUnwindSafe for LocalSwarmDiscovery
impl Send for LocalSwarmDiscovery
impl Sync for LocalSwarmDiscovery
impl Unpin for LocalSwarmDiscovery
impl UnwindSafe for LocalSwarmDiscovery
Blanket Implementations§
Auto Trait Implementations§
impl Freeze for LocalSwarmDiscovery
impl RefUnwindSafe for LocalSwarmDiscovery
impl Send for LocalSwarmDiscovery
impl Sync for LocalSwarmDiscovery
impl Unpin for LocalSwarmDiscovery
impl UnwindSafe for LocalSwarmDiscovery
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/3175/docs/iroh/discovery/pkarr/dht/index.html b/pr/3175/docs/iroh/discovery/pkarr/dht/index.html
index d7fad606b9..8fd9eae983 100644
--- a/pr/3175/docs/iroh/discovery/pkarr/dht/index.html
+++ b/pr/3175/docs/iroh/discovery/pkarr/dht/index.html
@@ -1,4 +1,4 @@
-iroh::discovery::pkarr::dht - Rust Available on crate feature discovery-pkarr-dht only.Expand description
Pkarr based node discovery for iroh, supporting both relay servers and the DHT.
+iroh::discovery::pkarr::dht - Rust Available on crate feature discovery-pkarr-dht only.Expand description
Pkarr based node discovery for iroh, supporting both relay servers and the DHT.
This module contains pkarr-based node discovery 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/3175/docs/iroh/discovery/pkarr/dht/struct.Builder.html b/pr/3175/docs/iroh/discovery/pkarr/dht/struct.Builder.html
index 0cda41cc14..55a967083a 100644
--- a/pr/3175/docs/iroh/discovery/pkarr/dht/struct.Builder.html
+++ b/pr/3175/docs/iroh/discovery/pkarr/dht/struct.Builder.html
@@ -1,17 +1,17 @@
-Builder in iroh::discovery::pkarr::dht - Rust pub struct Builder { /* private fields */ }
Available on crate feature discovery-pkarr-dht only.Expand description
Builder for DhtDiscovery.
+Builder in iroh::discovery::pkarr::dht - Rust pub struct Builder { /* private fields */ }
Available on crate feature discovery-pkarr-dht only.Expand description
Builder for DhtDiscovery.
By default, publishing to the DHT is enabled, and relay publishing is disabled.
-Implementations§
Source§impl Builder
Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
Sets the secret key to use for signing the DNS packets.
+Implementations§
Source§impl Builder
Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
Sets the secret key to use for signing the DNS packets.
Without a secret key, the node will not publish its address to the DHT.
-Sourcepub fn pkarr_relay(self, pkarr_relay: Url) -> Self
Sets the pkarr relay URL to use.
-Sourcepub fn n0_dns_pkarr_relay(self) -> Self
Uses the default number 0 pkarr relay URL.
-Sourcepub fn include_direct_addresses(self, include_direct_addresses: bool) -> Self
Sets whether to include the direct addresses in the DNS packet.
-Sourcepub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self
Sets the initial delay before the first publish.
-Sourcepub fn republish_delay(self, republish_delay: Duration) -> Self
Sets the republish delay for the DHT.
-Sourcepub fn build(self) -> Result<DhtDiscovery>
Builds the discovery mechanism.
-Trait Implementations§
Auto 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§
Sourcepub fn pkarr_relay(self, pkarr_relay: Url) -> Self
Sets the pkarr relay URL to use.
+Sourcepub fn n0_dns_pkarr_relay(self) -> Self
Uses the default number 0 pkarr relay URL.
+Sourcepub fn include_direct_addresses(self, include_direct_addresses: bool) -> Self
Sets whether to include the direct addresses in the DNS packet.
+Sourcepub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self
Sets the initial delay before the first publish.
+Sourcepub fn republish_delay(self, republish_delay: Duration) -> Self
Sets the republish delay for the DHT.
+Sourcepub fn build(self) -> Result<DhtDiscovery>
Builds the discovery mechanism.
+Trait Implementations§
Auto 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> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3175/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html b/pr/3175/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
index c14f02186d..e1977df0df 100644
--- a/pr/3175/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
+++ b/pr/3175/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
@@ -4,12 +4,12 @@ them to the BitTorrent Mainline DHT. See the Discovery trait to be used as a node discovery service which can
be used as both a publisher and resolver. Calling DhtDiscovery::publish will start
a background task that periodically publishes the node address.
-
Implementations§
Source§impl DhtDiscovery
Sourcepub fn builder() -> Builder
Creates a new builder for DhtDiscovery.
-Trait Implementations§
Source§impl Clone for DhtDiscovery
Source§fn clone(&self) -> DhtDiscovery
Returns a copy 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 DhtDiscovery
Source§impl Default for DhtDiscovery
Source§impl Discovery for DhtDiscovery
Implementations§
Source§impl DhtDiscovery
Sourcepub fn builder() -> Builder
Creates a new builder for DhtDiscovery.
+Trait Implementations§
Source§impl Clone for DhtDiscovery
Source§fn clone(&self) -> DhtDiscovery
Returns a copy 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 DhtDiscovery
Source§impl Default for DhtDiscovery
Auto Trait Implementations§
§impl Freeze for DhtDiscovery
§impl !RefUnwindSafe for DhtDiscovery
§impl Send for DhtDiscovery
§impl Sync for DhtDiscovery
§impl Unpin for DhtDiscovery
§impl !UnwindSafe for DhtDiscovery
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for DhtDiscovery
§impl !RefUnwindSafe for DhtDiscovery
§impl Send for DhtDiscovery
§impl Sync for DhtDiscovery
§impl Unpin for DhtDiscovery
§impl !UnwindSafe for DhtDiscovery
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/3175/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html b/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html
index 5adc8da561..e17f4365ff 100644
--- a/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html
+++ b/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html
@@ -26,11 +26,11 @@ information is unchanged.
server is used instead.
Sourcepub fn update_addr_info(&self, data: &NodeData)
Publishes the addressing information about this node to a pkarr relay.
This is a nonblocking function, the actual update is performed in the background.
-Trait Implementations§
Source§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
Returns a copy 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 PkarrPublisher
Trait Implementations§
Source§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
Returns a copy 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 PkarrPublisher
Auto 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§
Auto 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§
§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/3175/docs/iroh/discovery/pkarr/struct.PkarrResolver.html b/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrResolver.html
index 41f030f294..e3d90429f1 100644
--- a/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrResolver.html
+++ b/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrResolver.html
@@ -15,7 +15,7 @@ server is used instead.
&self,
_ep: Endpoint,
node_id: NodeId,
-) -> Option<BoxStream<Result<DiscoveryItem>>>
Auto 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§
Auto 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§
§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/3175/docs/iroh/discovery/static_provider/index.html b/pr/3175/docs/iroh/discovery/static_provider/index.html
index 4d0fa74c32..2a10bb4ad0 100644
--- a/pr/3175/docs/iroh/discovery/static_provider/index.html
+++ b/pr/3175/docs/iroh/discovery/static_provider/index.html
@@ -1,4 +1,4 @@
-iroh::discovery::static_provider - Rust Expand description
A static node discovery to manually add node addressing information.
+iroh::discovery::static_provider - Rust Expand description
A static node discovery to manually add node addressing information.
Often an application might get node addressing information out-of-band in an
application-specific way. NodeTicket’s are one common way used to achieve this.
This “static” addressing information is often only usable for a limited time so needs to
diff --git a/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html b/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
index c8def70f06..87b8aa0a08 100644
--- a/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
+++ b/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
@@ -28,7 +28,7 @@ retract node addressing information that is otherwise out-of-band to iroh.
direct_addresses: Default::default(),
});
-Implementations§
Source§impl StaticProvider
Sourcepub const PROVENANCE: &'static str = "static_discovery"
The provenance string for this discovery implementation.
+Implementations§
Source§impl StaticProvider
Sourcepub const PROVENANCE: &'static str = "static_discovery"
The provenance string for this discovery implementation.
This is mostly used for debugging information and allows understanding the origin of
addressing information used by an iroh Endpoint.
Sourcepub fn set_node_addr(&self, info: impl Into<NodeAddr>) -> Option<NodeAddr>
Sets node addressing information for the given node ID.
This will completely overwrite any existing info for the node.
-Sourcepub fn add_node_addr(&self, info: impl Into<NodeAddr>)
Augments node addressing information for the given node ID.
+Sourcepub fn add_node_addr(&self, info: impl Into<NodeAddr>)
Augments node addressing information for the given node ID.
The provided addressing information is combined with the existing info in the static
provider. Any new direct addresses are added to those already present while the
relay URL is overwritten.
-Sourcepub fn get_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Returns node addressing information for the given node ID.
-Sourcepub fn remove_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Removes all node addressing information for the given node ID.
+Sourcepub fn get_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Returns node addressing information for the given node ID.
+Sourcepub fn remove_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Removes all node addressing information for the given node ID.
Any removed information is returned.
-Trait Implementations§
Source§impl Clone for StaticProvider
Source§fn clone(&self) -> StaticProvider
Returns a copy 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 StaticProvider
Source§impl Default for StaticProvider
Source§fn default() -> StaticProvider
Returns the “default value” for a type. Read moreTrait Implementations§
Source§impl Clone for StaticProvider
Source§fn clone(&self) -> StaticProvider
Returns a copy 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 StaticProvider
Source§impl Default for StaticProvider
Source§fn default() -> StaticProvider
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for StaticProvider
§impl RefUnwindSafe for StaticProvider
§impl Send for StaticProvider
§impl Sync for StaticProvider
§impl Unpin for StaticProvider
§impl UnwindSafe for StaticProvider
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for StaticProvider
§impl RefUnwindSafe for StaticProvider
§impl Send for StaticProvider
§impl Sync for StaticProvider
§impl Unpin for StaticProvider
§impl UnwindSafe for StaticProvider
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/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html b/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
index 189e1ef07e..c0eb0970fa 100644
--- a/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
+++ b/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
@@ -1,14 +1,14 @@
-ConcurrentDiscovery in iroh::discovery - Rust pub struct ConcurrentDiscovery { /* private fields */ }
Expand description
A discovery service that combines multiple discovery sources.
+ConcurrentDiscovery in iroh::discovery - Rust pub struct ConcurrentDiscovery { /* private fields */ }
Expand description
A discovery service that combines multiple discovery sources.
The discovery services will resolve concurrently.
-Implementations§
Source§impl ConcurrentDiscovery
Sourcepub fn empty() -> Self
Creates an empty ConcurrentDiscovery.
-Sourcepub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
Creates a new ConcurrentDiscovery.
-Trait Implementations§
Source§impl Debug for ConcurrentDiscovery
Source§impl Default for ConcurrentDiscovery
Source§fn default() -> ConcurrentDiscovery
Returns the “default value” for a type. Read moreSource§impl Discovery for ConcurrentDiscovery
Implementations§
Source§impl ConcurrentDiscovery
Sourcepub fn empty() -> Self
Creates an empty ConcurrentDiscovery.
+Sourcepub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
Creates a new ConcurrentDiscovery.
+Trait Implementations§
Source§impl Debug for ConcurrentDiscovery
Source§impl Default for ConcurrentDiscovery
Source§fn default() -> ConcurrentDiscovery
Returns the “default value” for a type. Read moreSource§impl Discovery for ConcurrentDiscovery
Source§impl<T> From<T> for ConcurrentDiscovery
Auto Trait Implementations§
§impl Freeze for ConcurrentDiscovery
§impl !RefUnwindSafe for ConcurrentDiscovery
§impl Send for ConcurrentDiscovery
§impl Sync for ConcurrentDiscovery
§impl Unpin for ConcurrentDiscovery
§impl !UnwindSafe for ConcurrentDiscovery
Blanket Implementations§
Source§impl<T> From<T> for ConcurrentDiscovery
Auto Trait Implementations§
§impl Freeze for ConcurrentDiscovery
§impl !RefUnwindSafe for ConcurrentDiscovery
§impl Send for ConcurrentDiscovery
§impl Sync for ConcurrentDiscovery
§impl Unpin for ConcurrentDiscovery
§impl !UnwindSafe for ConcurrentDiscovery
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/3175/docs/iroh/discovery/struct.DiscoveryItem.html b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
index 866ab92867..73a41d4c55 100644
--- a/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
+++ b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
@@ -1,25 +1,22 @@
-DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem {
- pub node_addr: NodeAddr,
- pub provenance: &'static str,
- pub last_updated: Option<u64>,
-}
Expand description
The results returned from Discovery::resolve.
-Fields§
§node_addr: NodeAddrThe NodeId whose address we have discovered
-§provenance: &'static strA static string to identify the discovery source.
-Should be uniform per discovery service.
-§last_updated: Option<u64>Optional timestamp when this node address info was last updated.
-Must be microseconds since the unix epoch.
-Implementations§
Source§impl DiscoveryItem
Sourcepub fn from_node_info(
+DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem { /* private fields */ }
Expand description
The results returned from Discovery::resolve.
+This struct derefs to NodeData, so you can access the methods from NodeData
+directly from DiscoveryItem.
+Implementations§
Source§impl DiscoveryItem
Sourcepub fn new(
node_info: NodeInfo,
provenance: &'static str,
last_updated: Option<u64>,
) -> Self
Creates a new DiscoveryItem from a NodeInfo.
-Sourcepub fn from_node_data(
- node_id: NodeId,
- node_data: NodeData,
- provenance: &'static str,
- last_updated: Option<u64>,
-) -> Self
Creates a new DiscoveryItem from a NodeData.
-Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
Sourcepub fn provenance(&self) -> &'static str
Returns the provenance of this discovery item.
+The provenance is a static string to identify the discovery source.
+Sourcepub fn last_updated(&self) -> Option<u64>
Returns the optional timestamp when this node address info was last updated.
+The value is microseconds since the unix epoch.
+Sourcepub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
Auto Trait Implementations§
§impl Freeze for DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/struct.NodeData.html b/pr/3175/docs/iroh/discovery/struct.NodeData.html
index 01c888cca4..d7c9b619a5 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeData.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::discovery - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::discovery - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/discovery/struct.NodeInfo.html b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
index 2d1da3a3dd..d292cc0c17 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::discovery - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index de2c9fe2d9..74217d59e5 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_PROD
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Expand description
The n0 testing DNS node origin, for production.
+N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
index c46196d446..17c7ab9195 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_STAGING
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Expand description
The n0 testing DNS node origin, for testing.
+N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
index 266f2d0299..dc7484136f 100644
--- a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
+++ b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
@@ -1,2 +1,2 @@
-IROH_TXT_NAME in iroh::dns::node_info - Rust Constant IROH_TXT_NAME
pub const IROH_TXT_NAME: &'static str;
Expand description
The DNS name for the iroh TXT record.
+IROH_TXT_NAME in iroh::dns::node_info - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/index.html b/pr/3175/docs/iroh/dns/node_info/index.html
index 7ae1e03f0a..f465f0340e 100644
--- a/pr/3175/docs/iroh/dns/node_info/index.html
+++ b/pr/3175/docs/iroh/dns/node_info/index.html
@@ -1,4 +1,4 @@
-iroh::dns::node_info - Rust Module node_info
Expand description
Support for handling DNS resource records for dialing by NodeId.
+iroh::dns::node_info - Rust Expand description
Support for handling DNS resource records for dialing by NodeId.
Dialing by NodeId is supported by iroh nodes 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:
@@ -30,5 +30,5 @@ in RFC1464. The following
Each address is an IPv4 or IPv6 address with a port.
-Structs§
- The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAME TXT resource record.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId to encode to and decode from [z32],
+Structs§
- Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId 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/3175/docs/iroh/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
index 77c6ab52bc..3f6b77ddc8 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::dns::node_info - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
index a37c2a3997..33bbc94334 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::dns::node_info - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/struct.DnsResolver.html b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
index 53db4bb73a..cd065a4b18 100644
--- a/pr/3175/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
@@ -1,26 +1,26 @@
-DnsResolver in iroh::dns - Rust Struct DnsResolver
pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
-Implementations§
§impl DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+DnsResolver in iroh::dns - Rust pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,37 +65,37 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_node_by_id(
+
Sourcepub async fn lookup_node_by_id(
&self,
node_id: &PublicKey,
origin: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
-pub async fn lookup_node_by_domain_name(
+
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+) -> Result<NodeInfo, Error>
Looks up node info by DNS name.
+Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeInfo, Error>Looks up node info by DNS name in a staggered fashion.
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
summary of all errors otherwise.
-pub async fn lookup_node_by_id_staggered(
+
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId 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
summary of all errors otherwise.
-Trait Implementations§
§impl Clone for DnsResolver
§fn clone(&self) -> DnsResolver
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for DnsResolver
§impl Default for DnsResolver
§fn default() -> DnsResolver
Returns the “default value” for a type. Read more§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
Returns a copy 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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Source§fn from(
resolver: Resolver<GenericConnector<TokioRuntimeProvider>>,
) -> DnsResolver
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for DnsResolver
§impl !RefUnwindSafe for DnsResolver
§impl Send for DnsResolver
§impl Sync for DnsResolver
§impl Unpin for DnsResolver
§impl !UnwindSafe for DnsResolver
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
index c45ae3b1d6..b35eebd63f 100644
--- a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a copy 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 copy 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
discovery-pkarr-dht only.Expand description
Pkarr based node discovery for iroh, supporting both relay servers and the DHT.
+discovery-pkarr-dht only.Expand description
Pkarr based node discovery for iroh, supporting both relay servers and the DHT.
This module contains pkarr-based node discovery 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/3175/docs/iroh/discovery/pkarr/dht/struct.Builder.html b/pr/3175/docs/iroh/discovery/pkarr/dht/struct.Builder.html index 0cda41cc14..55a967083a 100644 --- a/pr/3175/docs/iroh/discovery/pkarr/dht/struct.Builder.html +++ b/pr/3175/docs/iroh/discovery/pkarr/dht/struct.Builder.html @@ -1,17 +1,17 @@ -pub struct Builder { /* private fields */ }discovery-pkarr-dht only.Expand description
Builder for DhtDiscovery.
pub struct Builder { /* private fields */ }discovery-pkarr-dht only.Expand description
Builder for DhtDiscovery.
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 node 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 include_direct_addresses(self, include_direct_addresses: bool) -> Self
pub fn include_direct_addresses(self, include_direct_addresses: bool) -> Self
Sets whether to include the direct addresses in the DNS packet.
-Sourcepub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self
pub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self
Sets the initial delay before the first publish.
-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 build(self) -> Result<DhtDiscovery>
pub fn build(self) -> Result<DhtDiscovery>
Builds the discovery mechanism.
-Trait Implementations§
Auto 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§
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 include_direct_addresses(self, include_direct_addresses: bool) -> Self
pub fn include_direct_addresses(self, include_direct_addresses: bool) -> Self
Sets whether to include the direct addresses in the DNS packet.
+Sourcepub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self
pub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self
Sets the initial delay before the first publish.
+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 build(self) -> Result<DhtDiscovery>
pub fn build(self) -> Result<DhtDiscovery>
Builds the discovery mechanism.
+Trait Implementations§
Auto 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/3175/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html b/pr/3175/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
index c14f02186d..e1977df0df 100644
--- a/pr/3175/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
+++ b/pr/3175/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html
@@ -4,12 +4,12 @@ them to the BitTorrent Mainline DHT. See the Discovery trait to be used as a node discovery service which can
be used as both a publisher and resolver. Calling DhtDiscovery::publish will start
a background task that periodically publishes the node address.
-
Implementations§
Source§impl DhtDiscovery
impl DhtDiscovery
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder for DhtDiscovery.
Trait Implementations§
Source§impl Clone for DhtDiscovery
impl Clone for DhtDiscovery
Source§fn clone(&self) -> DhtDiscovery
fn clone(&self) -> DhtDiscovery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DhtDiscovery
impl Debug for DhtDiscovery
Source§impl Default for DhtDiscovery
impl Default for DhtDiscovery
Source§impl Discovery for DhtDiscovery
impl Discovery for DhtDiscovery
Implementations§
Source§impl DhtDiscovery
impl DhtDiscovery
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder for DhtDiscovery.
Trait Implementations§
Source§impl Clone for DhtDiscovery
impl Clone for DhtDiscovery
Source§fn clone(&self) -> DhtDiscovery
fn clone(&self) -> DhtDiscovery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DhtDiscovery
impl Debug for DhtDiscovery
Source§impl Default for DhtDiscovery
impl Default for DhtDiscovery
Auto Trait Implementations§
impl Freeze for DhtDiscovery
impl !RefUnwindSafe for DhtDiscovery
impl Send for DhtDiscovery
impl Sync for DhtDiscovery
impl Unpin for DhtDiscovery
impl !UnwindSafe for DhtDiscovery
Blanket Implementations§
Auto Trait Implementations§
impl Freeze for DhtDiscovery
impl !RefUnwindSafe for DhtDiscovery
impl Send for DhtDiscovery
impl Sync for DhtDiscovery
impl Unpin for DhtDiscovery
impl !UnwindSafe for DhtDiscovery
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/3175/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html b/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html index 5adc8da561..e17f4365ff 100644 --- a/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html +++ b/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html @@ -26,11 +26,11 @@ information is unchanged. server is used instead.
Sourcepub fn update_addr_info(&self, data: &NodeData)
pub fn update_addr_info(&self, data: &NodeData)
Publishes the addressing information about this node to a pkarr relay.
This is a nonblocking function, the actual update is performed in the background.
-Trait Implementations§
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 moreSource§impl Debug for PkarrPublisher
impl Debug for PkarrPublisher
Trait Implementations§
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 moreSource§impl Debug for PkarrPublisher
impl Debug for PkarrPublisher
Auto 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§
Auto 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§
§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/3175/docs/iroh/discovery/pkarr/struct.PkarrResolver.html b/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrResolver.html index 41f030f294..e3d90429f1 100644 --- a/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrResolver.html +++ b/pr/3175/docs/iroh/discovery/pkarr/struct.PkarrResolver.html @@ -15,7 +15,7 @@ server is used instead. &self, _ep: Endpoint, node_id: NodeId, -) -> Option<BoxStream<Result<DiscoveryItem>>>
Auto 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§
Auto 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§
§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/3175/docs/iroh/discovery/static_provider/index.html b/pr/3175/docs/iroh/discovery/static_provider/index.html
index 4d0fa74c32..2a10bb4ad0 100644
--- a/pr/3175/docs/iroh/discovery/static_provider/index.html
+++ b/pr/3175/docs/iroh/discovery/static_provider/index.html
@@ -1,4 +1,4 @@
-iroh::discovery::static_provider - Rust Expand description
A static node discovery to manually add node addressing information.
+iroh::discovery::static_provider - Rust Expand description
A static node discovery to manually add node addressing information.
Often an application might get node addressing information out-of-band in an
application-specific way. NodeTicket’s are one common way used to achieve this.
This “static” addressing information is often only usable for a limited time so needs to
diff --git a/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html b/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
index c8def70f06..87b8aa0a08 100644
--- a/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
+++ b/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
@@ -28,7 +28,7 @@ retract node addressing information that is otherwise out-of-band to iroh.
direct_addresses: Default::default(),
});
-Implementations§
Source§impl StaticProvider
Sourcepub const PROVENANCE: &'static str = "static_discovery"
The provenance string for this discovery implementation.
+Implementations§
Source§impl StaticProvider
Sourcepub const PROVENANCE: &'static str = "static_discovery"
The provenance string for this discovery implementation.
This is mostly used for debugging information and allows understanding the origin of
addressing information used by an iroh Endpoint.
Sourcepub fn set_node_addr(&self, info: impl Into<NodeAddr>) -> Option<NodeAddr>
Sets node addressing information for the given node ID.
This will completely overwrite any existing info for the node.
-Sourcepub fn add_node_addr(&self, info: impl Into<NodeAddr>)
Augments node addressing information for the given node ID.
+Sourcepub fn add_node_addr(&self, info: impl Into<NodeAddr>)
Augments node addressing information for the given node ID.
The provided addressing information is combined with the existing info in the static
provider. Any new direct addresses are added to those already present while the
relay URL is overwritten.
-Sourcepub fn get_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Returns node addressing information for the given node ID.
-Sourcepub fn remove_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Removes all node addressing information for the given node ID.
+Sourcepub fn get_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Returns node addressing information for the given node ID.
+Sourcepub fn remove_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Removes all node addressing information for the given node ID.
Any removed information is returned.
-Trait Implementations§
Source§impl Clone for StaticProvider
Source§fn clone(&self) -> StaticProvider
Returns a copy 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 StaticProvider
Source§impl Default for StaticProvider
Source§fn default() -> StaticProvider
Returns the “default value” for a type. Read moreTrait Implementations§
Source§impl Clone for StaticProvider
Source§fn clone(&self) -> StaticProvider
Returns a copy 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 StaticProvider
Source§impl Default for StaticProvider
Source§fn default() -> StaticProvider
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for StaticProvider
§impl RefUnwindSafe for StaticProvider
§impl Send for StaticProvider
§impl Sync for StaticProvider
§impl Unpin for StaticProvider
§impl UnwindSafe for StaticProvider
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for StaticProvider
§impl RefUnwindSafe for StaticProvider
§impl Send for StaticProvider
§impl Sync for StaticProvider
§impl Unpin for StaticProvider
§impl UnwindSafe for StaticProvider
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/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html b/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
index 189e1ef07e..c0eb0970fa 100644
--- a/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
+++ b/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
@@ -1,14 +1,14 @@
-ConcurrentDiscovery in iroh::discovery - Rust pub struct ConcurrentDiscovery { /* private fields */ }
Expand description
A discovery service that combines multiple discovery sources.
+ConcurrentDiscovery in iroh::discovery - Rust pub struct ConcurrentDiscovery { /* private fields */ }
Expand description
A discovery service that combines multiple discovery sources.
The discovery services will resolve concurrently.
-Implementations§
Source§impl ConcurrentDiscovery
Sourcepub fn empty() -> Self
Creates an empty ConcurrentDiscovery.
-Sourcepub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
Creates a new ConcurrentDiscovery.
-Trait Implementations§
Source§impl Debug for ConcurrentDiscovery
Source§impl Default for ConcurrentDiscovery
Source§fn default() -> ConcurrentDiscovery
Returns the “default value” for a type. Read moreSource§impl Discovery for ConcurrentDiscovery
Implementations§
Source§impl ConcurrentDiscovery
Sourcepub fn empty() -> Self
Creates an empty ConcurrentDiscovery.
+Sourcepub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
Creates a new ConcurrentDiscovery.
+Trait Implementations§
Source§impl Debug for ConcurrentDiscovery
Source§impl Default for ConcurrentDiscovery
Source§fn default() -> ConcurrentDiscovery
Returns the “default value” for a type. Read moreSource§impl Discovery for ConcurrentDiscovery
Source§impl<T> From<T> for ConcurrentDiscovery
Auto Trait Implementations§
§impl Freeze for ConcurrentDiscovery
§impl !RefUnwindSafe for ConcurrentDiscovery
§impl Send for ConcurrentDiscovery
§impl Sync for ConcurrentDiscovery
§impl Unpin for ConcurrentDiscovery
§impl !UnwindSafe for ConcurrentDiscovery
Blanket Implementations§
Source§impl<T> From<T> for ConcurrentDiscovery
Auto Trait Implementations§
§impl Freeze for ConcurrentDiscovery
§impl !RefUnwindSafe for ConcurrentDiscovery
§impl Send for ConcurrentDiscovery
§impl Sync for ConcurrentDiscovery
§impl Unpin for ConcurrentDiscovery
§impl !UnwindSafe for ConcurrentDiscovery
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/3175/docs/iroh/discovery/struct.DiscoveryItem.html b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
index 866ab92867..73a41d4c55 100644
--- a/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
+++ b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
@@ -1,25 +1,22 @@
-DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem {
- pub node_addr: NodeAddr,
- pub provenance: &'static str,
- pub last_updated: Option<u64>,
-}
Expand description
The results returned from Discovery::resolve.
-Fields§
§node_addr: NodeAddrThe NodeId whose address we have discovered
-§provenance: &'static strA static string to identify the discovery source.
-Should be uniform per discovery service.
-§last_updated: Option<u64>Optional timestamp when this node address info was last updated.
-Must be microseconds since the unix epoch.
-Implementations§
Source§impl DiscoveryItem
Sourcepub fn from_node_info(
+DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem { /* private fields */ }
Expand description
The results returned from Discovery::resolve.
+This struct derefs to NodeData, so you can access the methods from NodeData
+directly from DiscoveryItem.
+Implementations§
Source§impl DiscoveryItem
Sourcepub fn new(
node_info: NodeInfo,
provenance: &'static str,
last_updated: Option<u64>,
) -> Self
Creates a new DiscoveryItem from a NodeInfo.
-Sourcepub fn from_node_data(
- node_id: NodeId,
- node_data: NodeData,
- provenance: &'static str,
- last_updated: Option<u64>,
-) -> Self
Creates a new DiscoveryItem from a NodeData.
-Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
Sourcepub fn provenance(&self) -> &'static str
Returns the provenance of this discovery item.
+The provenance is a static string to identify the discovery source.
+Sourcepub fn last_updated(&self) -> Option<u64>
Returns the optional timestamp when this node address info was last updated.
+The value is microseconds since the unix epoch.
+Sourcepub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
Auto Trait Implementations§
§impl Freeze for DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/struct.NodeData.html b/pr/3175/docs/iroh/discovery/struct.NodeData.html
index 01c888cca4..d7c9b619a5 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeData.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::discovery - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::discovery - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/discovery/struct.NodeInfo.html b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
index 2d1da3a3dd..d292cc0c17 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::discovery - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index de2c9fe2d9..74217d59e5 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_PROD
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Expand description
The n0 testing DNS node origin, for production.
+N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
index c46196d446..17c7ab9195 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_STAGING
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Expand description
The n0 testing DNS node origin, for testing.
+N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
index 266f2d0299..dc7484136f 100644
--- a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
+++ b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
@@ -1,2 +1,2 @@
-IROH_TXT_NAME in iroh::dns::node_info - Rust Constant IROH_TXT_NAME
pub const IROH_TXT_NAME: &'static str;
Expand description
The DNS name for the iroh TXT record.
+IROH_TXT_NAME in iroh::dns::node_info - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/index.html b/pr/3175/docs/iroh/dns/node_info/index.html
index 7ae1e03f0a..f465f0340e 100644
--- a/pr/3175/docs/iroh/dns/node_info/index.html
+++ b/pr/3175/docs/iroh/dns/node_info/index.html
@@ -1,4 +1,4 @@
-iroh::dns::node_info - Rust Module node_info
Expand description
Support for handling DNS resource records for dialing by NodeId.
+iroh::dns::node_info - Rust Expand description
Support for handling DNS resource records for dialing by NodeId.
Dialing by NodeId is supported by iroh nodes 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:
@@ -30,5 +30,5 @@ in RFC1464. The following
Each address is an IPv4 or IPv6 address with a port.
-Structs§
- The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAME TXT resource record.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId to encode to and decode from [z32],
+Structs§
- Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId 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/3175/docs/iroh/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
index 77c6ab52bc..3f6b77ddc8 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::dns::node_info - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
index a37c2a3997..33bbc94334 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::dns::node_info - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/struct.DnsResolver.html b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
index 53db4bb73a..cd065a4b18 100644
--- a/pr/3175/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
@@ -1,26 +1,26 @@
-DnsResolver in iroh::dns - Rust Struct DnsResolver
pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
-Implementations§
§impl DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+DnsResolver in iroh::dns - Rust pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,37 +65,37 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_node_by_id(
+
Sourcepub async fn lookup_node_by_id(
&self,
node_id: &PublicKey,
origin: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
-pub async fn lookup_node_by_domain_name(
+
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+) -> Result<NodeInfo, Error>
Looks up node info by DNS name.
+Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeInfo, Error>Looks up node info by DNS name in a staggered fashion.
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
summary of all errors otherwise.
-pub async fn lookup_node_by_id_staggered(
+
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId 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
summary of all errors otherwise.
-Trait Implementations§
§impl Clone for DnsResolver
§fn clone(&self) -> DnsResolver
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for DnsResolver
§impl Default for DnsResolver
§fn default() -> DnsResolver
Returns the “default value” for a type. Read more§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
Returns a copy 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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Source§fn from(
resolver: Resolver<GenericConnector<TokioRuntimeProvider>>,
) -> DnsResolver
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for DnsResolver
§impl !RefUnwindSafe for DnsResolver
§impl Send for DnsResolver
§impl Sync for DnsResolver
§impl Unpin for DnsResolver
§impl !UnwindSafe for DnsResolver
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
index c45ae3b1d6..b35eebd63f 100644
--- a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a copy 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 copy 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
Expand description
A static node discovery to manually add node addressing information.
+Expand description
A static node discovery to manually add node addressing information.
Often an application might get node addressing information out-of-band in an
application-specific way. NodeTicket’s are one common way used to achieve this.
This “static” addressing information is often only usable for a limited time so needs to
diff --git a/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html b/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
index c8def70f06..87b8aa0a08 100644
--- a/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
+++ b/pr/3175/docs/iroh/discovery/static_provider/struct.StaticProvider.html
@@ -28,7 +28,7 @@ retract node addressing information that is otherwise out-of-band to iroh.
Implementations§
Source§impl StaticProvider
impl StaticProvider
Sourcepub const PROVENANCE: &'static str = "static_discovery"
pub const PROVENANCE: &'static str = "static_discovery"
The provenance string for this discovery implementation.
+Implementations§
Source§impl StaticProvider
impl StaticProvider
Sourcepub const PROVENANCE: &'static str = "static_discovery"
pub const PROVENANCE: &'static str = "static_discovery"
The provenance string for this discovery implementation.
This is mostly used for debugging information and allows understanding the origin of
addressing information used by an iroh Endpoint.
Sourcepub fn set_node_addr(&self, info: impl Into<NodeAddr>) -> Option<NodeAddr>
pub fn set_node_addr(&self, info: impl Into<NodeAddr>) -> Option<NodeAddr>
Sets node addressing information for the given node ID.
This will completely overwrite any existing info for the node.
-Sourcepub fn add_node_addr(&self, info: impl Into<NodeAddr>)
pub fn add_node_addr(&self, info: impl Into<NodeAddr>)
Augments node addressing information for the given node ID.
+Sourcepub fn add_node_addr(&self, info: impl Into<NodeAddr>)
pub fn add_node_addr(&self, info: impl Into<NodeAddr>)
Augments node addressing information for the given node ID.
The provided addressing information is combined with the existing info in the static provider. Any new direct addresses are added to those already present while the relay URL is overwritten.
-Sourcepub fn get_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
pub fn get_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Returns node addressing information for the given node ID.
-Sourcepub fn remove_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
pub fn remove_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Removes all node addressing information for the given node ID.
+Sourcepub fn get_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
pub fn get_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Returns node addressing information for the given node ID.
+Sourcepub fn remove_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
pub fn remove_node_addr(&self, node_id: NodeId) -> Option<NodeAddr>
Removes all node addressing information for the given node ID.
Any removed information is returned.
-Trait Implementations§
Source§impl Clone for StaticProvider
impl Clone for StaticProvider
Source§fn clone(&self) -> StaticProvider
fn clone(&self) -> StaticProvider
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StaticProvider
impl Debug for StaticProvider
Source§impl Default for StaticProvider
impl Default for StaticProvider
Source§fn default() -> StaticProvider
fn default() -> StaticProvider
Trait Implementations§
Source§impl Clone for StaticProvider
impl Clone for StaticProvider
Source§fn clone(&self) -> StaticProvider
fn clone(&self) -> StaticProvider
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StaticProvider
impl Debug for StaticProvider
Source§impl Default for StaticProvider
impl Default for StaticProvider
Source§fn default() -> StaticProvider
fn default() -> StaticProvider
Auto Trait Implementations§
impl Freeze for StaticProvider
impl RefUnwindSafe for StaticProvider
impl Send for StaticProvider
impl Sync for StaticProvider
impl Unpin for StaticProvider
impl UnwindSafe for StaticProvider
Blanket Implementations§
Auto Trait Implementations§
impl Freeze for StaticProvider
impl RefUnwindSafe for StaticProvider
impl Send for StaticProvider
impl Sync for StaticProvider
impl Unpin for StaticProvider
impl UnwindSafe for StaticProvider
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/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html b/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
index 189e1ef07e..c0eb0970fa 100644
--- a/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
+++ b/pr/3175/docs/iroh/discovery/struct.ConcurrentDiscovery.html
@@ -1,14 +1,14 @@
-ConcurrentDiscovery in iroh::discovery - Rust pub struct ConcurrentDiscovery { /* private fields */ }
Expand description
A discovery service that combines multiple discovery sources.
+ConcurrentDiscovery in iroh::discovery - Rust pub struct ConcurrentDiscovery { /* private fields */ }
Expand description
A discovery service that combines multiple discovery sources.
The discovery services will resolve concurrently.
-Implementations§
Source§impl ConcurrentDiscovery
Sourcepub fn empty() -> Self
Creates an empty ConcurrentDiscovery.
-Sourcepub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
Creates a new ConcurrentDiscovery.
-Trait Implementations§
Source§impl Debug for ConcurrentDiscovery
Source§impl Default for ConcurrentDiscovery
Source§fn default() -> ConcurrentDiscovery
Returns the “default value” for a type. Read moreSource§impl Discovery for ConcurrentDiscovery
Implementations§
Source§impl ConcurrentDiscovery
Sourcepub fn empty() -> Self
Creates an empty ConcurrentDiscovery.
+Sourcepub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
Creates a new ConcurrentDiscovery.
+Trait Implementations§
Source§impl Debug for ConcurrentDiscovery
Source§impl Default for ConcurrentDiscovery
Source§fn default() -> ConcurrentDiscovery
Returns the “default value” for a type. Read moreSource§impl Discovery for ConcurrentDiscovery
Source§impl<T> From<T> for ConcurrentDiscovery
Auto Trait Implementations§
§impl Freeze for ConcurrentDiscovery
§impl !RefUnwindSafe for ConcurrentDiscovery
§impl Send for ConcurrentDiscovery
§impl Sync for ConcurrentDiscovery
§impl Unpin for ConcurrentDiscovery
§impl !UnwindSafe for ConcurrentDiscovery
Blanket Implementations§
Source§impl<T> From<T> for ConcurrentDiscovery
Auto Trait Implementations§
§impl Freeze for ConcurrentDiscovery
§impl !RefUnwindSafe for ConcurrentDiscovery
§impl Send for ConcurrentDiscovery
§impl Sync for ConcurrentDiscovery
§impl Unpin for ConcurrentDiscovery
§impl !UnwindSafe for ConcurrentDiscovery
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/3175/docs/iroh/discovery/struct.DiscoveryItem.html b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
index 866ab92867..73a41d4c55 100644
--- a/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
+++ b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
@@ -1,25 +1,22 @@
-DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem {
- pub node_addr: NodeAddr,
- pub provenance: &'static str,
- pub last_updated: Option<u64>,
-}
Expand description
The results returned from Discovery::resolve.
-Fields§
§node_addr: NodeAddrThe NodeId whose address we have discovered
-§provenance: &'static strA static string to identify the discovery source.
-Should be uniform per discovery service.
-§last_updated: Option<u64>Optional timestamp when this node address info was last updated.
-Must be microseconds since the unix epoch.
-Implementations§
Source§impl DiscoveryItem
Sourcepub fn from_node_info(
+DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem { /* private fields */ }
Expand description
The results returned from Discovery::resolve.
+This struct derefs to NodeData, so you can access the methods from NodeData
+directly from DiscoveryItem.
+Implementations§
Source§impl DiscoveryItem
Sourcepub fn new(
node_info: NodeInfo,
provenance: &'static str,
last_updated: Option<u64>,
) -> Self
Creates a new DiscoveryItem from a NodeInfo.
-Sourcepub fn from_node_data(
- node_id: NodeId,
- node_data: NodeData,
- provenance: &'static str,
- last_updated: Option<u64>,
-) -> Self
Creates a new DiscoveryItem from a NodeData.
-Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
Sourcepub fn provenance(&self) -> &'static str
Returns the provenance of this discovery item.
+The provenance is a static string to identify the discovery source.
+Sourcepub fn last_updated(&self) -> Option<u64>
Returns the optional timestamp when this node address info was last updated.
+The value is microseconds since the unix epoch.
+Sourcepub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
Auto Trait Implementations§
§impl Freeze for DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/struct.NodeData.html b/pr/3175/docs/iroh/discovery/struct.NodeData.html
index 01c888cca4..d7c9b619a5 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeData.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::discovery - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::discovery - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/discovery/struct.NodeInfo.html b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
index 2d1da3a3dd..d292cc0c17 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::discovery - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index de2c9fe2d9..74217d59e5 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_PROD
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Expand description
The n0 testing DNS node origin, for production.
+N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
index c46196d446..17c7ab9195 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_STAGING
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Expand description
The n0 testing DNS node origin, for testing.
+N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
index 266f2d0299..dc7484136f 100644
--- a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
+++ b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
@@ -1,2 +1,2 @@
-IROH_TXT_NAME in iroh::dns::node_info - Rust Constant IROH_TXT_NAME
pub const IROH_TXT_NAME: &'static str;
Expand description
The DNS name for the iroh TXT record.
+IROH_TXT_NAME in iroh::dns::node_info - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/index.html b/pr/3175/docs/iroh/dns/node_info/index.html
index 7ae1e03f0a..f465f0340e 100644
--- a/pr/3175/docs/iroh/dns/node_info/index.html
+++ b/pr/3175/docs/iroh/dns/node_info/index.html
@@ -1,4 +1,4 @@
-iroh::dns::node_info - Rust Module node_info
Expand description
Support for handling DNS resource records for dialing by NodeId.
+iroh::dns::node_info - Rust Expand description
Support for handling DNS resource records for dialing by NodeId.
Dialing by NodeId is supported by iroh nodes 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:
@@ -30,5 +30,5 @@ in RFC1464. The following
Each address is an IPv4 or IPv6 address with a port.
-Structs§
- The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAME TXT resource record.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId to encode to and decode from [z32],
+Structs§
- Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId 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/3175/docs/iroh/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
index 77c6ab52bc..3f6b77ddc8 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::dns::node_info - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
index a37c2a3997..33bbc94334 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::dns::node_info - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/struct.DnsResolver.html b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
index 53db4bb73a..cd065a4b18 100644
--- a/pr/3175/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
@@ -1,26 +1,26 @@
-DnsResolver in iroh::dns - Rust Struct DnsResolver
pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
-Implementations§
§impl DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+DnsResolver in iroh::dns - Rust pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,37 +65,37 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_node_by_id(
+
Sourcepub async fn lookup_node_by_id(
&self,
node_id: &PublicKey,
origin: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
-pub async fn lookup_node_by_domain_name(
+
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+) -> Result<NodeInfo, Error>
Looks up node info by DNS name.
+Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeInfo, Error>Looks up node info by DNS name in a staggered fashion.
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
summary of all errors otherwise.
-pub async fn lookup_node_by_id_staggered(
+
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId 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
summary of all errors otherwise.
-Trait Implementations§
§impl Clone for DnsResolver
§fn clone(&self) -> DnsResolver
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for DnsResolver
§impl Default for DnsResolver
§fn default() -> DnsResolver
Returns the “default value” for a type. Read more§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
Returns a copy 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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Source§fn from(
resolver: Resolver<GenericConnector<TokioRuntimeProvider>>,
) -> DnsResolver
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for DnsResolver
§impl !RefUnwindSafe for DnsResolver
§impl Send for DnsResolver
§impl Sync for DnsResolver
§impl Unpin for DnsResolver
§impl !UnwindSafe for DnsResolver
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
index c45ae3b1d6..b35eebd63f 100644
--- a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a copy 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 copy 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
pub struct ConcurrentDiscovery { /* private fields */ }Expand description
A discovery service that combines multiple discovery sources.
+pub struct ConcurrentDiscovery { /* private fields */ }Expand description
A discovery service that combines multiple discovery sources.
The discovery services will resolve concurrently.
-Implementations§
Source§impl ConcurrentDiscovery
impl ConcurrentDiscovery
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates an empty ConcurrentDiscovery.
Sourcepub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
pub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
Creates a new ConcurrentDiscovery.
Trait Implementations§
Source§impl Debug for ConcurrentDiscovery
impl Debug for ConcurrentDiscovery
Source§impl Default for ConcurrentDiscovery
impl Default for ConcurrentDiscovery
Source§fn default() -> ConcurrentDiscovery
fn default() -> ConcurrentDiscovery
Source§impl Discovery for ConcurrentDiscovery
impl Discovery for ConcurrentDiscovery
Implementations§
Source§impl ConcurrentDiscovery
impl ConcurrentDiscovery
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates an empty ConcurrentDiscovery.
Sourcepub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
pub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self
Creates a new ConcurrentDiscovery.
Trait Implementations§
Source§impl Debug for ConcurrentDiscovery
impl Debug for ConcurrentDiscovery
Source§impl Default for ConcurrentDiscovery
impl Default for ConcurrentDiscovery
Source§fn default() -> ConcurrentDiscovery
fn default() -> ConcurrentDiscovery
Source§impl Discovery for ConcurrentDiscovery
impl Discovery for ConcurrentDiscovery
Source§impl<T> From<T> for ConcurrentDiscovery
impl<T> From<T> for ConcurrentDiscovery
Auto Trait Implementations§
impl Freeze for ConcurrentDiscovery
impl !RefUnwindSafe for ConcurrentDiscovery
impl Send for ConcurrentDiscovery
impl Sync for ConcurrentDiscovery
impl Unpin for ConcurrentDiscovery
impl !UnwindSafe for ConcurrentDiscovery
Blanket Implementations§
Source§impl<T> From<T> for ConcurrentDiscovery
impl<T> From<T> for ConcurrentDiscovery
Auto Trait Implementations§
impl Freeze for ConcurrentDiscovery
impl !RefUnwindSafe for ConcurrentDiscovery
impl Send for ConcurrentDiscovery
impl Sync for ConcurrentDiscovery
impl Unpin for ConcurrentDiscovery
impl !UnwindSafe for ConcurrentDiscovery
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/3175/docs/iroh/discovery/struct.DiscoveryItem.html b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
index 866ab92867..73a41d4c55 100644
--- a/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
+++ b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
@@ -1,25 +1,22 @@
-DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem {
- pub node_addr: NodeAddr,
- pub provenance: &'static str,
- pub last_updated: Option<u64>,
-}
Expand description
The results returned from Discovery::resolve.
-Fields§
§node_addr: NodeAddrThe NodeId whose address we have discovered
-§provenance: &'static strA static string to identify the discovery source.
-Should be uniform per discovery service.
-§last_updated: Option<u64>Optional timestamp when this node address info was last updated.
-Must be microseconds since the unix epoch.
-Implementations§
Source§impl DiscoveryItem
Sourcepub fn from_node_info(
+DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem { /* private fields */ }
Expand description
The results returned from Discovery::resolve.
+This struct derefs to NodeData, so you can access the methods from NodeData
+directly from DiscoveryItem.
+Implementations§
Source§impl DiscoveryItem
Sourcepub fn new(
node_info: NodeInfo,
provenance: &'static str,
last_updated: Option<u64>,
) -> Self
Creates a new DiscoveryItem from a NodeInfo.
-Sourcepub fn from_node_data(
- node_id: NodeId,
- node_data: NodeData,
- provenance: &'static str,
- last_updated: Option<u64>,
-) -> Self
Creates a new DiscoveryItem from a NodeData.
-Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
Sourcepub fn provenance(&self) -> &'static str
Returns the provenance of this discovery item.
+The provenance is a static string to identify the discovery source.
+Sourcepub fn last_updated(&self) -> Option<u64>
Returns the optional timestamp when this node address info was last updated.
+The value is microseconds since the unix epoch.
+Sourcepub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
Auto Trait Implementations§
§impl Freeze for DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/struct.NodeData.html b/pr/3175/docs/iroh/discovery/struct.NodeData.html
index 01c888cca4..d7c9b619a5 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeData.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::discovery - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::discovery - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/discovery/struct.NodeInfo.html b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
index 2d1da3a3dd..d292cc0c17 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::discovery - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index de2c9fe2d9..74217d59e5 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_PROD
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Expand description
The n0 testing DNS node origin, for production.
+N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
index c46196d446..17c7ab9195 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_STAGING
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Expand description
The n0 testing DNS node origin, for testing.
+N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
index 266f2d0299..dc7484136f 100644
--- a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
+++ b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
@@ -1,2 +1,2 @@
-IROH_TXT_NAME in iroh::dns::node_info - Rust Constant IROH_TXT_NAME
pub const IROH_TXT_NAME: &'static str;
Expand description
The DNS name for the iroh TXT record.
+IROH_TXT_NAME in iroh::dns::node_info - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/index.html b/pr/3175/docs/iroh/dns/node_info/index.html
index 7ae1e03f0a..f465f0340e 100644
--- a/pr/3175/docs/iroh/dns/node_info/index.html
+++ b/pr/3175/docs/iroh/dns/node_info/index.html
@@ -1,4 +1,4 @@
-iroh::dns::node_info - Rust Module node_info
Expand description
Support for handling DNS resource records for dialing by NodeId.
+iroh::dns::node_info - Rust Expand description
Support for handling DNS resource records for dialing by NodeId.
Dialing by NodeId is supported by iroh nodes 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:
@@ -30,5 +30,5 @@ in RFC1464. The following
Each address is an IPv4 or IPv6 address with a port.
-Structs§
- The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAME TXT resource record.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId to encode to and decode from [z32],
+Structs§
- Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId 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/3175/docs/iroh/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
index 77c6ab52bc..3f6b77ddc8 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::dns::node_info - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
index a37c2a3997..33bbc94334 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::dns::node_info - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/struct.DnsResolver.html b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
index 53db4bb73a..cd065a4b18 100644
--- a/pr/3175/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
@@ -1,26 +1,26 @@
-DnsResolver in iroh::dns - Rust Struct DnsResolver
pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
-Implementations§
§impl DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+DnsResolver in iroh::dns - Rust pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,37 +65,37 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_node_by_id(
+
Sourcepub async fn lookup_node_by_id(
&self,
node_id: &PublicKey,
origin: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
-pub async fn lookup_node_by_domain_name(
+
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+) -> Result<NodeInfo, Error>
Looks up node info by DNS name.
+Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeInfo, Error>Looks up node info by DNS name in a staggered fashion.
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
summary of all errors otherwise.
-pub async fn lookup_node_by_id_staggered(
+
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId 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
summary of all errors otherwise.
-Trait Implementations§
§impl Clone for DnsResolver
§fn clone(&self) -> DnsResolver
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for DnsResolver
§impl Default for DnsResolver
§fn default() -> DnsResolver
Returns the “default value” for a type. Read more§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
Returns a copy 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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Source§fn from(
resolver: Resolver<GenericConnector<TokioRuntimeProvider>>,
) -> DnsResolver
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for DnsResolver
§impl !RefUnwindSafe for DnsResolver
§impl Send for DnsResolver
§impl Sync for DnsResolver
§impl Unpin for DnsResolver
§impl !UnwindSafe for DnsResolver
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
index c45ae3b1d6..b35eebd63f 100644
--- a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a copy 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 copy 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
pub struct DiscoveryItem {
- pub node_addr: NodeAddr,
- pub provenance: &'static str,
- pub last_updated: Option<u64>,
-}Expand description
The results returned from Discovery::resolve.
Fields§
§node_addr: NodeAddrThe NodeId whose address we have discovered
provenance: &'static strA static string to identify the discovery source.
-Should be uniform per discovery service.
-last_updated: Option<u64>Optional timestamp when this node address info was last updated.
-Must be microseconds since the unix epoch.
-Implementations§
Source§impl DiscoveryItem
impl DiscoveryItem
Sourcepub fn from_node_info(
+DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem { /* private fields */ }
Expand description
The results returned from Discovery::resolve.
+This struct derefs to NodeData, so you can access the methods from NodeData
+directly from DiscoveryItem.
+Implementations§
Source§impl DiscoveryItem
Sourcepub fn new(
node_info: NodeInfo,
provenance: &'static str,
last_updated: Option<u64>,
) -> Self
Creates a new DiscoveryItem from a NodeInfo.
-Sourcepub fn from_node_data(
- node_id: NodeId,
- node_data: NodeData,
- provenance: &'static str,
- last_updated: Option<u64>,
-) -> Self
Creates a new DiscoveryItem from a NodeData.
-Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
Sourcepub fn provenance(&self) -> &'static str
Returns the provenance of this discovery item.
+The provenance is a static string to identify the discovery source.
+Sourcepub fn last_updated(&self) -> Option<u64>
Returns the optional timestamp when this node address info was last updated.
+The value is microseconds since the unix epoch.
+Sourcepub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
Auto Trait Implementations§
§impl Freeze for DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
pub fn from_node_info(
+DiscoveryItem in iroh::discovery - Rust pub struct DiscoveryItem { /* private fields */ }
Expand description
The results returned from Discovery::resolve.
+This struct derefs to NodeData, so you can access the methods from NodeData
+directly from DiscoveryItem.
+Implementations§
Source§impl DiscoveryItem
Sourcepub fn new(
node_info: NodeInfo,
provenance: &'static str,
last_updated: Option<u64>,
) -> Self
Creates a new DiscoveryItem from a NodeInfo.
-Sourcepub fn from_node_data(
- node_id: NodeId,
- node_data: NodeData,
- provenance: &'static str,
- last_updated: Option<u64>,
-) -> Self
Creates a new DiscoveryItem from a NodeData.
-Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
Sourcepub fn provenance(&self) -> &'static str
Returns the provenance of this discovery item.
+The provenance is a static string to identify the discovery source.
+Sourcepub fn last_updated(&self) -> Option<u64>
Returns the optional timestamp when this node address info was last updated.
+The value is microseconds since the unix epoch.
+Sourcepub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
Returns a copy 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 DiscoveryItem
Auto Trait Implementations§
§impl Freeze for DiscoveryItem
§impl RefUnwindSafe for DiscoveryItem
§impl Send for DiscoveryItem
§impl Sync for DiscoveryItem
§impl Unpin for DiscoveryItem
§impl UnwindSafe for DiscoveryItem
Blanket Implementations§
pub struct DiscoveryItem { /* private fields */ }Expand description
The results returned from Discovery::resolve.
This struct derefs to NodeData, so you can access the methods from NodeData
+directly from DiscoveryItem.
Implementations§
Source§impl DiscoveryItem
impl DiscoveryItem
Sourcepub fn new(
node_info: NodeInfo,
provenance: &'static str,
last_updated: Option<u64>,
) -> Self
pub fn new( node_info: NodeInfo, provenance: &'static str, last_updated: Option<u64>, ) -> Self
Creates a new DiscoveryItem from a NodeInfo.
Sourcepub fn from_node_data(
- node_id: NodeId,
- node_data: NodeData,
- provenance: &'static str,
- last_updated: Option<u64>,
-) -> Self
pub fn from_node_data( - node_id: NodeId, - node_data: NodeData, - provenance: &'static str, - last_updated: Option<u64>, -) -> Self
Creates a new DiscoveryItem from a NodeData.
Trait Implementations§
Source§impl Clone for DiscoveryItem
impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
fn clone(&self) -> DiscoveryItem
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 DiscoveryItem
impl RefUnwindSafe for DiscoveryItem
impl Send for DiscoveryItem
impl Sync for DiscoveryItem
impl Unpin for DiscoveryItem
impl UnwindSafe for DiscoveryItem
Blanket Implementations§
Sourcepub fn provenance(&self) -> &'static str
pub fn provenance(&self) -> &'static str
Returns the provenance of this discovery item.
+The provenance is a static string to identify the discovery source.
+Sourcepub fn last_updated(&self) -> Option<u64>
pub fn last_updated(&self) -> Option<u64>
Returns the optional timestamp when this node address info was last updated.
+The value is microseconds since the unix epoch.
+Sourcepub fn to_node_addr(&self) -> NodeAddr
pub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
Sourcepub fn into_node_addr(self) -> NodeAddr
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Clone for DiscoveryItem
impl Clone for DiscoveryItem
Source§fn clone(&self) -> DiscoveryItem
fn clone(&self) -> DiscoveryItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DiscoveryItem
impl Debug for DiscoveryItem
Auto Trait Implementations§
impl Freeze for DiscoveryItem
impl RefUnwindSafe for DiscoveryItem
impl Send for DiscoveryItem
impl Sync for DiscoveryItem
impl Unpin for DiscoveryItem
impl UnwindSafe for DiscoveryItem
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/struct.NodeData.html b/pr/3175/docs/iroh/discovery/struct.NodeData.html
index 01c888cca4..d7c9b619a5 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeData.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::discovery - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::discovery - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/discovery/struct.NodeInfo.html b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
index 2d1da3a3dd..d292cc0c17 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::discovery - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index de2c9fe2d9..74217d59e5 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_PROD
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Expand description
The n0 testing DNS node origin, for production.
+N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
index c46196d446..17c7ab9195 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_STAGING
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Expand description
The n0 testing DNS node origin, for testing.
+N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
index 266f2d0299..dc7484136f 100644
--- a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
+++ b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
@@ -1,2 +1,2 @@
-IROH_TXT_NAME in iroh::dns::node_info - Rust Constant IROH_TXT_NAME
pub const IROH_TXT_NAME: &'static str;
Expand description
The DNS name for the iroh TXT record.
+IROH_TXT_NAME in iroh::dns::node_info - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/index.html b/pr/3175/docs/iroh/dns/node_info/index.html
index 7ae1e03f0a..f465f0340e 100644
--- a/pr/3175/docs/iroh/dns/node_info/index.html
+++ b/pr/3175/docs/iroh/dns/node_info/index.html
@@ -1,4 +1,4 @@
-iroh::dns::node_info - Rust Module node_info
Expand description
Support for handling DNS resource records for dialing by NodeId.
+iroh::dns::node_info - Rust Expand description
Support for handling DNS resource records for dialing by NodeId.
Dialing by NodeId is supported by iroh nodes 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:
@@ -30,5 +30,5 @@ in RFC1464. The following
Each address is an IPv4 or IPv6 address with a port.
-Structs§
- The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAME TXT resource record.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId to encode to and decode from [z32],
+Structs§
- Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId 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/3175/docs/iroh/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
index 77c6ab52bc..3f6b77ddc8 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::dns::node_info - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
index a37c2a3997..33bbc94334 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::dns::node_info - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/struct.DnsResolver.html b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
index 53db4bb73a..cd065a4b18 100644
--- a/pr/3175/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
@@ -1,26 +1,26 @@
-DnsResolver in iroh::dns - Rust Struct DnsResolver
pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
-Implementations§
§impl DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+DnsResolver in iroh::dns - Rust pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,37 +65,37 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_node_by_id(
+
Sourcepub async fn lookup_node_by_id(
&self,
node_id: &PublicKey,
origin: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
-pub async fn lookup_node_by_domain_name(
+
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+) -> Result<NodeInfo, Error>
Looks up node info by DNS name.
+Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeInfo, Error>Looks up node info by DNS name in a staggered fashion.
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
summary of all errors otherwise.
-pub async fn lookup_node_by_id_staggered(
+
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId 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
summary of all errors otherwise.
-Trait Implementations§
§impl Clone for DnsResolver
§fn clone(&self) -> DnsResolver
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for DnsResolver
§impl Default for DnsResolver
§fn default() -> DnsResolver
Returns the “default value” for a type. Read more§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
Returns a copy 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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Source§fn from(
resolver: Resolver<GenericConnector<TokioRuntimeProvider>>,
) -> DnsResolver
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for DnsResolver
§impl !RefUnwindSafe for DnsResolver
§impl Send for DnsResolver
§impl Sync for DnsResolver
§impl Unpin for DnsResolver
§impl !UnwindSafe for DnsResolver
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
index c45ae3b1d6..b35eebd63f 100644
--- a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a copy 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 copy 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/struct.NodeData.html b/pr/3175/docs/iroh/discovery/struct.NodeData.html
index 01c888cca4..d7c9b619a5 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeData.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::discovery - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::discovery - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/discovery/struct.NodeInfo.html b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
index 2d1da3a3dd..d292cc0c17 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::discovery - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index de2c9fe2d9..74217d59e5 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_PROD
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Expand description
The n0 testing DNS node origin, for production.
+N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
index c46196d446..17c7ab9195 100644
--- a/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
+++ b/pr/3175/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html
@@ -1,2 +1,2 @@
-N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust Constant N0_DNS_NODE_ORIGIN_STAGING
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Expand description
The n0 testing DNS node origin, for testing.
+N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
index 266f2d0299..dc7484136f 100644
--- a/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
+++ b/pr/3175/docs/iroh/dns/node_info/constant.IROH_TXT_NAME.html
@@ -1,2 +1,2 @@
-IROH_TXT_NAME in iroh::dns::node_info - Rust Constant IROH_TXT_NAME
pub const IROH_TXT_NAME: &'static str;
Expand description
The DNS name for the iroh TXT record.
+IROH_TXT_NAME in iroh::dns::node_info - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/node_info/index.html b/pr/3175/docs/iroh/dns/node_info/index.html
index 7ae1e03f0a..f465f0340e 100644
--- a/pr/3175/docs/iroh/dns/node_info/index.html
+++ b/pr/3175/docs/iroh/dns/node_info/index.html
@@ -1,4 +1,4 @@
-iroh::dns::node_info - Rust Module node_info
Expand description
Support for handling DNS resource records for dialing by NodeId.
+iroh::dns::node_info - Rust Expand description
Support for handling DNS resource records for dialing by NodeId.
Dialing by NodeId is supported by iroh nodes 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:
@@ -30,5 +30,5 @@ in RFC1464. The following
Each address is an IPv4 or IPv6 address with a port.
-Structs§
- The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAME TXT resource record.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId to encode to and decode from [z32],
+Structs§
- Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeId 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/3175/docs/iroh/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
index 77c6ab52bc..3f6b77ddc8 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeData.html
@@ -1,22 +1,23 @@
-NodeData in iroh::dns::node_info - Rust Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}
Expand description
The information that can be published about a node in discovery services.
+NodeData in iroh::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
-The fields are not public, but there are setter and getter functions for all fields
-contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§relay_url: Option<RelayUrl>URL of the home relay of this node.
-§direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
-pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
-Trait Implementations§
§impl Eq for NodeData
§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
Source§impl Eq for NodeData
Source§impl StructuralPartialEq for NodeData
Auto Trait Implementations§
§impl Freeze for NodeData
§impl RefUnwindSafe for NodeData
§impl Send for NodeData
§impl Sync for NodeData
§impl Unpin for NodeData
§impl UnwindSafe for NodeData
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/3175/docs/iroh/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
index a37c2a3997..33bbc94334 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::dns::node_info - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/struct.DnsResolver.html b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
index 53db4bb73a..cd065a4b18 100644
--- a/pr/3175/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
@@ -1,26 +1,26 @@
-DnsResolver in iroh::dns - Rust Struct DnsResolver
pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
-Implementations§
§impl DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+DnsResolver in iroh::dns - Rust pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,37 +65,37 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_node_by_id(
+
Sourcepub async fn lookup_node_by_id(
&self,
node_id: &PublicKey,
origin: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
-pub async fn lookup_node_by_domain_name(
+
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+) -> Result<NodeInfo, Error>
Looks up node info by DNS name.
+Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeInfo, Error>Looks up node info by DNS name in a staggered fashion.
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
summary of all errors otherwise.
-pub async fn lookup_node_by_id_staggered(
+
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
+) -> Result<NodeInfo, Error>Looks up node info by NodeId 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
summary of all errors otherwise.
-Trait Implementations§
§impl Clone for DnsResolver
§fn clone(&self) -> DnsResolver
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for DnsResolver
§impl Default for DnsResolver
§fn default() -> DnsResolver
Returns the “default value” for a type. Read more§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
Returns a copy 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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Source§fn from(
resolver: Resolver<GenericConnector<TokioRuntimeProvider>>,
) -> DnsResolver
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for DnsResolver
§impl !RefUnwindSafe for DnsResolver
§impl Send for DnsResolver
§impl Sync for DnsResolver
§impl Unpin for DnsResolver
§impl !UnwindSafe for DnsResolver
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
index c45ae3b1d6..b35eebd63f 100644
--- a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a copy 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 copy 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}Expand description
The information that can be published about a node in discovery services.
+pub struct NodeData { /* private fields */ }Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
The fields are not public, but there are setter and getter functions for all fields -contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.relay_url: Option<RelayUrl>URL of the home relay of this node.
-direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
pub fn new( relay_url: Option<RelayUrl>, direct_addresses: BTreeSet<SocketAddr>, ) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
Trait Implementations§
impl Eq for NodeData
impl StructuralPartialEq for NodeData
Auto Trait Implementations§
impl Freeze for NodeData
impl RefUnwindSafe for NodeData
impl Send for NodeData
impl Sync for NodeData
impl Unpin for NodeData
impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
pub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
pub fn add_direct_addresses( + &mut self, + addrs: impl IntoIterator<Item = SocketAddr>, +)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
impl Eq for NodeData
impl StructuralPartialEq for NodeData
Auto Trait Implementations§
impl Freeze for NodeData
impl RefUnwindSafe for NodeData
impl Send for NodeData
impl Sync for NodeData
impl Unpin for NodeData
impl UnwindSafe for NodeData
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/3175/docs/iroh/discovery/struct.NodeInfo.html b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
index 2d1da3a3dd..d292cc0c17 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::discovery - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§fn from(t: T) -> T
fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 3b779b5fb4..5ca9597655 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -1,4 +1,4 @@
-Discovery in iroh::discovery - Rust pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
\ No newline at end of file
+
pub trait Discovery:
+Discovery in iroh::discovery - Rust pub trait Discovery:
Debug
+ Send
+ Sync {
@@ -21,19 +21,19 @@ addresses. See super::Endpoint will call publish whenever
discovery information changes. If a discovery mechanism requires a periodic
refresh, it should start its own task.
-
Provided Methods§
Provided Methods§
Sourcefn publish(&self, _data: &NodeData)
Publishes the given NodeData to the discovery mechanism.
This is fire and forget, since the Endpoint can not wait for successful
publishing. If publishing is async, the implementation should start it’s own task.
This will be called from a tokio task, so it is safe to spawn new tasks.
These tasks will be run on the runtime of the super::Endpoint.
-Sourcefn resolve(
&self,
_endpoint: Endpoint,
_node_id: NodeId,
) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the DiscoveryItem for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
-Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
+Sourcefn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>
Subscribe to all addresses that get passively discovered.
An implementation may choose to defer emitting passively discovered nodes
until the stream is actually polled. To avoid missing discovered nodes,
poll the stream as soon as possible.
@@ -50,4 +50,4 @@ should be sent on all streams.
The crate::endpoint::Endpoint will subscribe to the discovery system
and add the discovered addresses to the internal address book as they arrive
on this stream.
-Implementations on Foreign Types§
Source§impl<T: Discovery> Discovery for Arc<T>
Implementors§
Source§impl Discovery for DnsDiscovery
Source§impl Discovery for LocalSwarmDiscovery
Available on crate feature discovery-local-network only. Source§impl Discovery for DhtDiscovery
Available on crate feature discovery-pkarr-dht only. Source§impl Discovery for PkarrPublisher
Source§impl Discovery for PkarrResolver
Source§impl Discovery for StaticProvider
Source§impl Discovery for ConcurrentDiscovery
Implementations on Foreign Types§
impl<T: Discovery> Discovery for Arc<T>
Implementors§
impl Discovery for DnsDiscovery
impl Discovery for LocalSwarmDiscovery
discovery-local-network only.impl Discovery for DhtDiscovery
discovery-pkarr-dht only.impl Discovery for PkarrPublisher
impl Discovery for PkarrResolver
impl Discovery for StaticProvider
impl Discovery for ConcurrentDiscovery
Constant N0_DNS_NODE_ORIGIN_PROD
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;Expand description
The n0 testing DNS node origin, for production.
+Constant N0_DNS_NODE_ORIGIN_STAGING
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;Expand description
The n0 testing DNS node origin, for testing.
+Constant IROH_TXT_NAME
pub const IROH_TXT_NAME: &'static str;Expand description
The DNS name for the iroh TXT record.
+Module node_info
Expand description
Support for handling DNS resource records for dialing by NodeId.
Expand description
Support for handling DNS resource records for dialing by NodeId.
Dialing by NodeId is supported by iroh nodes 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:
@@ -30,5 +30,5 @@ in RFC1464. The following Each address is an IPv4 or IPv6 address with a port. -Structs§
- The information that can be published about a node in discovery services.
- Information about the iroh node contained in an
IROH_TXT_NAMETXT resource record.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeIdto encode to and decode from [z32], +Structs§
- Data about a node that may be published to and resolved from discovery services.
- Information about a node that may be published to and resolved from discovery services.
Constants§
- The DNS name for the iroh TXT record.
Traits§
- Extension methods for
NodeIdto encode to and decode from [z32], which is the encoding used in [pkarr] domain names.
Struct NodeData
#[non_exhaustive]pub struct NodeData {
- pub relay_url: Option<RelayUrl>,
- pub direct_addresses: BTreeSet<SocketAddr>,
-}Expand description
The information that can be published about a node in discovery services.
+pub struct NodeData { /* private fields */ }Expand description
Data about a node that may be published to and resolved from discovery services.
This includes an optional RelayUrl and a set of direct addresses.
The fields are not public, but there are setter and getter functions for all fields -contained in the struct.
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.relay_url: Option<RelayUrl>URL of the home relay of this node.
-direct_addresses: BTreeSet<SocketAddr>Direct addresses where this node can be reached.
-Implementations§
Implementations§
Source§impl NodeData
impl NodeData
Sourcepub fn new(
relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeData
pub fn new( relay_url: Option<RelayUrl>, direct_addresses: BTreeSet<SocketAddr>, ) -> NodeData
Creates a new NodeData with a relay URL and a set of direct addresses.
pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses.
-pub fn clear_direct_addresses(&mut self)
pub fn clear_direct_addresses(&mut self)
Removes all direct addresses.
-pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
pub fn into_node_addr(self, node_id: PublicKey) -> NodeAddr
Converts into a NodeAddr.
Trait Implementations§
impl Eq for NodeData
impl StructuralPartialEq for NodeData
Auto Trait Implementations§
impl Freeze for NodeData
impl RefUnwindSafe for NodeData
impl Send for NodeData
impl Sync for NodeData
impl Unpin for NodeData
impl UnwindSafe for NodeData
Blanket Implementations§
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
pub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeData
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
+Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Sourcepub fn clear_direct_addresses(&mut self)
pub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
+Sourcepub fn add_direct_addresses(
+ &mut self,
+ addrs: impl IntoIterator<Item = SocketAddr>,
+)
pub fn add_direct_addresses( + &mut self, + addrs: impl IntoIterator<Item = SocketAddr>, +)
Adds direct addresses to the node data.
+Sourcepub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)
Sets the relay URL of the node data.
+Trait Implementations§
impl Eq for NodeData
impl StructuralPartialEq for NodeData
Auto Trait Implementations§
impl Freeze for NodeData
impl RefUnwindSafe for NodeData
impl Send for NodeData
impl Sync for NodeData
impl Unpin for NodeData
impl UnwindSafe for NodeData
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/3175/docs/iroh/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
index a37c2a3997..33bbc94334 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,23 +1,28 @@
-NodeInfo in iroh::dns::node_info - Rust Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
From<T>,§impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/dns/struct.DnsResolver.html b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
index 53db4bb73a..cd065a4b18 100644
--- a/pr/3175/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/3175/docs/iroh/dns/struct.DnsResolver.html
@@ -1,26 +1,26 @@
-DnsResolver in iroh::dns - Rust Struct DnsResolver
pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
-Implementations§
§impl DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+DnsResolver in iroh::dns - Rust pub struct DnsResolver(/* private fields */);
Expand description
The DNS resolver used throughout iroh.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
-}
Expand description
Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
+}Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(node_id: PublicKey, data: NodeData) -> NodeInfo
Creates a new NodeInfo from its parts.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
§impl Eq for NodeInfo
§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+Trait Implementations§
Source§impl Eq for NodeInfo
Source§impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
§impl Freeze for NodeInfo
§impl RefUnwindSafe for NodeInfo
§impl Send for NodeInfo
§impl Sync for NodeInfo
§impl Unpin for NodeInfo
§impl UnwindSafe for NodeInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§fn from(t: T) -> T
fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
impl<V, T> VZip<V> for Twhere
diff --git a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..1756f8a79a 100644
--- a/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-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.
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.
Implementors§
Struct DnsResolver
pub struct DnsResolver(/* private fields */);Expand description
The DNS resolver used throughout iroh.
Implementations§
§impl DnsResolver
impl DnsResolver
pub fn new() -> DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+pub struct DnsResolver(/* private fields */);Expand description
The DNS resolver used throughout iroh.
Implementations§
Source§impl DnsResolver
impl DnsResolver
Sourcepub fn new() -> DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
pub async fn lookup_txt( +
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
pub async fn lookup_txt( &self, host: impl ToString, timeout: Duration, -) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
pub async fn lookup_ipv4( +) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
pub async fn lookup_ipv4( &self, host: impl ToString, timeout: Duration, ) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
pub async fn lookup_ipv6( +
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
pub async fn lookup_ipv6( &self, host: impl ToString, timeout: Duration, ) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
pub async fn lookup_ipv4_ipv6( +
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
pub async fn resolve_host(
+
pub async fn resolve_host( +
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
pub async fn resolve_host( &self, url: &Url, prefer_ipv6: bool, timeout: Duration, ) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
pub async fn lookup_ipv4_staggered( +
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
pub async fn lookup_ipv6_staggered( +
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
+
pub async fn lookup_ipv4_ipv6_staggered( +
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,37 +65,37 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,37 +65,37 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_node_by_id(
+
pub async fn lookup_node_by_id( +
Sourcepub async fn lookup_node_by_id(
&self,
node_id: &PublicKey,
origin: &str,
-) -> Result<NodeAddr, Error>
pub async fn lookup_node_by_id( &self, node_id: &PublicKey, origin: &str, -) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
Looks up node info by NodeId and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
pub async fn lookup_node_by_domain_name(
+
pub async fn lookup_node_by_domain_name( +
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
-) -> Result<NodeAddr, Error>
pub async fn lookup_node_by_domain_name( &self, name: &str, -) -> Result<NodeAddr, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+) -> Result<NodeInfo, Error>
pub async fn lookup_node_by_domain_name_staggered( +) -> Result<NodeInfo, Error>
Looks up node info by DNS name.
+Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
pub async fn lookup_node_by_domain_name_staggered( &self, name: &str, delays_ms: &[u64], -) -> Result<NodeAddr, Error>
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeInfo, Error>Looks up node info by DNS name in a staggered fashion.
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
summary of all errors otherwise.
pub async fn lookup_node_by_id_staggered(
+
pub async fn lookup_node_by_id_staggered( +
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
delays_ms: &[u64],
-) -> Result<NodeAddr, Error>
pub async fn lookup_node_by_id_staggered( &self, node_id: &PublicKey, origin: &str, delays_ms: &[u64], -) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
Looks up node info by NodeId 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
summary of all errors otherwise.
Trait Implementations§
§impl Clone for DnsResolver
impl Clone for DnsResolver
§fn clone(&self) -> DnsResolver
fn clone(&self) -> DnsResolver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for DnsResolver
impl Debug for DnsResolver
§impl Default for DnsResolver
impl Default for DnsResolver
§fn default() -> DnsResolver
fn default() -> DnsResolver
§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Trait Implementations§
Source§impl Clone for DnsResolver
impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
fn clone(&self) -> DnsResolver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DnsResolver
impl Debug for DnsResolver
Source§impl Default for DnsResolver
impl Default for DnsResolver
Source§fn default() -> DnsResolver
fn default() -> DnsResolver
Source§impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver
Source§fn from(
resolver: Resolver<GenericConnector<TokioRuntimeProvider>>,
) -> DnsResolver
fn from( resolver: Resolver<GenericConnector<TokioRuntimeProvider>>, ) -> DnsResolver
Auto Trait Implementations§
impl Freeze for DnsResolver
impl !RefUnwindSafe for DnsResolver
impl Send for DnsResolver
impl Sync for DnsResolver
impl Unpin for DnsResolver
impl !UnwindSafe for DnsResolver
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
index c45ae3b1d6..b35eebd63f 100644
--- a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a copy 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 copy 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
index c45ae3b1d6..b35eebd63f 100644
--- a/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
+++ b/pr/3175/docs/iroh/endpoint/enum.DirectAddrType.html
@@ -1,4 +1,4 @@
-DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN to discover the public address.
-
Trait Implementations§
Source§impl Clone for DirectAddrType
Source§fn clone(&self) -> DirectAddrType
Returns a copy 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 copy 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust pub enum DirectAddrType {
Unknown,
Local,
Stun,
@@ -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 node. This indicates a
situation like this, which still uses STUN 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/3175/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
index 626e16b501..957c6207fd 100644
--- a/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3175/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-node might be contactable.
@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog
iroh node, see DirectAddrType for the several kinds of sources.
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 copy 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 copy 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/3175/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3175/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§relay_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
+Trait Implementations§
Source§impl Metric for Metrics
§fn new(registry: &mut Registry) -> Self
Available on crate feature metrics only.Initializes this metric group.§fn with_metric<T, F>(f: F)where
F: FnOnce(&Self) -> T,
Available on crate feature metrics only.Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/struct.NodeAddr.html b/pr/3175/docs/iroh/struct.NodeAddr.html
index acdf90a89e..6c0f2c6dfb 100644
--- a/pr/3175/docs/iroh/struct.NodeAddr.html
+++ b/pr/3175/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl From<NodeTicket> for NodeAddr
Source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+Source§impl From<RemoteInfo> for NodeAddr
Source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.Source§impl Ord for NodeAddr
Source§impl PartialEq for NodeAddr
Source§fn eq(&self, other: &NodeAddr) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
@@ -74,7 +74,7 @@ the >= operator. Eq + ?Sized,
K: Borrow<Q> + ?Sized,§fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
§fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
Instruments this type with the current Span, returning an
diff --git a/pr/3175/docs/iroh/struct.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index 76aeebd528..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -22,7 +22,7 @@ representation of the key.
Source§impl Ord for PublicKey
Source§impl PartialEq for PublicKey
Source§fn eq(&self, other: &PublicKey) -> bool
Tests for self and other values to be equal, and is used by ==.1.0.0 · Source§fn ne(&self, other: &Rhs) -> bool
Tests for !=. The default implementation is almost always sufficient,
diff --git a/pr/3175/docs/iroh/struct.RelayMap.html b/pr/3175/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3175/docs/iroh/struct.RelayMap.html
+++ b/pr/3175/docs/iroh/struct.RelayMap.html
@@ -1,26 +1,26 @@
-RelayMap in iroh - Rust Struct RelayMap
pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
Source§impl RelayMap
Sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+Sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+Sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMap
Source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
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/3175/docs/iroh/struct.RelayNode.html b/pr/3175/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3175/docs/iroh/struct.RelayNode.html
+++ b/pr/3175/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust Struct RelayNode
pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<RelayQuicConfig>,
+ pub quic: Option<RelayQuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<RelayQuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RelayNode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Ord for RelayNode
§impl PartialOrd for RelayNode
Source§impl Serialize for RelayNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayNode
Source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
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/3175/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
index 1ff33b76e1..f4ffe04ad1 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
index 624f90fe60..6c41391cac 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 414436809c..31a6b56d5a 100644
--- a/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/3175/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,4 +1,4 @@
-run_relay_server_with_stun in iroh::test_utils - Rust pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+run_relay_server_with_stun in iroh::test_utils - Rust
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index 035d4a5eba..bd3dd90464 100644
--- a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
@@ -1,9 +1,9 @@
ReceivedMessage in iroh_relay::client - Rust pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}
Expand description
The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Variants§
§ReceivedPacket
Represents an incoming packet.
-Fields
§NodeGone(NodeId)
Indicates that the client identified by the underlying public key had previously sent you a
packet but has now disconnected from the server.
§Ping([u8; 8])
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
diff --git a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
index 8007446751..675dfc000f 100644
--- a/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
+++ b/pr/3175/docs/iroh_relay/client/enum.SendMessage.html
@@ -1,9 +1,9 @@
SendMessage in iroh_relay::client - Rust pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}
Expand description
Messages we can send to a relay server.
-Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the NodeId.
+Variants§
§SendPacket(NodeId, Bytes)
Send a packet of data to the [NodeId].
§Ping([u8; 8])
Sends a ping message to the connected relay server.
§Pong([u8; 8])
Sends a pong message to the connected relay server.
Trait Implementations§
Source§impl Debug for SendMessage
Source§impl Sink<SendMessage> for Client
Source§type Error = ConnSendError
The type of value produced by the sink when an error occurs.Source§fn poll_ready(
diff --git a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
index dced614e31..7307aac7f2 100644
--- a/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
+++ b/pr/3175/docs/iroh_relay/client/struct.ClientBuilder.html
@@ -1,7 +1,7 @@
ClientBuilder in iroh_relay::client - Rust 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 protocol(self, protocol: Protocol) -> Self
Sets whether to connect to the relay via websockets or not.
diff --git a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
index ed7c50ce96..3dee4e7b24 100644
--- a/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
+++ b/pr/3175/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html
@@ -1,2 +1,2 @@
-
N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust