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.
+pub struct StaticProvider { /* private fields */ }Expand description
A static node discovery to manually add node addressing information.
+pub struct StaticProvider { /* private fields */ }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
@@ -20,20 +20,23 @@ 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 from_node_addrs(
- infos: impl IntoIterator<Item = impl Into<NodeAddr>>,
+
pub fn from_node_addrs( - infos: impl IntoIterator<Item = impl Into<NodeAddr>>, +
Sourcepub fn from_node_info(
+ infos: impl IntoIterator<Item = impl Into<NodeInfo>>,
) -> Self
pub fn from_node_info( + infos: impl IntoIterator<Item = impl Into<NodeInfo>>, ) -> Self
Creates a static discovery instance from node addresses.
§Examples
use std::{net::SocketAddr, str::FromStr};
@@ -44,22 +47,22 @@ addressing information used by an iroh let addrs = get_addrs();
// create a StaticProvider from the list of addrs.
-let discovery = StaticProvider::from_node_addrs(addrs);
+let discovery = StaticProvider::from_node_info(addrs);
// create an endpoint with the discovery
let endpoint = Endpoint::builder()
.add_discovery(|_| Some(discovery))
.bind()
.await?;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.
+Sourcepub fn set_node_info(&self, node_info: impl Into<NodeInfo>) -> Option<NodeAddr>
pub fn set_node_info(&self, node_info: impl Into<NodeInfo>) -> 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_info(&self, node_info: impl Into<NodeInfo>)
pub fn add_node_info(&self, node_info: impl Into<NodeInfo>)
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_info(&self, node_id: NodeId) -> Option<NodeInfo>
pub fn get_node_info(&self, node_id: NodeId) -> Option<NodeInfo>
Returns node addressing information for the given node ID.
+Sourcepub fn remove_node_info(&self, node_id: NodeId) -> Option<NodeInfo>
pub fn remove_node_info(&self, node_id: NodeId) -> Option<NodeInfo>
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
Source§impl Discovery for StaticProvider
impl Discovery for StaticProvider
Source§fn resolve(
&self,
_endpoint: Endpoint,
node_id: NodeId,
diff --git a/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
index 5ce6575c53..0352194c98 100644
--- a/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
+++ b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
@@ -17,8 +17,8 @@ directly from Sourcepub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
fn resolve(
&self,
_endpoint: Endpoint,
node_id: NodeId,
diff --git a/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
index 5ce6575c53..0352194c98 100644
--- a/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
+++ b/pr/3175/docs/iroh/discovery/struct.DiscoveryItem.html
@@ -17,8 +17,8 @@ directly from Sourcepub fn to_node_addr(&self) -> NodeAddr
Converts into a NodeAddr by cloning the needed fields.
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>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
+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<'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
diff --git a/pr/3175/docs/iroh/discovery/struct.NodeData.html b/pr/3175/docs/iroh/discovery/struct.NodeData.html
index 678cd2f23c..d7c9b619a5 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeData.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeData.html
@@ -1,23 +1,23 @@
-NodeData in iroh::discovery - Rust Struct NodeData
pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from 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.
This struct does not include the node’s NodeId, only the data about a certain
node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
-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 and returns the updated node data.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
-pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
-pub fn add_direct_addresses(
+
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.
-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§
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 11c4f1115a..8048525164 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,28 +1,30 @@
-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
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
-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 with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeInfo
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeInfo
Sets the direct addresses and returns the updated node info.
+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.
-Methods from Deref<Target = NodeData>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 1b9af85914..2b3d61aee1 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -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 4ebdaae944..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:
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 06b9550eb8..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,23 +1,23 @@
-NodeData in iroh::dns::node_info - Rust Struct NodeData
pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from 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.
This struct does not include the node’s NodeId, only the data about a certain
node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
-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 and returns the updated node data.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
-pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
-pub fn add_direct_addresses(
+
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.
-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§
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 3f7ad0075f..6326672170 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,28 +1,30 @@
-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
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
-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 with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeInfo
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeInfo
Sets the direct addresses and returns the updated node info.
+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.
-Methods from Deref<Target = NodeData>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
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 8e40c1e6f2..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,18 +65,18 @@ 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<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<NodeInfo, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+
Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
@@ -85,7 +85,7 @@ pass pub async fn lookup_node_by_id_staggered(
+
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
@@ -95,7 +95,7 @@ summary of all errors otherwise.
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/struct.Endpoint.html b/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
index ee239169ec..a3634ae2cb 100644
--- a/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
@@ -26,7 +26,7 @@ Note that this overrides the current list of ALPNs.
alpn: &[u8],
) -> Result<Connection>Connects to a remote Endpoint.
A value that can be converted into a NodeAddr is required. This can be either a
-NodeAddr, a NodeId or a [iroh_base::ticket::NodeTicket].
+NodeAddr, a NodeId or a iroh_base::ticket::NodeTicket.
The NodeAddr must contain the NodeId to dial and may also contain a RelayUrl
and direct addresses. If direct addresses are provided, they will be used to try and
establish a direct connection without involving a relay server.
diff --git a/pr/3175/docs/iroh/enum.KeyParsingError.html b/pr/3175/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3175/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3175/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust Enum KeyParsingError
pub enum KeyParsingError {
+KeyParsingError in iroh - Rust pub enum KeyParsingError {
Decode(DecodeError),
Key(Error),
DecodeInvalidLength,
@@ -6,7 +6,7 @@
Variants§
§Decode(DecodeError)
Error when decoding.
§Key(Error)
Error when decoding the public key.
§DecodeInvalidLength
The encoded information had the wrong length.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<DecodeError> for KeyParsingError
§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.§impl From<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodeError> for KeyParsingError
Source§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.Source§impl From<Error> for KeyParsingError
Source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
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 66f0aa3e51..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 Struct NodeAddr
pub struct NodeAddr {
+NodeAddr in iroh - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
@@ -27,36 +27,36 @@ whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§relay_url: Option<RelayUrl>The node’s home relay url.
§direct_addresses: BTreeSet<SocketAddr>Socket addresses where the peer might be reached directly.
-Implementations§
§impl NodeAddr
pub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
-pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
-pub fn with_direct_addresses(
+
Implementations§
Source§impl NodeAddr
Sourcepub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
+Sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Adds the given direct addresses.
-pub fn from_parts(
+
Sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
-Trait Implementations§
§impl<'de> Deserialize<'de> for NodeAddr
§fn deserialize<__D>(
+
Sourcepub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
+
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<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
§impl PartialOrd for NodeAddr
Source§impl Serialize for NodeAddr
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 NodeAddr
§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Eq for NodeAddr
Source§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
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.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index d2af005b74..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -1,43 +1,43 @@
-PublicKey in iroh - Rust Struct PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
§impl PublicKey
pub fn public(&self) -> VerifyingKey
Returns the [VerifyingKey] for this PublicKey.
-pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
§Warning
This will return a [SignatureError] if the bytes passed into this method do not represent
a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.
See [VerifyingKey::from_bytes] for details.
-pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
+Sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
§Return
Returns Ok(()) if the signature is valid, and Err otherwise.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for PublicKey
§impl Hash for PublicKey
Source§impl Ord for PublicKey
§impl PartialOrd for PublicKey
Source§impl Serialize for PublicKey
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 Copy for PublicKey
§impl Eq for PublicKey
§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
Source§impl Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
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.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/struct.RelayUrl.html b/pr/3175/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3175/docs/iroh/struct.RelayUrl.html
+++ b/pr/3175/docs/iroh/struct.RelayUrl.html
@@ -1,4 +1,4 @@
-RelayUrl in iroh - Rust Struct RelayUrl
pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
+RelayUrl in iroh - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
It is cheaply clonable, as the underlying type is wrapped into an Arc.
The main type under the hood though is Url, with a few custom tweaks:
@@ -444,30 +444,30 @@ or if Path::new_opt() returns None.
(That is, if the percent-decoded path contains a NUL byte or,
for a Windows path, is not UTF-8.)
This method is only available if the std Cargo feature is enabled.
-
Trait Implementations§
Trait Implementations§
Source§impl Deref for RelayUrl
§impl<'de> Deserialize<'de> for RelayUrl
§fn deserialize<__D>(
+
Source§impl<'de> Deserialize<'de> for RelayUrl
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl FromStr for RelayUrl
Support for parsing strings directly.
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for RelayUrl
Support for parsing strings directly.
If you need more control over the error first create a Url and use RelayUrl::from
instead.
-§impl Hash for RelayUrl
Source§impl Ord for RelayUrl
§impl PartialOrd for RelayUrl
Source§impl Serialize for RelayUrl
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 RelayUrl
§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayUrl
Source§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
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.RelayUrlParseError.html b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3175/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
@@ -1,5 +1,5 @@
-RelayUrlParseError in iroh - Rust Struct RelayUrlParseError
pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
-Trait Implementations§
§impl Debug for RelayUrlParseError
§impl Display for RelayUrlParseError
§impl Error for RelayUrlParseError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<ParseError> for RelayUrlParseError
§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
Blanket Implementations§
Source§impl<T> Any for Twhere
+RelayUrlParseError in iroh - Rust pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
+Trait Implementations§
Source§impl Debug for RelayUrlParseError
Source§impl Display for RelayUrlParseError
Source§impl Error for RelayUrlParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ParseError> for RelayUrlParseError
Source§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
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.SecretKey.html b/pr/3175/docs/iroh/struct.SecretKey.html
index 6c9e0f9879..65f0f97250 100644
--- a/pr/3175/docs/iroh/struct.SecretKey.html
+++ b/pr/3175/docs/iroh/struct.SecretKey.html
@@ -1,24 +1,24 @@
-SecretKey in iroh - Rust Struct SecretKey
pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
-Implementations§
§impl SecretKey
pub fn generate<R>(csprng: R) -> SecretKeywhere
+SecretKey in iroh - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate<R>(csprng: R) -> SecretKeywhere
R: CryptoRngCore,
Generate a new SecretKey with a randomness generator.
// use the OsRng option for OS depedndent most secure RNG.
let mut rng = rand::rngs::OsRng;
let _key = iroh_base::SecretKey::generate(&mut rng);
-Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-pub fn secret(&self) -> &SigningKey
Returns the [SigningKey] for this SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
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
Auto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
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/type.NodeId.html b/pr/3175/docs/iroh/type.NodeId.html
index ab9edbf3b6..1101fcf5e8 100644
--- a/pr/3175/docs/iroh/type.NodeId.html
+++ b/pr/3175/docs/iroh/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh - Rust Type Alias NodeId
pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/3175/docs/iroh_net_report/struct.Client.html b/pr/3175/docs/iroh_net_report/struct.Client.html
index b26f34faf5..4cc1899d63 100644
--- a/pr/3175/docs/iroh_net_report/struct.Client.html
+++ b/pr/3175/docs/iroh_net_report/struct.Client.html
@@ -7,7 +7,7 @@ If all Addr::receive_stun_packet.
Implementations§
Source§impl Client
Sourcepub fn new(
port_mapper: Option<Client>,
- dns_resolver: DnsResolver,
+ dns_resolver: DnsResolver,
ip_mapped_addrs: Option<IpMappedAddresses>,
) -> Result<Self>
Creates a new net_report client.
This starts a connected actor in the background. Once the client is dropped it will
@@ -17,7 +17,7 @@ stop running.
allows sending messages to the actor.
Sourcepub async fn get_report(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
stun_sock_v4: Option<Arc<UdpSocket>>,
stun_sock_v6: Option<Arc<UdpSocket>>,
quic_config: Option<QuicConfig>,
@@ -39,14 +39,14 @@ using QUIC address discovery.
This will attempt to use all probe protocols.
Sourcepub async fn get_report_with_opts(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Arc<Report>>
Runs a net_report, returning the report.
It may not be called concurrently with itself, &mut self takes care of that.
Look at Options for the different configuration options.
Sourcepub async fn get_report_channel(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Receiver<Result<Arc<Report>>>>
Get report with channel
Look at Options for the different configuration options.
diff --git a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
index 8494e5ed26..a2d3b88d82 100644
--- a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
+++ b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
@@ -1,5 +1,5 @@
RelayLatencies in iroh_net_report - Rust pub struct RelayLatencies(/* private fields */);
Expand description
Latencies per relay node.
-Implementations§
Source§impl RelayLatencies
Sourcepub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_
Returns an iterator over all the relays and their latencies.
+Implementations§
Trait Implementations§
Source§impl Clone for RelayLatencies
Source§fn clone(&self) -> RelayLatencies
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 RelayLatencies
Source§impl Default for RelayLatencies
Source§fn default() -> RelayLatencies
Returns the “default value” for a type. Read moreSource§impl PartialEq for RelayLatencies
Source§impl Eq for RelayLatencies
Source§impl StructuralPartialEq for RelayLatencies
Auto Trait Implementations§
§impl Freeze for RelayLatencies
§impl RefUnwindSafe for RelayLatencies
§impl Send for RelayLatencies
§impl Sync for RelayLatencies
§impl Unpin for RelayLatencies
§impl UnwindSafe for RelayLatencies
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_net_report/struct.Report.html b/pr/3175/docs/iroh_net_report/struct.Report.html
index 5a58065db3..ac3dcd8786 100644
--- a/pr/3175/docs/iroh_net_report/struct.Report.html
+++ b/pr/3175/docs/iroh_net_report/struct.Report.html
@@ -11,7 +11,7 @@
pub mapping_varies_by_dest_ipv6: Option<bool>,
pub hair_pinning: Option<bool>,
pub portmap_probe: Option<ProbeOutput>,
- pub preferred_relay: Option<RelayUrl>,
+ pub preferred_relay: Option<RelayUrl>,
pub relay_latency: RelayLatencies,
pub relay_v4_latency: RelayLatencies,
pub relay_v6_latency: RelayLatencies,
@@ -35,7 +35,7 @@ detecting rather than using it. For now.
§hair_pinning: Option<bool>Whether the router supports communicating between two local devices through the NATted
public IP address (on IPv4).
§portmap_probe: Option<ProbeOutput>Probe indicating the presence of port mapping protocols on the LAN.
-§preferred_relay: Option<RelayUrl>None for unknown
+§preferred_relay: Option<RelayUrl>None for unknown
§relay_latency: RelayLatencieskeyed by relay Url
§relay_v4_latency: RelayLatencieskeyed by relay Url
§relay_v6_latency: RelayLatencieskeyed by relay Url
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index bd3dd90464..035d4a5eba 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 675dfc000f..8007446751 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 7307aac7f2..dced614e31 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/index.html b/pr/3175/docs/iroh_relay/dns/index.html
index 0970232562..b08dc85482 100644
--- a/pr/3175/docs/iroh_relay/dns/index.html
+++ b/pr/3175/docs/iroh_relay/dns/index.html
@@ -1,2 +1,2 @@
iroh_relay::dns - Rust Available on non-wasm_browser only.Expand description
DNS resolver
-Modules§
- Support for handling DNS resource records for dialing by [
NodeId].
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
+Modules§
- Support for handling DNS resource records for dialing by
NodeId.
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/index.html b/pr/3175/docs/iroh_relay/dns/node_info/index.html
index 811e425492..de2bc673b9 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/index.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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
+
iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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:
_iroh.<z32-node-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-node-id> is the z-base-32 encoding of the [NodeId].
+
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
- 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],
+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_relay/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
index e698c023ef..06c31e13ae 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
@@ -1,22 +1,22 @@
NodeData in iroh_relay::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Available on non-wasm_browser only.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.
-This struct does not include the node’s [NodeId], only the data about a certain
-node. See NodeInfo for a struct that contains a [NodeId] with associated NodeData.
+This includes an optional RelayUrl and a set of direct addresses.
+This struct does not include the node’s NodeId, only the data about a certain
+node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
Implementations§
Source§impl NodeData
Sourcepub fn new(
- relay_url: Option<RelayUrl>,
+ relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> Self
Creates a new NodeData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
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 PartialEq for NodeData
Source§fn eq(&self, other: &NodeData) -> 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,
+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
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
index aab36e8ba7..7fcf12252e 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
@@ -1,25 +1,27 @@
-NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
- pub node_id: NodeId,
+NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
+ pub node_id: NodeId,
pub data: NodeData,
}
Available on non-wasm_browser only.Expand description
Information about a node that may be published to and resolved from discovery services.
-This struct couples a [NodeId] with its associated NodeData.
-Fields§
§node_id: NodeIdFields§
§node_id: NodeIdThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
Source§impl NodeInfo
Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a [NodeAddr] without cloning.
-Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
-Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
-Sourcepub fn to_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated node info.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
+Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a [SecretKey].
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-Trait Implementations§
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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
index 78b2f53295..2f3c047c2a 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
NodeIdExt in iroh_relay::dns::node_info - Rust
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/discovery/struct.NodeData.html b/pr/3175/docs/iroh/discovery/struct.NodeData.html
index 678cd2f23c..d7c9b619a5 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeData.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeData.html
@@ -1,23 +1,23 @@
-NodeData in iroh::discovery - Rust Struct NodeData
pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from 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.
This struct does not include the node’s NodeId, only the data about a certain
node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
-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 and returns the updated node data.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
-pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
-pub fn add_direct_addresses(
+
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.
-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§
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 11c4f1115a..8048525164 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,28 +1,30 @@
-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
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
-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 with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeInfo
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeInfo
Sets the direct addresses and returns the updated node info.
+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.
-Methods from Deref<Target = NodeData>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 1b9af85914..2b3d61aee1 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -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 4ebdaae944..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:
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 06b9550eb8..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,23 +1,23 @@
-NodeData in iroh::dns::node_info - Rust Struct NodeData
pub struct NodeData { /* private fields */ }
Expand description
Data about a node that may be published to and resolved from 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.
This struct does not include the node’s NodeId, only the data about a certain
node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
-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 and returns the updated node data.
-pub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeData
Sets the direct addresses and returns the updated node data.
-pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-pub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
-pub fn add_direct_addresses(
+
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.
-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§
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 3f7ad0075f..6326672170 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,28 +1,30 @@
-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
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
-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 with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeInfo
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeInfo
Sets the direct addresses and returns the updated node info.
+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.
-Methods from Deref<Target = NodeData>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
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 8e40c1e6f2..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,18 +65,18 @@ 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<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<NodeInfo, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+
Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
@@ -85,7 +85,7 @@ pass pub async fn lookup_node_by_id_staggered(
+
Sourcepub async fn lookup_node_by_id_staggered(
&self,
node_id: &PublicKey,
origin: &str,
@@ -95,7 +95,7 @@ summary of all errors otherwise.
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/struct.Endpoint.html b/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
index ee239169ec..a3634ae2cb 100644
--- a/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
@@ -26,7 +26,7 @@ Note that this overrides the current list of ALPNs.
alpn: &[u8],
) -> Result<Connection>Connects to a remote Endpoint.
A value that can be converted into a NodeAddr is required. This can be either a
-NodeAddr, a NodeId or a [iroh_base::ticket::NodeTicket].
+NodeAddr, a NodeId or a iroh_base::ticket::NodeTicket.
The NodeAddr must contain the NodeId to dial and may also contain a RelayUrl
and direct addresses. If direct addresses are provided, they will be used to try and
establish a direct connection without involving a relay server.
diff --git a/pr/3175/docs/iroh/enum.KeyParsingError.html b/pr/3175/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3175/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3175/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust Enum KeyParsingError
pub enum KeyParsingError {
+KeyParsingError in iroh - Rust pub enum KeyParsingError {
Decode(DecodeError),
Key(Error),
DecodeInvalidLength,
@@ -6,7 +6,7 @@
Variants§
§Decode(DecodeError)
Error when decoding.
§Key(Error)
Error when decoding the public key.
§DecodeInvalidLength
The encoded information had the wrong length.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<DecodeError> for KeyParsingError
§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.§impl From<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodeError> for KeyParsingError
Source§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.Source§impl From<Error> for KeyParsingError
Source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
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 66f0aa3e51..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 Struct NodeAddr
pub struct NodeAddr {
+NodeAddr in iroh - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
@@ -27,36 +27,36 @@ whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§relay_url: Option<RelayUrl>The node’s home relay url.
§direct_addresses: BTreeSet<SocketAddr>Socket addresses where the peer might be reached directly.
-Implementations§
§impl NodeAddr
pub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
-pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
-pub fn with_direct_addresses(
+
Implementations§
Source§impl NodeAddr
Sourcepub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
+Sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Adds the given direct addresses.
-pub fn from_parts(
+
Sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
-Trait Implementations§
§impl<'de> Deserialize<'de> for NodeAddr
§fn deserialize<__D>(
+
Sourcepub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
+
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<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
§impl PartialOrd for NodeAddr
Source§impl Serialize for NodeAddr
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 NodeAddr
§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Eq for NodeAddr
Source§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
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.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index d2af005b74..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -1,43 +1,43 @@
-PublicKey in iroh - Rust Struct PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
§impl PublicKey
pub fn public(&self) -> VerifyingKey
Returns the [VerifyingKey] for this PublicKey.
-pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
§Warning
This will return a [SignatureError] if the bytes passed into this method do not represent
a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.
See [VerifyingKey::from_bytes] for details.
-pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
+Sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
§Return
Returns Ok(()) if the signature is valid, and Err otherwise.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for PublicKey
§impl Hash for PublicKey
Source§impl Ord for PublicKey
§impl PartialOrd for PublicKey
Source§impl Serialize for PublicKey
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 Copy for PublicKey
§impl Eq for PublicKey
§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
Source§impl Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
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.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/struct.RelayUrl.html b/pr/3175/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3175/docs/iroh/struct.RelayUrl.html
+++ b/pr/3175/docs/iroh/struct.RelayUrl.html
@@ -1,4 +1,4 @@
-RelayUrl in iroh - Rust Struct RelayUrl
pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
+RelayUrl in iroh - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
It is cheaply clonable, as the underlying type is wrapped into an Arc.
The main type under the hood though is Url, with a few custom tweaks:
@@ -444,30 +444,30 @@ or if Path::new_opt() returns None.
(That is, if the percent-decoded path contains a NUL byte or,
for a Windows path, is not UTF-8.)
This method is only available if the std Cargo feature is enabled.
-
Trait Implementations§
Trait Implementations§
Source§impl Deref for RelayUrl
§impl<'de> Deserialize<'de> for RelayUrl
§fn deserialize<__D>(
+
Source§impl<'de> Deserialize<'de> for RelayUrl
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl FromStr for RelayUrl
Support for parsing strings directly.
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for RelayUrl
Support for parsing strings directly.
If you need more control over the error first create a Url and use RelayUrl::from
instead.
-§impl Hash for RelayUrl
Source§impl Ord for RelayUrl
§impl PartialOrd for RelayUrl
Source§impl Serialize for RelayUrl
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 RelayUrl
§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayUrl
Source§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
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.RelayUrlParseError.html b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3175/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
@@ -1,5 +1,5 @@
-RelayUrlParseError in iroh - Rust Struct RelayUrlParseError
pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
-Trait Implementations§
§impl Debug for RelayUrlParseError
§impl Display for RelayUrlParseError
§impl Error for RelayUrlParseError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<ParseError> for RelayUrlParseError
§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
Blanket Implementations§
Source§impl<T> Any for Twhere
+RelayUrlParseError in iroh - Rust pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
+Trait Implementations§
Source§impl Debug for RelayUrlParseError
Source§impl Display for RelayUrlParseError
Source§impl Error for RelayUrlParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ParseError> for RelayUrlParseError
Source§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
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.SecretKey.html b/pr/3175/docs/iroh/struct.SecretKey.html
index 6c9e0f9879..65f0f97250 100644
--- a/pr/3175/docs/iroh/struct.SecretKey.html
+++ b/pr/3175/docs/iroh/struct.SecretKey.html
@@ -1,24 +1,24 @@
-SecretKey in iroh - Rust Struct SecretKey
pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
-Implementations§
§impl SecretKey
pub fn generate<R>(csprng: R) -> SecretKeywhere
+SecretKey in iroh - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate<R>(csprng: R) -> SecretKeywhere
R: CryptoRngCore,
Generate a new SecretKey with a randomness generator.
// use the OsRng option for OS depedndent most secure RNG.
let mut rng = rand::rngs::OsRng;
let _key = iroh_base::SecretKey::generate(&mut rng);
-Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-pub fn secret(&self) -> &SigningKey
Returns the [SigningKey] for this SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
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
Auto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
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/type.NodeId.html b/pr/3175/docs/iroh/type.NodeId.html
index ab9edbf3b6..1101fcf5e8 100644
--- a/pr/3175/docs/iroh/type.NodeId.html
+++ b/pr/3175/docs/iroh/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh - Rust Type Alias NodeId
pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/3175/docs/iroh_net_report/struct.Client.html b/pr/3175/docs/iroh_net_report/struct.Client.html
index b26f34faf5..4cc1899d63 100644
--- a/pr/3175/docs/iroh_net_report/struct.Client.html
+++ b/pr/3175/docs/iroh_net_report/struct.Client.html
@@ -7,7 +7,7 @@ If all Addr::receive_stun_packet.
Implementations§
Source§impl Client
Sourcepub fn new(
port_mapper: Option<Client>,
- dns_resolver: DnsResolver,
+ dns_resolver: DnsResolver,
ip_mapped_addrs: Option<IpMappedAddresses>,
) -> Result<Self>
Creates a new net_report client.
This starts a connected actor in the background. Once the client is dropped it will
@@ -17,7 +17,7 @@ stop running.
allows sending messages to the actor.
Sourcepub async fn get_report(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
stun_sock_v4: Option<Arc<UdpSocket>>,
stun_sock_v6: Option<Arc<UdpSocket>>,
quic_config: Option<QuicConfig>,
@@ -39,14 +39,14 @@ using QUIC address discovery.
This will attempt to use all probe protocols.
Sourcepub async fn get_report_with_opts(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Arc<Report>>
Runs a net_report, returning the report.
It may not be called concurrently with itself, &mut self takes care of that.
Look at Options for the different configuration options.
Sourcepub async fn get_report_channel(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Receiver<Result<Arc<Report>>>>
Get report with channel
Look at Options for the different configuration options.
diff --git a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
index 8494e5ed26..a2d3b88d82 100644
--- a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
+++ b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
@@ -1,5 +1,5 @@
RelayLatencies in iroh_net_report - Rust pub struct RelayLatencies(/* private fields */);
Expand description
Latencies per relay node.
-Implementations§
Source§impl RelayLatencies
Sourcepub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_
Returns an iterator over all the relays and their latencies.
+Implementations§
Trait Implementations§
Source§impl Clone for RelayLatencies
Source§fn clone(&self) -> RelayLatencies
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 RelayLatencies
Source§impl Default for RelayLatencies
Source§fn default() -> RelayLatencies
Returns the “default value” for a type. Read moreSource§impl PartialEq for RelayLatencies
Source§impl Eq for RelayLatencies
Source§impl StructuralPartialEq for RelayLatencies
Auto Trait Implementations§
§impl Freeze for RelayLatencies
§impl RefUnwindSafe for RelayLatencies
§impl Send for RelayLatencies
§impl Sync for RelayLatencies
§impl Unpin for RelayLatencies
§impl UnwindSafe for RelayLatencies
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_net_report/struct.Report.html b/pr/3175/docs/iroh_net_report/struct.Report.html
index 5a58065db3..ac3dcd8786 100644
--- a/pr/3175/docs/iroh_net_report/struct.Report.html
+++ b/pr/3175/docs/iroh_net_report/struct.Report.html
@@ -11,7 +11,7 @@
pub mapping_varies_by_dest_ipv6: Option<bool>,
pub hair_pinning: Option<bool>,
pub portmap_probe: Option<ProbeOutput>,
- pub preferred_relay: Option<RelayUrl>,
+ pub preferred_relay: Option<RelayUrl>,
pub relay_latency: RelayLatencies,
pub relay_v4_latency: RelayLatencies,
pub relay_v6_latency: RelayLatencies,
@@ -35,7 +35,7 @@ detecting rather than using it. For now.
§hair_pinning: Option<bool>Whether the router supports communicating between two local devices through the NATted
public IP address (on IPv4).
§portmap_probe: Option<ProbeOutput>Probe indicating the presence of port mapping protocols on the LAN.
-§preferred_relay: Option<RelayUrl>None for unknown
+§preferred_relay: Option<RelayUrl>None for unknown
§relay_latency: RelayLatencieskeyed by relay Url
§relay_v4_latency: RelayLatencieskeyed by relay Url
§relay_v6_latency: RelayLatencieskeyed by relay Url
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index bd3dd90464..035d4a5eba 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 675dfc000f..8007446751 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 7307aac7f2..dced614e31 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/index.html b/pr/3175/docs/iroh_relay/dns/index.html
index 0970232562..b08dc85482 100644
--- a/pr/3175/docs/iroh_relay/dns/index.html
+++ b/pr/3175/docs/iroh_relay/dns/index.html
@@ -1,2 +1,2 @@
iroh_relay::dns - Rust Available on non-wasm_browser only.Expand description
DNS resolver
-Modules§
- Support for handling DNS resource records for dialing by [
NodeId].
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
+Modules§
- Support for handling DNS resource records for dialing by
NodeId.
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/index.html b/pr/3175/docs/iroh_relay/dns/node_info/index.html
index 811e425492..de2bc673b9 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/index.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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
+
iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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:
_iroh.<z32-node-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-node-id> is the z-base-32 encoding of the [NodeId].
+
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
- 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],
+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_relay/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
index e698c023ef..06c31e13ae 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
@@ -1,22 +1,22 @@
NodeData in iroh_relay::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Available on non-wasm_browser only.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.
-This struct does not include the node’s [NodeId], only the data about a certain
-node. See NodeInfo for a struct that contains a [NodeId] with associated NodeData.
+This includes an optional RelayUrl and a set of direct addresses.
+This struct does not include the node’s NodeId, only the data about a certain
+node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
Implementations§
Source§impl NodeData
Sourcepub fn new(
- relay_url: Option<RelayUrl>,
+ relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> Self
Creates a new NodeData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
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 PartialEq for NodeData
Source§fn eq(&self, other: &NodeData) -> 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,
+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
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
index aab36e8ba7..7fcf12252e 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
@@ -1,25 +1,27 @@
-NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
- pub node_id: NodeId,
+NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
+ pub node_id: NodeId,
pub data: NodeData,
}
Available on non-wasm_browser only.Expand description
Information about a node that may be published to and resolved from discovery services.
-This struct couples a [NodeId] with its associated NodeData.
-Fields§
§node_id: NodeIdFields§
§node_id: NodeIdThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
Source§impl NodeInfo
Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a [NodeAddr] without cloning.
-Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
-Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
-Sourcepub fn to_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated node info.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
+Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a [SecretKey].
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-Trait Implementations§
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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
index 78b2f53295..2f3c047c2a 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
NodeIdExt in iroh_relay::dns::node_info - Rust
Struct NodeData
pub struct NodeData { /* private fields */ }Expand description
Data about a node that may be published to and resolved from 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.
This struct does not include the node’s NodeId, only the data about a certain
node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
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 and returns the updated node data.
-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 and returns the updated node data.
-pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-pub fn clear_direct_addresses(&mut self)
pub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
-pub fn add_direct_addresses(
+
pub fn add_direct_addresses( +
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.
-pub 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§
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 11c4f1115a..8048525164 100644
--- a/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/discovery/struct.NodeInfo.html
@@ -1,28 +1,30 @@
-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
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
-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 with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeInfo
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeInfo
Sets the direct addresses and returns the updated node info.
+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.
-Methods from Deref<Target = NodeData>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 1b9af85914..2b3d61aee1 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -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
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
-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 with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeInfo
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeInfo
Sets the direct addresses and returns the updated node info.
+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.
-Methods from Deref<Target = NodeData>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3175/docs/iroh/discovery/trait.Discovery.html b/pr/3175/docs/iroh/discovery/trait.Discovery.html
index 1b9af85914..2b3d61aee1 100644
--- a/pr/3175/docs/iroh/discovery/trait.Discovery.html
+++ b/pr/3175/docs/iroh/discovery/trait.Discovery.html
@@ -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:
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 06b9550eb8..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,23 +1,23 @@ -Struct NodeData
pub struct NodeData { /* private fields */ }Expand description
Data about a node that may be published to and resolved from 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.
This struct does not include the node’s NodeId, only the data about a certain
node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
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 and returns the updated node data.
-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 and returns the updated node data.
-pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-pub fn clear_direct_addresses(&mut self)
pub fn clear_direct_addresses(&mut self)
Removes all direct addresses from the node data.
-pub fn add_direct_addresses(
+
pub fn add_direct_addresses( +
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.
-pub 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§
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 3f7ad0075f..6326672170 100644
--- a/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh/dns/node_info/struct.NodeInfo.html
@@ -1,28 +1,30 @@
-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
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
-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 with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeInfo
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeInfo
Sets the direct addresses and returns the updated node info.
+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.
-Methods from Deref<Target = NodeData>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
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 8e40c1e6f2..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(
+
Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub data: NodeData,
}
Expand description
Fields§
§node_id: PublicKeyThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
§impl NodeInfo
pub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
-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 with_relay_url(self, relay_url: impl Into<RelayUrl>) -> NodeInfo
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> NodeInfo
Sets the direct addresses and returns the updated node info.
+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.
-Methods from Deref<Target = NodeData>§
pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
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 8e40c1e6f2..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(
+
pub async fn lookup_ipv4_ipv6_staggered( +
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,18 +65,18 @@ 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,18 +65,18 @@ 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<NodeInfo, Error>
pub async fn lookup_node_by_id( &self, node_id: &PublicKey, origin: &str, ) -> 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(
+
pub async fn lookup_node_by_domain_name( +
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
) -> Result<NodeInfo, Error>
pub async fn lookup_node_by_domain_name( &self, name: &str, ) -> Result<NodeInfo, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+
pub async fn lookup_node_by_domain_name_staggered( +
Sourcepub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
@@ -85,7 +85,7 @@ pass pub async fn lookup_node_by_id_staggered(
+
pub async fn lookup_node_by_domain_name_staggered(
&self,
name: &str,
delays_ms: &[u64],
@@ -85,7 +85,7 @@ pass 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,
@@ -95,7 +95,7 @@ summary of all errors otherwise.
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(
&self,
node_id: &PublicKey,
origin: &str,
@@ -95,7 +95,7 @@ summary of all errors otherwise.
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/struct.Endpoint.html b/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
index ee239169ec..a3634ae2cb 100644
--- a/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
@@ -26,7 +26,7 @@ Note that this overrides the current list of ALPNs.
alpn: &[u8],
) -> Result<Connection>Connects to a remote Endpoint.
A value that can be converted into a NodeAddr is required. This can be either a
-NodeAddr, a NodeId or a [iroh_base::ticket::NodeTicket].
+NodeAddr, a NodeId or a iroh_base::ticket::NodeTicket.
The NodeAddr must contain the NodeId to dial and may also contain a RelayUrl
and direct addresses. If direct addresses are provided, they will be used to try and
establish a direct connection without involving a relay server.
diff --git a/pr/3175/docs/iroh/enum.KeyParsingError.html b/pr/3175/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3175/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3175/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust Enum KeyParsingError
pub enum KeyParsingError {
+KeyParsingError in iroh - Rust pub enum KeyParsingError {
Decode(DecodeError),
Key(Error),
DecodeInvalidLength,
@@ -6,7 +6,7 @@
Variants§
§Decode(DecodeError)
Error when decoding.
§Key(Error)
Error when decoding the public key.
§DecodeInvalidLength
The encoded information had the wrong length.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<DecodeError> for KeyParsingError
§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.§impl From<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodeError> for KeyParsingError
Source§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.Source§impl From<Error> for KeyParsingError
Source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
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 66f0aa3e51..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 Struct NodeAddr
pub struct NodeAddr {
+NodeAddr in iroh - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
@@ -27,36 +27,36 @@ whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§relay_url: Option<RelayUrl>The node’s home relay url.
§direct_addresses: BTreeSet<SocketAddr>Socket addresses where the peer might be reached directly.
-Implementations§
§impl NodeAddr
pub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
-pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
-pub fn with_direct_addresses(
+
Implementations§
Source§impl NodeAddr
Sourcepub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
+Sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Adds the given direct addresses.
-pub fn from_parts(
+
Sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
-Trait Implementations§
§impl<'de> Deserialize<'de> for NodeAddr
§fn deserialize<__D>(
+
Sourcepub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
+
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<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
§impl PartialOrd for NodeAddr
Source§impl Serialize for NodeAddr
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 NodeAddr
§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Eq for NodeAddr
Source§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
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.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index d2af005b74..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -1,43 +1,43 @@
-PublicKey in iroh - Rust Struct PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
§impl PublicKey
pub fn public(&self) -> VerifyingKey
Returns the [VerifyingKey] for this PublicKey.
-pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
§Warning
This will return a [SignatureError] if the bytes passed into this method do not represent
a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.
See [VerifyingKey::from_bytes] for details.
-pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
+Sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
§Return
Returns Ok(()) if the signature is valid, and Err otherwise.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for PublicKey
§impl Hash for PublicKey
Source§impl Ord for PublicKey
§impl PartialOrd for PublicKey
Source§impl Serialize for PublicKey
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 Copy for PublicKey
§impl Eq for PublicKey
§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
Source§impl Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
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.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/struct.RelayUrl.html b/pr/3175/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3175/docs/iroh/struct.RelayUrl.html
+++ b/pr/3175/docs/iroh/struct.RelayUrl.html
@@ -1,4 +1,4 @@
-RelayUrl in iroh - Rust Struct RelayUrl
pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
+RelayUrl in iroh - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
It is cheaply clonable, as the underlying type is wrapped into an Arc.
The main type under the hood though is Url, with a few custom tweaks:
@@ -444,30 +444,30 @@ or if Path::new_opt() returns None.
(That is, if the percent-decoded path contains a NUL byte or,
for a Windows path, is not UTF-8.)
This method is only available if the std Cargo feature is enabled.
-
Trait Implementations§
Trait Implementations§
Source§impl Deref for RelayUrl
§impl<'de> Deserialize<'de> for RelayUrl
§fn deserialize<__D>(
+
Source§impl<'de> Deserialize<'de> for RelayUrl
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl FromStr for RelayUrl
Support for parsing strings directly.
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for RelayUrl
Support for parsing strings directly.
If you need more control over the error first create a Url and use RelayUrl::from
instead.
-§impl Hash for RelayUrl
Source§impl Ord for RelayUrl
§impl PartialOrd for RelayUrl
Source§impl Serialize for RelayUrl
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 RelayUrl
§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayUrl
Source§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
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.RelayUrlParseError.html b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3175/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
@@ -1,5 +1,5 @@
-RelayUrlParseError in iroh - Rust Struct RelayUrlParseError
pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
-Trait Implementations§
§impl Debug for RelayUrlParseError
§impl Display for RelayUrlParseError
§impl Error for RelayUrlParseError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<ParseError> for RelayUrlParseError
§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
Blanket Implementations§
Source§impl<T> Any for Twhere
+RelayUrlParseError in iroh - Rust pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
+Trait Implementations§
Source§impl Debug for RelayUrlParseError
Source§impl Display for RelayUrlParseError
Source§impl Error for RelayUrlParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ParseError> for RelayUrlParseError
Source§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
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.SecretKey.html b/pr/3175/docs/iroh/struct.SecretKey.html
index 6c9e0f9879..65f0f97250 100644
--- a/pr/3175/docs/iroh/struct.SecretKey.html
+++ b/pr/3175/docs/iroh/struct.SecretKey.html
@@ -1,24 +1,24 @@
-SecretKey in iroh - Rust Struct SecretKey
pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
-Implementations§
§impl SecretKey
pub fn generate<R>(csprng: R) -> SecretKeywhere
+SecretKey in iroh - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate<R>(csprng: R) -> SecretKeywhere
R: CryptoRngCore,
Generate a new SecretKey with a randomness generator.
// use the OsRng option for OS depedndent most secure RNG.
let mut rng = rand::rngs::OsRng;
let _key = iroh_base::SecretKey::generate(&mut rng);
-Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-pub fn secret(&self) -> &SigningKey
Returns the [SigningKey] for this SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
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
Auto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
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/type.NodeId.html b/pr/3175/docs/iroh/type.NodeId.html
index ab9edbf3b6..1101fcf5e8 100644
--- a/pr/3175/docs/iroh/type.NodeId.html
+++ b/pr/3175/docs/iroh/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh - Rust Type Alias NodeId
pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/3175/docs/iroh_net_report/struct.Client.html b/pr/3175/docs/iroh_net_report/struct.Client.html
index b26f34faf5..4cc1899d63 100644
--- a/pr/3175/docs/iroh_net_report/struct.Client.html
+++ b/pr/3175/docs/iroh_net_report/struct.Client.html
@@ -7,7 +7,7 @@ If all Addr::receive_stun_packet.
Implementations§
Source§impl Client
Sourcepub fn new(
port_mapper: Option<Client>,
- dns_resolver: DnsResolver,
+ dns_resolver: DnsResolver,
ip_mapped_addrs: Option<IpMappedAddresses>,
) -> Result<Self>
Creates a new net_report client.
This starts a connected actor in the background. Once the client is dropped it will
@@ -17,7 +17,7 @@ stop running.
allows sending messages to the actor.
Sourcepub async fn get_report(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
stun_sock_v4: Option<Arc<UdpSocket>>,
stun_sock_v6: Option<Arc<UdpSocket>>,
quic_config: Option<QuicConfig>,
@@ -39,14 +39,14 @@ using QUIC address discovery.
This will attempt to use all probe protocols.
Sourcepub async fn get_report_with_opts(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Arc<Report>>
Runs a net_report, returning the report.
It may not be called concurrently with itself, &mut self takes care of that.
Look at Options for the different configuration options.
Sourcepub async fn get_report_channel(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Receiver<Result<Arc<Report>>>>
Get report with channel
Look at Options for the different configuration options.
diff --git a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
index 8494e5ed26..a2d3b88d82 100644
--- a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
+++ b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
@@ -1,5 +1,5 @@
RelayLatencies in iroh_net_report - Rust pub struct RelayLatencies(/* private fields */);
Expand description
Latencies per relay node.
-Implementations§
Source§impl RelayLatencies
Sourcepub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_
Returns an iterator over all the relays and their latencies.
+Implementations§
Trait Implementations§
Source§impl Clone for RelayLatencies
Source§fn clone(&self) -> RelayLatencies
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 RelayLatencies
Source§impl Default for RelayLatencies
Source§fn default() -> RelayLatencies
Returns the “default value” for a type. Read moreSource§impl PartialEq for RelayLatencies
Source§impl Eq for RelayLatencies
Source§impl StructuralPartialEq for RelayLatencies
Auto Trait Implementations§
§impl Freeze for RelayLatencies
§impl RefUnwindSafe for RelayLatencies
§impl Send for RelayLatencies
§impl Sync for RelayLatencies
§impl Unpin for RelayLatencies
§impl UnwindSafe for RelayLatencies
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_net_report/struct.Report.html b/pr/3175/docs/iroh_net_report/struct.Report.html
index 5a58065db3..ac3dcd8786 100644
--- a/pr/3175/docs/iroh_net_report/struct.Report.html
+++ b/pr/3175/docs/iroh_net_report/struct.Report.html
@@ -11,7 +11,7 @@
pub mapping_varies_by_dest_ipv6: Option<bool>,
pub hair_pinning: Option<bool>,
pub portmap_probe: Option<ProbeOutput>,
- pub preferred_relay: Option<RelayUrl>,
+ pub preferred_relay: Option<RelayUrl>,
pub relay_latency: RelayLatencies,
pub relay_v4_latency: RelayLatencies,
pub relay_v6_latency: RelayLatencies,
@@ -35,7 +35,7 @@ detecting rather than using it. For now.
§hair_pinning: Option<bool>Whether the router supports communicating between two local devices through the NATted
public IP address (on IPv4).
§portmap_probe: Option<ProbeOutput>Probe indicating the presence of port mapping protocols on the LAN.
-§preferred_relay: Option<RelayUrl>None for unknown
+§preferred_relay: Option<RelayUrl>None for unknown
§relay_latency: RelayLatencieskeyed by relay Url
§relay_v4_latency: RelayLatencieskeyed by relay Url
§relay_v6_latency: RelayLatencieskeyed by relay Url
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index bd3dd90464..035d4a5eba 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 675dfc000f..8007446751 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 7307aac7f2..dced614e31 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/index.html b/pr/3175/docs/iroh_relay/dns/index.html
index 0970232562..b08dc85482 100644
--- a/pr/3175/docs/iroh_relay/dns/index.html
+++ b/pr/3175/docs/iroh_relay/dns/index.html
@@ -1,2 +1,2 @@
iroh_relay::dns - Rust Available on non-wasm_browser only.Expand description
DNS resolver
-Modules§
- Support for handling DNS resource records for dialing by [
NodeId].
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
+Modules§
- Support for handling DNS resource records for dialing by
NodeId.
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/index.html b/pr/3175/docs/iroh_relay/dns/node_info/index.html
index 811e425492..de2bc673b9 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/index.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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
+
iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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:
_iroh.<z32-node-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-node-id> is the z-base-32 encoding of the [NodeId].
+
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
- 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],
+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_relay/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
index e698c023ef..06c31e13ae 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
@@ -1,22 +1,22 @@
NodeData in iroh_relay::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Available on non-wasm_browser only.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.
-This struct does not include the node’s [NodeId], only the data about a certain
-node. See NodeInfo for a struct that contains a [NodeId] with associated NodeData.
+This includes an optional RelayUrl and a set of direct addresses.
+This struct does not include the node’s NodeId, only the data about a certain
+node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
Implementations§
Source§impl NodeData
Sourcepub fn new(
- relay_url: Option<RelayUrl>,
+ relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> Self
Creates a new NodeData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
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 PartialEq for NodeData
Source§fn eq(&self, other: &NodeData) -> 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,
+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
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
index aab36e8ba7..7fcf12252e 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
@@ -1,25 +1,27 @@
-NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
- pub node_id: NodeId,
+NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
+ pub node_id: NodeId,
pub data: NodeData,
}
Available on non-wasm_browser only.Expand description
Information about a node that may be published to and resolved from discovery services.
-This struct couples a [NodeId] with its associated NodeData.
-Fields§
§node_id: NodeIdFields§
§node_id: NodeIdThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
Source§impl NodeInfo
Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a [NodeAddr] without cloning.
-Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
-Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
-Sourcepub fn to_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated node info.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
+Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a [SecretKey].
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-Trait Implementations§
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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
index 78b2f53295..2f3c047c2a 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
NodeIdExt in iroh_relay::dns::node_info - Rust
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh/endpoint/struct.Endpoint.html b/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
index ee239169ec..a3634ae2cb 100644
--- a/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3175/docs/iroh/endpoint/struct.Endpoint.html
@@ -26,7 +26,7 @@ Note that this overrides the current list of ALPNs.
alpn: &[u8],
) -> Result<Connection>Connects to a remote Endpoint.
A value that can be converted into a NodeAddr is required. This can be either a
-NodeAddr, a NodeId or a [iroh_base::ticket::NodeTicket].
+NodeAddr, a NodeId or a iroh_base::ticket::NodeTicket.
The NodeAddr must contain the NodeId to dial and may also contain a RelayUrl
and direct addresses. If direct addresses are provided, they will be used to try and
establish a direct connection without involving a relay server.
diff --git a/pr/3175/docs/iroh/enum.KeyParsingError.html b/pr/3175/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3175/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3175/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust Enum KeyParsingError
pub enum KeyParsingError {
+KeyParsingError in iroh - Rust pub enum KeyParsingError {
Decode(DecodeError),
Key(Error),
DecodeInvalidLength,
@@ -6,7 +6,7 @@
Variants§
§Decode(DecodeError)
Error when decoding.
§Key(Error)
Error when decoding the public key.
§DecodeInvalidLength
The encoded information had the wrong length.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<DecodeError> for KeyParsingError
§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.§impl From<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodeError> for KeyParsingError
Source§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.Source§impl From<Error> for KeyParsingError
Source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
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 66f0aa3e51..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 Struct NodeAddr
pub struct NodeAddr {
+NodeAddr in iroh - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
@@ -27,36 +27,36 @@ whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§relay_url: Option<RelayUrl>The node’s home relay url.
§direct_addresses: BTreeSet<SocketAddr>Socket addresses where the peer might be reached directly.
-Implementations§
§impl NodeAddr
pub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
-pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
-pub fn with_direct_addresses(
+
Implementations§
Source§impl NodeAddr
Sourcepub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
+Sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Adds the given direct addresses.
-pub fn from_parts(
+
Sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
-Trait Implementations§
§impl<'de> Deserialize<'de> for NodeAddr
§fn deserialize<__D>(
+
Sourcepub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
+
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<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
§impl PartialOrd for NodeAddr
Source§impl Serialize for NodeAddr
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 NodeAddr
§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Eq for NodeAddr
Source§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
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.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index d2af005b74..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -1,43 +1,43 @@
-PublicKey in iroh - Rust Struct PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
§impl PublicKey
pub fn public(&self) -> VerifyingKey
Returns the [VerifyingKey] for this PublicKey.
-pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
§Warning
This will return a [SignatureError] if the bytes passed into this method do not represent
a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.
See [VerifyingKey::from_bytes] for details.
-pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
+Sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
§Return
Returns Ok(()) if the signature is valid, and Err otherwise.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for PublicKey
§impl Hash for PublicKey
Source§impl Ord for PublicKey
§impl PartialOrd for PublicKey
Source§impl Serialize for PublicKey
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 Copy for PublicKey
§impl Eq for PublicKey
§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
Source§impl Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
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.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/struct.RelayUrl.html b/pr/3175/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3175/docs/iroh/struct.RelayUrl.html
+++ b/pr/3175/docs/iroh/struct.RelayUrl.html
@@ -1,4 +1,4 @@
-RelayUrl in iroh - Rust Struct RelayUrl
pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
+RelayUrl in iroh - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
It is cheaply clonable, as the underlying type is wrapped into an Arc.
The main type under the hood though is Url, with a few custom tweaks:
@@ -444,30 +444,30 @@ or if Path::new_opt() returns None.
(That is, if the percent-decoded path contains a NUL byte or,
for a Windows path, is not UTF-8.)
This method is only available if the std Cargo feature is enabled.
-
Trait Implementations§
Trait Implementations§
Source§impl Deref for RelayUrl
§impl<'de> Deserialize<'de> for RelayUrl
§fn deserialize<__D>(
+
Source§impl<'de> Deserialize<'de> for RelayUrl
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl FromStr for RelayUrl
Support for parsing strings directly.
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for RelayUrl
Support for parsing strings directly.
If you need more control over the error first create a Url and use RelayUrl::from
instead.
-§impl Hash for RelayUrl
Source§impl Ord for RelayUrl
§impl PartialOrd for RelayUrl
Source§impl Serialize for RelayUrl
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 RelayUrl
§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayUrl
Source§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
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.RelayUrlParseError.html b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3175/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
@@ -1,5 +1,5 @@
-RelayUrlParseError in iroh - Rust Struct RelayUrlParseError
pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
-Trait Implementations§
§impl Debug for RelayUrlParseError
§impl Display for RelayUrlParseError
§impl Error for RelayUrlParseError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<ParseError> for RelayUrlParseError
§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
Blanket Implementations§
Source§impl<T> Any for Twhere
+RelayUrlParseError in iroh - Rust pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
+Trait Implementations§
Source§impl Debug for RelayUrlParseError
Source§impl Display for RelayUrlParseError
Source§impl Error for RelayUrlParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ParseError> for RelayUrlParseError
Source§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
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.SecretKey.html b/pr/3175/docs/iroh/struct.SecretKey.html
index 6c9e0f9879..65f0f97250 100644
--- a/pr/3175/docs/iroh/struct.SecretKey.html
+++ b/pr/3175/docs/iroh/struct.SecretKey.html
@@ -1,24 +1,24 @@
-SecretKey in iroh - Rust Struct SecretKey
pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
-Implementations§
§impl SecretKey
pub fn generate<R>(csprng: R) -> SecretKeywhere
+SecretKey in iroh - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate<R>(csprng: R) -> SecretKeywhere
R: CryptoRngCore,
Generate a new SecretKey with a randomness generator.
// use the OsRng option for OS depedndent most secure RNG.
let mut rng = rand::rngs::OsRng;
let _key = iroh_base::SecretKey::generate(&mut rng);
-Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-pub fn secret(&self) -> &SigningKey
Returns the [SigningKey] for this SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
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
Auto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
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/type.NodeId.html b/pr/3175/docs/iroh/type.NodeId.html
index ab9edbf3b6..1101fcf5e8 100644
--- a/pr/3175/docs/iroh/type.NodeId.html
+++ b/pr/3175/docs/iroh/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh - Rust Type Alias NodeId
pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/3175/docs/iroh_net_report/struct.Client.html b/pr/3175/docs/iroh_net_report/struct.Client.html
index b26f34faf5..4cc1899d63 100644
--- a/pr/3175/docs/iroh_net_report/struct.Client.html
+++ b/pr/3175/docs/iroh_net_report/struct.Client.html
@@ -7,7 +7,7 @@ If all Addr::receive_stun_packet.
Implementations§
Source§impl Client
Sourcepub fn new(
port_mapper: Option<Client>,
- dns_resolver: DnsResolver,
+ dns_resolver: DnsResolver,
ip_mapped_addrs: Option<IpMappedAddresses>,
) -> Result<Self>
Creates a new net_report client.
This starts a connected actor in the background. Once the client is dropped it will
@@ -17,7 +17,7 @@ stop running.
allows sending messages to the actor.
Sourcepub async fn get_report(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
stun_sock_v4: Option<Arc<UdpSocket>>,
stun_sock_v6: Option<Arc<UdpSocket>>,
quic_config: Option<QuicConfig>,
@@ -39,14 +39,14 @@ using QUIC address discovery.
This will attempt to use all probe protocols.
Sourcepub async fn get_report_with_opts(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Arc<Report>>
Runs a net_report, returning the report.
It may not be called concurrently with itself, &mut self takes care of that.
Look at Options for the different configuration options.
Sourcepub async fn get_report_channel(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Receiver<Result<Arc<Report>>>>
Get report with channel
Look at Options for the different configuration options.
diff --git a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
index 8494e5ed26..a2d3b88d82 100644
--- a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
+++ b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
@@ -1,5 +1,5 @@
RelayLatencies in iroh_net_report - Rust pub struct RelayLatencies(/* private fields */);
Expand description
Latencies per relay node.
-Implementations§
Source§impl RelayLatencies
Sourcepub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_
Returns an iterator over all the relays and their latencies.
+Implementations§
Trait Implementations§
Source§impl Clone for RelayLatencies
Source§fn clone(&self) -> RelayLatencies
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 RelayLatencies
Source§impl Default for RelayLatencies
Source§fn default() -> RelayLatencies
Returns the “default value” for a type. Read moreSource§impl PartialEq for RelayLatencies
Source§impl Eq for RelayLatencies
Source§impl StructuralPartialEq for RelayLatencies
Auto Trait Implementations§
§impl Freeze for RelayLatencies
§impl RefUnwindSafe for RelayLatencies
§impl Send for RelayLatencies
§impl Sync for RelayLatencies
§impl Unpin for RelayLatencies
§impl UnwindSafe for RelayLatencies
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_net_report/struct.Report.html b/pr/3175/docs/iroh_net_report/struct.Report.html
index 5a58065db3..ac3dcd8786 100644
--- a/pr/3175/docs/iroh_net_report/struct.Report.html
+++ b/pr/3175/docs/iroh_net_report/struct.Report.html
@@ -11,7 +11,7 @@
pub mapping_varies_by_dest_ipv6: Option<bool>,
pub hair_pinning: Option<bool>,
pub portmap_probe: Option<ProbeOutput>,
- pub preferred_relay: Option<RelayUrl>,
+ pub preferred_relay: Option<RelayUrl>,
pub relay_latency: RelayLatencies,
pub relay_v4_latency: RelayLatencies,
pub relay_v6_latency: RelayLatencies,
@@ -35,7 +35,7 @@ detecting rather than using it. For now.
§hair_pinning: Option<bool>Whether the router supports communicating between two local devices through the NATted
public IP address (on IPv4).
§portmap_probe: Option<ProbeOutput>Probe indicating the presence of port mapping protocols on the LAN.
-§preferred_relay: Option<RelayUrl>None for unknown
+§preferred_relay: Option<RelayUrl>None for unknown
§relay_latency: RelayLatencieskeyed by relay Url
§relay_v4_latency: RelayLatencieskeyed by relay Url
§relay_v6_latency: RelayLatencieskeyed by relay Url
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index bd3dd90464..035d4a5eba 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 675dfc000f..8007446751 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 7307aac7f2..dced614e31 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/index.html b/pr/3175/docs/iroh_relay/dns/index.html
index 0970232562..b08dc85482 100644
--- a/pr/3175/docs/iroh_relay/dns/index.html
+++ b/pr/3175/docs/iroh_relay/dns/index.html
@@ -1,2 +1,2 @@
iroh_relay::dns - Rust Available on non-wasm_browser only.Expand description
DNS resolver
-Modules§
- Support for handling DNS resource records for dialing by [
NodeId].
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
+Modules§
- Support for handling DNS resource records for dialing by
NodeId.
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/index.html b/pr/3175/docs/iroh_relay/dns/node_info/index.html
index 811e425492..de2bc673b9 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/index.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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
+
iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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:
_iroh.<z32-node-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-node-id> is the z-base-32 encoding of the [NodeId].
+
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
- 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],
+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_relay/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
index e698c023ef..06c31e13ae 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
@@ -1,22 +1,22 @@
NodeData in iroh_relay::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Available on non-wasm_browser only.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.
-This struct does not include the node’s [NodeId], only the data about a certain
-node. See NodeInfo for a struct that contains a [NodeId] with associated NodeData.
+This includes an optional RelayUrl and a set of direct addresses.
+This struct does not include the node’s NodeId, only the data about a certain
+node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
Implementations§
Source§impl NodeData
Sourcepub fn new(
- relay_url: Option<RelayUrl>,
+ relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> Self
Creates a new NodeData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
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 PartialEq for NodeData
Source§fn eq(&self, other: &NodeData) -> 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,
+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
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
index aab36e8ba7..7fcf12252e 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
@@ -1,25 +1,27 @@
-NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
- pub node_id: NodeId,
+NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
+ pub node_id: NodeId,
pub data: NodeData,
}
Available on non-wasm_browser only.Expand description
Information about a node that may be published to and resolved from discovery services.
-This struct couples a [NodeId] with its associated NodeData.
-Fields§
§node_id: NodeIdFields§
§node_id: NodeIdThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
Source§impl NodeInfo
Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a [NodeAddr] without cloning.
-Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
-Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
-Sourcepub fn to_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated node info.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
+Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a [SecretKey].
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-Trait Implementations§
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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
index 78b2f53295..2f3c047c2a 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
NodeIdExt in iroh_relay::dns::node_info - Rust
Connects to a remote Endpoint.
A value that can be converted into a NodeAddr is required. This can be either a
-NodeAddr, a NodeId or a [iroh_base::ticket::NodeTicket].
NodeAddr, a NodeId or a iroh_base::ticket::NodeTicket.
The NodeAddr must contain the NodeId to dial and may also contain a RelayUrl
and direct addresses. If direct addresses are provided, they will be used to try and
establish a direct connection without involving a relay server.
Enum KeyParsingError
pub enum KeyParsingError {
+KeyParsingError in iroh - Rust pub enum KeyParsingError {
Decode(DecodeError),
Key(Error),
DecodeInvalidLength,
@@ -6,7 +6,7 @@
Variants§
§Decode(DecodeError)
Error when decoding.
§Key(Error)
Error when decoding the public key.
§DecodeInvalidLength
The encoded information had the wrong length.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<DecodeError> for KeyParsingError
§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.§impl From<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<DecodeError> for KeyParsingError
Source§fn from(source: DecodeError) -> KeyParsingError
Converts to this type from the input type.Source§impl From<Error> for KeyParsingError
Source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl !RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl !UnwindSafe for KeyParsingError
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 66f0aa3e51..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 Struct NodeAddr
pub struct NodeAddr {
+NodeAddr in iroh - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
@@ -27,36 +27,36 @@ whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§relay_url: Option<RelayUrl>The node’s home relay url.
§direct_addresses: BTreeSet<SocketAddr>Socket addresses where the peer might be reached directly.
-Implementations§
§impl NodeAddr
pub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
-pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
-pub fn with_direct_addresses(
+
Implementations§
Source§impl NodeAddr
Sourcepub fn new(node_id: PublicKey) -> NodeAddr
Creates a new NodeAddr with no relay_url and no direct_addresses.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url.
+Sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Adds the given direct addresses.
-pub fn from_parts(
+
Sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: impl IntoIterator<Item = SocketAddr>,
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
-Trait Implementations§
§impl<'de> Deserialize<'de> for NodeAddr
§fn deserialize<__D>(
+
Sourcepub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of this peer.
+
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<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
§impl PartialOrd for NodeAddr
Source§impl Serialize for NodeAddr
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 NodeAddr
§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Eq for NodeAddr
Source§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
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.PublicKey.html b/pr/3175/docs/iroh/struct.PublicKey.html
index d2af005b74..37a945e28e 100644
--- a/pr/3175/docs/iroh/struct.PublicKey.html
+++ b/pr/3175/docs/iroh/struct.PublicKey.html
@@ -1,43 +1,43 @@
-PublicKey in iroh - Rust Struct PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
§impl PublicKey
pub fn public(&self) -> VerifyingKey
Returns the [VerifyingKey] for this PublicKey.
-pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
§Warning
This will return a [SignatureError] if the bytes passed into this method do not represent
a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.
See [VerifyingKey::from_bytes] for details.
-pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
+Sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
§Return
Returns Ok(()) if the signature is valid, and Err otherwise.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for PublicKey
§impl Hash for PublicKey
Source§impl Ord for PublicKey
§impl PartialOrd for PublicKey
Source§impl Serialize for PublicKey
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 Copy for PublicKey
§impl Eq for PublicKey
§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
Source§impl Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
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.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/struct.RelayUrl.html b/pr/3175/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3175/docs/iroh/struct.RelayUrl.html
+++ b/pr/3175/docs/iroh/struct.RelayUrl.html
@@ -1,4 +1,4 @@
-RelayUrl in iroh - Rust Struct RelayUrl
pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
+RelayUrl in iroh - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
It is cheaply clonable, as the underlying type is wrapped into an Arc.
The main type under the hood though is Url, with a few custom tweaks:
@@ -444,30 +444,30 @@ or if Path::new_opt() returns None.
(That is, if the percent-decoded path contains a NUL byte or,
for a Windows path, is not UTF-8.)
This method is only available if the std Cargo feature is enabled.
-
Trait Implementations§
Trait Implementations§
Source§impl Deref for RelayUrl
§impl<'de> Deserialize<'de> for RelayUrl
§fn deserialize<__D>(
+
Source§impl<'de> Deserialize<'de> for RelayUrl
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl FromStr for RelayUrl
Support for parsing strings directly.
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read moreSource§impl FromStr for RelayUrl
Support for parsing strings directly.
If you need more control over the error first create a Url and use RelayUrl::from
instead.
-§impl Hash for RelayUrl
Source§impl Ord for RelayUrl
§impl PartialOrd for RelayUrl
Source§impl Serialize for RelayUrl
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 RelayUrl
§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
Source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moreSource§impl Eq for RelayUrl
Source§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
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.RelayUrlParseError.html b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3175/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3175/docs/iroh/struct.RelayUrlParseError.html
@@ -1,5 +1,5 @@
-RelayUrlParseError in iroh - Rust Struct RelayUrlParseError
pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
-Trait Implementations§
§impl Debug for RelayUrlParseError
§impl Display for RelayUrlParseError
§impl Error for RelayUrlParseError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<ParseError> for RelayUrlParseError
§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
Blanket Implementations§
Source§impl<T> Any for Twhere
+RelayUrlParseError in iroh - Rust pub struct RelayUrlParseError(/* private fields */);
Expand description
Can occur when parsing a string into a RelayUrl.
+Trait Implementations§
Source§impl Debug for RelayUrlParseError
Source§impl Display for RelayUrlParseError
Source§impl Error for RelayUrlParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<ParseError> for RelayUrlParseError
Source§fn from(source: ParseError) -> RelayUrlParseError
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for RelayUrlParseError
§impl RefUnwindSafe for RelayUrlParseError
§impl Send for RelayUrlParseError
§impl Sync for RelayUrlParseError
§impl Unpin for RelayUrlParseError
§impl UnwindSafe for RelayUrlParseError
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.SecretKey.html b/pr/3175/docs/iroh/struct.SecretKey.html
index 6c9e0f9879..65f0f97250 100644
--- a/pr/3175/docs/iroh/struct.SecretKey.html
+++ b/pr/3175/docs/iroh/struct.SecretKey.html
@@ -1,24 +1,24 @@
-SecretKey in iroh - Rust Struct SecretKey
pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
-Implementations§
§impl SecretKey
pub fn generate<R>(csprng: R) -> SecretKeywhere
+SecretKey in iroh - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate<R>(csprng: R) -> SecretKeywhere
R: CryptoRngCore,
Generate a new SecretKey with a randomness generator.
// use the OsRng option for OS depedndent most secure RNG.
let mut rng = rand::rngs::OsRng;
let _key = iroh_base::SecretKey::generate(&mut rng);
-Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-pub fn secret(&self) -> &SigningKey
Returns the [SigningKey] for this SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
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
Auto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
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/type.NodeId.html b/pr/3175/docs/iroh/type.NodeId.html
index ab9edbf3b6..1101fcf5e8 100644
--- a/pr/3175/docs/iroh/type.NodeId.html
+++ b/pr/3175/docs/iroh/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh - Rust Type Alias NodeId
pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/3175/docs/iroh_net_report/struct.Client.html b/pr/3175/docs/iroh_net_report/struct.Client.html
index b26f34faf5..4cc1899d63 100644
--- a/pr/3175/docs/iroh_net_report/struct.Client.html
+++ b/pr/3175/docs/iroh_net_report/struct.Client.html
@@ -7,7 +7,7 @@ If all Addr::receive_stun_packet.
Implementations§
Source§impl Client
Sourcepub fn new(
port_mapper: Option<Client>,
- dns_resolver: DnsResolver,
+ dns_resolver: DnsResolver,
ip_mapped_addrs: Option<IpMappedAddresses>,
) -> Result<Self>
Creates a new net_report client.
This starts a connected actor in the background. Once the client is dropped it will
@@ -17,7 +17,7 @@ stop running.
allows sending messages to the actor.
Sourcepub async fn get_report(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
stun_sock_v4: Option<Arc<UdpSocket>>,
stun_sock_v6: Option<Arc<UdpSocket>>,
quic_config: Option<QuicConfig>,
@@ -39,14 +39,14 @@ using QUIC address discovery.
This will attempt to use all probe protocols.
Sourcepub async fn get_report_with_opts(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Arc<Report>>
Runs a net_report, returning the report.
It may not be called concurrently with itself, &mut self takes care of that.
Look at Options for the different configuration options.
Sourcepub async fn get_report_channel(
&mut self,
- relay_map: RelayMap,
+ relay_map: RelayMap,
opts: Options,
) -> Result<Receiver<Result<Arc<Report>>>>
Get report with channel
Look at Options for the different configuration options.
diff --git a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
index 8494e5ed26..a2d3b88d82 100644
--- a/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
+++ b/pr/3175/docs/iroh_net_report/struct.RelayLatencies.html
@@ -1,5 +1,5 @@
RelayLatencies in iroh_net_report - Rust pub struct RelayLatencies(/* private fields */);
Expand description
Latencies per relay node.
-Implementations§
Source§impl RelayLatencies
Sourcepub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_
Returns an iterator over all the relays and their latencies.
+Implementations§
Trait Implementations§
Source§impl Clone for RelayLatencies
Source§fn clone(&self) -> RelayLatencies
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 RelayLatencies
Source§impl Default for RelayLatencies
Source§fn default() -> RelayLatencies
Returns the “default value” for a type. Read moreSource§impl PartialEq for RelayLatencies
Source§impl Eq for RelayLatencies
Source§impl StructuralPartialEq for RelayLatencies
Auto Trait Implementations§
§impl Freeze for RelayLatencies
§impl RefUnwindSafe for RelayLatencies
§impl Send for RelayLatencies
§impl Sync for RelayLatencies
§impl Unpin for RelayLatencies
§impl UnwindSafe for RelayLatencies
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_net_report/struct.Report.html b/pr/3175/docs/iroh_net_report/struct.Report.html
index 5a58065db3..ac3dcd8786 100644
--- a/pr/3175/docs/iroh_net_report/struct.Report.html
+++ b/pr/3175/docs/iroh_net_report/struct.Report.html
@@ -11,7 +11,7 @@
pub mapping_varies_by_dest_ipv6: Option<bool>,
pub hair_pinning: Option<bool>,
pub portmap_probe: Option<ProbeOutput>,
- pub preferred_relay: Option<RelayUrl>,
+ pub preferred_relay: Option<RelayUrl>,
pub relay_latency: RelayLatencies,
pub relay_v4_latency: RelayLatencies,
pub relay_v6_latency: RelayLatencies,
@@ -35,7 +35,7 @@ detecting rather than using it. For now.
§hair_pinning: Option<bool>Whether the router supports communicating between two local devices through the NATted
public IP address (on IPv4).
§portmap_probe: Option<ProbeOutput>Probe indicating the presence of port mapping protocols on the LAN.
-§preferred_relay: Option<RelayUrl>None for unknown
+§preferred_relay: Option<RelayUrl>None for unknown
§relay_latency: RelayLatencieskeyed by relay Url
§relay_v4_latency: RelayLatencieskeyed by relay Url
§relay_v6_latency: RelayLatencieskeyed by relay Url
diff --git a/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3175/docs/iroh_relay/client/enum.ReceivedMessage.html
index bd3dd90464..035d4a5eba 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 675dfc000f..8007446751 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 7307aac7f2..dced614e31 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/index.html b/pr/3175/docs/iroh_relay/dns/index.html
index 0970232562..b08dc85482 100644
--- a/pr/3175/docs/iroh_relay/dns/index.html
+++ b/pr/3175/docs/iroh_relay/dns/index.html
@@ -1,2 +1,2 @@
iroh_relay::dns - Rust Available on non-wasm_browser only.Expand description
DNS resolver
-Modules§
- Support for handling DNS resource records for dialing by [
NodeId].
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
+Modules§
- Support for handling DNS resource records for dialing by
NodeId.
Structs§
- The DNS resolver used throughout
iroh. - Record data for a TXT record
- TXT records returned from
DnsResolver::lookup_txt
Constants§
- The n0 testing DNS node origin, for production.
- The n0 testing DNS node origin, for testing.
\ No newline at end of file
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/index.html b/pr/3175/docs/iroh_relay/dns/node_info/index.html
index 811e425492..de2bc673b9 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/index.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/index.html
@@ -1,5 +1,5 @@
-iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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
+
iroh_relay::dns::node_info - Rust Available on non-wasm_browser only.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:
_iroh.<z32-node-id>.<origin-domain> TXT
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
_iroh is the record name as defined by IROH_TXT_NAME.
-<z32-node-id> is the z-base-32 encoding of the [NodeId].
+
<origin-domain> is the domain name of the publishing DNS server,
@@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in RFC1464. The following attributes are defined:
- 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],
+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_relay/dns/node_info/struct.NodeData.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
index e698c023ef..06c31e13ae 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeData.html
@@ -1,22 +1,22 @@
NodeData in iroh_relay::dns::node_info - Rust pub struct NodeData { /* private fields */ }
Available on non-wasm_browser only.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.
-This struct does not include the node’s [NodeId], only the data about a certain
-node. See NodeInfo for a struct that contains a [NodeId] with associated NodeData.
+This includes an optional RelayUrl and a set of direct addresses.
+This struct does not include the node’s NodeId, only the data about a certain
+node. See NodeInfo for a struct that contains a NodeId with associated NodeData.
Implementations§
Source§impl NodeData
Sourcepub fn new(
- relay_url: Option<RelayUrl>,
+ relay_url: Option<RelayUrl>,
direct_addresses: BTreeSet<SocketAddr>,
) -> Self
Creates a new NodeData with a relay URL and a set of direct addresses.
-Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
+Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node data.
Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
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 PartialEq for NodeData
Source§fn eq(&self, other: &NodeData) -> 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,
+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
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
index aab36e8ba7..7fcf12252e 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/struct.NodeInfo.html
@@ -1,25 +1,27 @@
-NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
- pub node_id: NodeId,
+NodeInfo in iroh_relay::dns::node_info - Rust pub struct NodeInfo {
+ pub node_id: NodeId,
pub data: NodeData,
}
Available on non-wasm_browser only.Expand description
Information about a node that may be published to and resolved from discovery services.
-This struct couples a [NodeId] with its associated NodeData.
-Fields§
§node_id: NodeIdFields§
§node_id: NodeIdThe NodeId.
§data: NodeDataThe information published about the node.
-Implementations§
Source§impl NodeInfo
Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a [NodeAddr] without cloning.
-Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
-Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
-Sourcepub fn to_pkarr_signed_packet(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn with_relay_url(self, relay_url: impl Into<RelayUrl>) -> Self
Sets the relay URL and returns the updated node info.
+Sourcepub fn with_direct_addrs(self, direct_addrs: BTreeSet<SocketAddr>) -> Self
Sets the direct addresses and returns the updated node info.
+Sourcepub fn into_node_addr(self) -> NodeAddr
Converts into a NodeAddr without cloning.
+Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(packet: &SignedPacket) -> Result<Self>
Parses a NodeInfo from a [pkarr::SignedPacket].
+Sourcepub fn to_pkarr_signed_packet(
&self,
- secret_key: &SecretKey,
+ secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket>
Creates a [pkarr::SignedPacket].
-This constructs a DNS packet and signs it with a [SecretKey].
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = NodeData>§
Sourcepub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>
Returns the direct addresses of the node.
-Trait Implementations§
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,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
index 78b2f53295..2f3c047c2a 100644
--- a/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3175/docs/iroh_relay/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
NodeIdExt in iroh_relay::dns::node_info - Rust