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/3170/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html b/pr/3170/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html index a803eee012..ed94b0aecf 100644 --- a/pr/3170/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html +++ b/pr/3170/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/3170/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3170/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html index b2c917a0a7..152a73a783 100644 --- a/pr/3170/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html +++ b/pr/3170/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.
+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/3170/docs/iroh/dns/node_info/struct.NodeInfo.html b/pr/3170/docs/iroh/dns/node_info/struct.NodeInfo.html index 1fcf1b7679..c165ee5553 100644 --- a/pr/3170/docs/iroh/dns/node_info/struct.NodeInfo.html +++ b/pr/3170/docs/iroh/dns/node_info/struct.NodeInfo.html @@ -1,4 +1,4 @@ -Struct NodeInfo
pub struct NodeInfo {
+NodeInfo in iroh::dns::node_info - Rust pub struct NodeInfo {
pub node_id: PublicKey,
pub relay_url: Option<Url>,
pub direct_addresses: BTreeSet<SocketAddr>,
@@ -6,24 +6,24 @@
Fields§
§node_id: PublicKeyThe NodeId.
§relay_url: Option<Url>The advertised home relay server.
§direct_addresses: BTreeSet<SocketAddr>Any direct addresses.
-Implementations§
§impl NodeInfo
pub fn new(
+
Implementations§
Source§impl NodeInfo
Sourcepub fn new(
node_id: PublicKey,
relay_url: Option<Url>,
direct_addresses: BTreeSet<SocketAddr>,
) -> NodeInfo
Creates a new NodeInfo from its parts.
-pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
-pub fn from_pkarr_signed_packet(
+
Sourcepub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, Error>
Parses a NodeInfo from a TXT records lookup.
+Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<NodeInfo, Error>
Parses a NodeInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, Error>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
impl Eq for NodeInfo
impl StructuralPartialEq for NodeInfo
Auto Trait Implementations§
impl Freeze for NodeInfo
impl RefUnwindSafe for NodeInfo
impl Send for NodeInfo
impl Sync for NodeInfo
impl Unpin for NodeInfo
impl UnwindSafe for NodeInfo
Blanket Implementations§
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§
§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/3170/docs/iroh/dns/node_info/trait.NodeIdExt.html b/pr/3170/docs/iroh/dns/node_info/trait.NodeIdExt.html
index 5edbdbf888..ffa859e401 100644
--- a/pr/3170/docs/iroh/dns/node_info/trait.NodeIdExt.html
+++ b/pr/3170/docs/iroh/dns/node_info/trait.NodeIdExt.html
@@ -1,9 +1,9 @@
-NodeIdExt in iroh::dns::node_info - Rust Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
\ No newline at end of file
+
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Trait NodeIdExt
pub trait NodeIdExt {
+NodeIdExt in iroh::dns::node_info - Rust pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
fn from_z32(s: &str) -> Result<PublicKey, Error>;
}
Expand description
Extension methods for NodeId to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
-Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
\ No newline at end of file
+Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Struct DnsResolver
pub struct DnsResolver(/* private fields */);Expand description
The DNS resolver used throughout iroh.
Implementations§
§impl DnsResolver
impl DnsResolver
pub fn new() -> DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
+pub struct DnsResolver(/* private fields */);Expand description
The DNS resolver used throughout iroh.
Implementations§
Source§impl DnsResolver
impl DnsResolver
Sourcepub fn new() -> DnsResolver
pub fn new() -> DnsResolver
Create a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
-pub fn clear_cache(&self)
pub fn clear_cache(&self)
Removes all entries from the cache.
-pub async fn lookup_txt(
+
pub async fn lookup_txt( +
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Create a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt(
&self,
host: impl ToString,
timeout: Duration,
-) -> Result<TxtLookup, Error>
pub async fn lookup_txt( &self, host: impl ToString, timeout: Duration, -) -> Result<TxtLookup, Error>
Lookup a TXT record.
-pub async fn lookup_ipv4(
+) -> Result<TxtLookup, Error>
pub async fn lookup_ipv4( +) -> Result<TxtLookup, Error>
Lookup a TXT record.
+Sourcepub async fn lookup_ipv4(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
pub async fn lookup_ipv4( &self, host: impl ToString, timeout: Duration, ) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv4 lookup with a timeout.
-pub async fn lookup_ipv6(
+
pub async fn lookup_ipv6( +
Sourcepub async fn lookup_ipv6(
&self,
host: impl ToString,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr>, Error>
pub async fn lookup_ipv6( &self, host: impl ToString, timeout: Duration, ) -> Result<impl Iterator<Item = IpAddr>, Error>
Perform an ipv6 lookup with a timeout.
-pub async fn lookup_ipv4_ipv6(
+
pub async fn lookup_ipv4_ipv6( +
Sourcepub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn lookup_ipv4_ipv6(
&self,
host: impl ToString,
timeout: Duration,
@@ -28,13 +28,13 @@ to the default ResolverConfig which uses eg. to google’s 8.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
pub async fn resolve_host(
+
pub async fn resolve_host( +
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, Error>
pub async fn resolve_host( &self, url: &Url, prefer_ipv6: bool, timeout: Duration, ) -> Result<IpAddr, Error>
Resolve a hostname from a URL to an IP address.
-pub async fn lookup_ipv4_staggered(
+
pub async fn lookup_ipv4_staggered( +
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -44,7 +44,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
+
pub async fn lookup_ipv6_staggered( +
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -54,7 +54,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
+
pub async fn lookup_ipv4_ipv6_staggered( +
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -65,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<NodeAddr, Error>
pub async fn lookup_node_by_id( &self, node_id: &PublicKey, origin: &str, ) -> Result<NodeAddr, Error>
Looks up node info by NodeId and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
pub async fn lookup_node_by_domain_name(
+
pub async fn lookup_node_by_domain_name( +
Sourcepub async fn lookup_node_by_domain_name(
&self,
name: &str,
) -> Result<NodeAddr, Error>
pub async fn lookup_node_by_domain_name( &self, name: &str, ) -> Result<NodeAddr, Error>
Looks up node info by DNS name.
-pub async fn lookup_node_by_domain_name_staggered(
+
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/3170/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/3170/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index f4fe54939f..aed1e9203b 100644
--- a/pr/3170/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/3170/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3170/docs/iroh/endpoint/enum.RelayMode.html b/pr/3170/docs/iroh/endpoint/enum.RelayMode.html
index f40970bda9..3004798d5b 100644
--- a/pr/3170/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/3170/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -9,9 +9,9 @@
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
index 7f34eb1f35..e407801987 100644
--- a/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
index 9d8f011b56..956f47bdfc 100644
--- a/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3170/docs/iroh/endpoint/index.html b/pr/3170/docs/iroh/endpoint/index.html
index 49964ff471..4b1d20f3cd 100644
--- a/pr/3170/docs/iroh/endpoint/index.html
+++ b/pr/3170/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh nodes.
+iroh::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh nodes.
The Endpoint is the main API interface to manage a local iroh node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh connections work.
diff --git a/pr/3170/docs/iroh/endpoint/struct.Accept.html b/pr/3170/docs/iroh/endpoint/struct.Accept.html
index 3043db955a..43cb49d052 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh::endpoint - Rust pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
+Accept in iroh::endpoint - Rust pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
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/3170/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
index 4a1cc9cf7e..c69f2bc650 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default TransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: Arc<TransportConfig>,
) -> Self
Sets the QUIC transport config options for this connection.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a 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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/struct.Connecting.html b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
index 15046b1427..8c95830c78 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
@@ -1,5 +1,5 @@
-Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl !UnwindSafe for Connecting
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/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/3170/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/3170/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index f4fe54939f..aed1e9203b 100644
--- a/pr/3170/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/3170/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3170/docs/iroh/endpoint/enum.RelayMode.html b/pr/3170/docs/iroh/endpoint/enum.RelayMode.html
index f40970bda9..3004798d5b 100644
--- a/pr/3170/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/3170/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -9,9 +9,9 @@
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
index 7f34eb1f35..e407801987 100644
--- a/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
index 9d8f011b56..956f47bdfc 100644
--- a/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3170/docs/iroh/endpoint/index.html b/pr/3170/docs/iroh/endpoint/index.html
index 49964ff471..4b1d20f3cd 100644
--- a/pr/3170/docs/iroh/endpoint/index.html
+++ b/pr/3170/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh nodes.
+iroh::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh nodes.
The Endpoint is the main API interface to manage a local iroh node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh connections work.
diff --git a/pr/3170/docs/iroh/endpoint/struct.Accept.html b/pr/3170/docs/iroh/endpoint/struct.Accept.html
index 3043db955a..43cb49d052 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh::endpoint - Rust pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
+Accept in iroh::endpoint - Rust pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
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/3170/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
index 4a1cc9cf7e..c69f2bc650 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default TransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: Arc<TransportConfig>,
) -> Self
Sets the QUIC transport config options for this connection.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a 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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/struct.Connecting.html b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
index 15046b1427..8c95830c78 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
@@ -1,5 +1,5 @@
-Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl !UnwindSafe for Connecting
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/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";Expand description
Environment variable to force the use of staging relays.
+pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -9,9 +9,9 @@
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-Implementations§
Trait Implementations§
impl Eq for RelayMode
impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
impl Freeze for RelayMode
impl RefUnwindSafe for RelayMode
impl Send for RelayMode
impl Sync for RelayMode
impl Unpin for RelayMode
impl UnwindSafe for RelayMode
Blanket Implementations§
Implementations§
Trait Implementations§
impl Eq for RelayMode
impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
impl Freeze for RelayMode
impl RefUnwindSafe for RelayMode
impl Send for RelayMode
impl Sync for RelayMode
impl Unpin for RelayMode
impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
index 7f34eb1f35..e407801987 100644
--- a/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/3170/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
index 9d8f011b56..956f47bdfc 100644
--- a/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/3170/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3170/docs/iroh/endpoint/index.html b/pr/3170/docs/iroh/endpoint/index.html
index 49964ff471..4b1d20f3cd 100644
--- a/pr/3170/docs/iroh/endpoint/index.html
+++ b/pr/3170/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh nodes.
+iroh::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh nodes.
The Endpoint is the main API interface to manage a local iroh node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh connections work.
diff --git a/pr/3170/docs/iroh/endpoint/struct.Accept.html b/pr/3170/docs/iroh/endpoint/struct.Accept.html
index 3043db955a..43cb49d052 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh::endpoint - Rust pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
+Accept in iroh::endpoint - Rust pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
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/3170/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
index 4a1cc9cf7e..c69f2bc650 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default TransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: Arc<TransportConfig>,
) -> Self
Sets the QUIC transport config options for this connection.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a 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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/struct.Connecting.html b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
index 15046b1427..8c95830c78 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
@@ -1,5 +1,5 @@
-Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl !UnwindSafe for Connecting
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/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub fn default_relay_mode() -> RelayModeExpand description
Returns the default relay mode.
+pub fn force_staging_infra() -> boolExpand description
Returns true if the use of staging relays is forced.
Expand description
The Endpoint allows establishing connections to other iroh nodes.
Expand description
The Endpoint allows establishing connections to other iroh nodes.
The Endpoint is the main API interface to manage a local iroh node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh connections work.
pub struct Accept<'a> { /* private fields */ }Expand description
Future produced by Endpoint::accept.
Trait Implementations§
impl<'pin, 'a> Unpin for Accept<'a>where
+Accept in iroh::endpoint - Rust pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
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/3170/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
index 4a1cc9cf7e..c69f2bc650 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default TransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: Arc<TransportConfig>,
) -> Self
Sets the QUIC transport config options for this connection.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a 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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/struct.Connecting.html b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
index 15046b1427..8c95830c78 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
@@ -1,5 +1,5 @@
-Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl !UnwindSafe for Connecting
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/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub struct Accept<'a> { /* private fields */ }Expand description
Future produced by Endpoint::accept.
Trait Implementations§
impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
impl<'a> !Freeze for Accept<'a>
impl<'a> !RefUnwindSafe for Accept<'a>
impl<'a> Send for Accept<'a>
impl<'a> Sync for Accept<'a>
impl<'a> !UnwindSafe for Accept<'a>
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/3170/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
index 4a1cc9cf7e..c69f2bc650 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default TransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: Arc<TransportConfig>,
) -> Self
Sets the QUIC transport config options for this connection.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a 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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/struct.Connecting.html b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
index 15046b1427..8c95830c78 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
@@ -1,5 +1,5 @@
-Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl !UnwindSafe for Connecting
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/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
index 4a1cc9cf7e..c69f2bc650 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default TransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: Arc<TransportConfig>,
) -> Self
Sets the QUIC transport config options for this connection.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
Returns a 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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/struct.Connecting.html b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
index 15046b1427..8c95830c78 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
@@ -1,5 +1,5 @@
-Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl !UnwindSafe for Connecting
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/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub struct ConnectOptions { /* private fields */ }Expand description
Options for the Endpoint::connect_with_opts function.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Initializes new connection options.
+pub struct ConnectOptions { /* private fields */ }Expand description
Options for the Endpoint::connect_with_opts function.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default TransportConfig.
Sourcepub fn with_transport_config(
+
pub fn with_transport_config( +
Sourcepub fn with_transport_config(
self,
transport_config: Arc<TransportConfig>,
) -> Self
pub fn with_transport_config( self, transport_config: Arc<TransportConfig>, ) -> Self
Sets the QUIC transport config options for this connection.
-Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
fn default() -> ConnectOptions
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl !RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
fn default() -> ConnectOptions
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl !RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl !UnwindSafe for ConnectOptions
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/3170/docs/iroh/endpoint/struct.Connecting.html b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
index 15046b1427..8c95830c78 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connecting.html
@@ -1,5 +1,5 @@
-Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl !UnwindSafe for Connecting
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/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub struct Connecting { /* private fields */ }Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
pub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
pub struct Connecting { /* private fields */ }Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
pub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
pub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
impl Debug for Connecting
Source§impl Future for Connecting
impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
pub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Debug for Connecting
impl Debug for Connecting
Source§impl Future for Connecting
impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
impl Freeze for Connecting
impl !RefUnwindSafe for Connecting
impl Send for Connecting
impl Sync for Connecting
impl !UnwindSafe for Connecting
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/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3170/docs/iroh/endpoint/struct.Connection.html b/pr/3170/docs/iroh/endpoint/struct.Connection.html
index 30e398c012..f3399cac5e 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
Implementations§
Source§impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
@@ -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.
@@ -193,18 +193,33 @@ function allows for notifying iroh of any potential network changes like
this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be
acknowledged by the peers, re-transmitting them if needed. This ensures the
peers are aware of the closed connections instead of having to wait for a timeout
-on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
-Sourcepub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future
+finishes.
+The maximum time-out that this future will wait for depends on QUIC transport
+configurations of non-drained connections at the time of calling, and their current
+estimates of round trip time. With default parameters and a conservative estimate
+of round trip time, this call’s future should take 3 seconds to resolve in cases of
+bad connectivity or failed connections. In the usual case, this call’s future should
+return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible.
+Not doing so will make connections that were still open while closing the endpoint
+time out on the remote end. Thus remote ends will assume connections to have failed
+even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
+for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP
+sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
+while TCP sockets usually get closed and drained by the operating system in the
+kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub struct Connection { /* private fields */ }Expand description
A QUIC connection.
+pub struct Connection { /* private fields */ }Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl Connection
impl Connection
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
pub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a consequence, the peer won’t be notified that a stream has been opened until the stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
pub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
pub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
pub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
pub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
pub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
pub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
pub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
pub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
Sourcepub fn close_reason(&self) -> Option<ConnectionError>
pub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
pub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
pub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
pub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
pub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
Sourcepub fn max_datagram_size(&self) -> Option<usize>
pub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Sourcepub fn max_datagram_size(&self) -> Option<usize>
pub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
pub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
pub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
Sourcepub fn rtt(&self) -> Duration
pub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
pub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
pub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
pub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self) -> Duration
pub fn rtt(&self) -> Duration
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
pub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self) -> Box<dyn Controller>
pub fn congestion_state(&self) -> Box<dyn Controller>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
pub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
pub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
pub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
pub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
pub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
pub fn remote_node_id(&self) -> Result<NodeId>
Returns the NodeId from the peer’s TLS certificate.
Sourcepub fn remote_node_id(&self) -> Result<NodeId>
pub fn remote_node_id(&self) -> Result<NodeId>
Sourcepub fn stable_id(&self) -> usize
pub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
pub fn export_keying_material( +
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
pub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
pub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
pub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
Sourcepub fn set_receive_window(&self, receive_window: VarInt)
pub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
pub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
pub fn set_receive_window(&self, receive_window: VarInt)
Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
pub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
impl Clone for Connection
Source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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/3170/docs/iroh/endpoint/struct.Endpoint.html b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
index 6660827952..22eb8f0ee6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted once the initiating peer has sent some data on it.
-Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
pub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections. Note that this overrides the current list of ALPNs.
@@ -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.
Even when the network did not change, or iroh was already able to detect the network change itself, there is no harm in calling this function.
-Sourcepub async fn close(&self)
pub async fn close(&self)
Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
It will then make a best effort to wait for all close notifications to be acknowledged by the peers, re-transmitting them if needed. This ensures the peers are aware of the closed connections instead of having to wait for a timeout -on the connection. Once all connections are closed or timed out, the magic socket is closed.
-Be aware however that the underlying UDP sockets are only closed
-on Drop, bearing in mind the Endpoint is only dropped once all the clones
-are dropped.
Sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
Check if this endpoint is still alive, or already closed.
+on the connection. Once all connections are closed or timed out, the future +finishes. +The maximum time-out that this future will wait for depends on QUIC transport +configurations of non-drained connections at the time of calling, and their current +estimates of round trip time. With default parameters and a conservative estimate +of round trip time, this call’s future should take 3 seconds to resolve in cases of +bad connectivity or failed connections. In the usual case, this call’s future should +return much more quickly.
+It is highly recommended you do wait for this close call to finish, if possible. +Not doing so will make connections that were still open while closing the endpoint +time out on the remote end. Thus remote ends will assume connections to have failed +even if all application data was transmitted successfully.
+Note: Someone used to closing TCP sockets might wonder why it is necessary to wait +for timeouts when closing QUIC endpoints, while they don’t have to do this for TCP +sockets. This is due to QUIC and its acknowledgments being implemented in user-land, +while TCP sockets usually get closed and drained by the operating system in the +kernel during the “Time-Wait” period of the TCP socket.
+Be aware however that the underlying UDP sockets are only closed once all clones of
+the the respective Endpoint are dropped.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Endpoint
impl !RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl !UnwindSafe for Endpoint
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/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3170/docs/iroh/endpoint/struct.Incoming.html b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
index 890c955d08..97047be749 100644
--- a/pr/3170/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3170/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub struct Incoming { /* private fields */ }Expand description
An incoming connection for which the server has not yet begun its parts of the +
pub struct Incoming { /* private fields */ }Expand description
An incoming connection for which the server has not yet begun its parts of the handshake.
-Implementations§
Source§impl Incoming
impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
pub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
pub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC connection listens on a normal UDP socket and any reachable network endpoint can send datagrams to it, solicited or not. Even if the first few bytes look like a QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which can happen.
-Sourcepub fn accept_with(
+
pub fn accept_with( +
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
pub fn accept_with( self, server_config: Arc<ServerConfig>, ) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
Sourcepub fn retry(self) -> Result<(), RetryError>
pub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
pub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
Sourcepub fn ignore(self)
pub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
pub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the +
Sourcepub fn ignore(self)
pub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
pub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
pub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
pub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
pub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
pub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
Trait Implementations§
Source§impl IntoFuture for Incoming
impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
Source§type IntoFuture = IncomingFuture
type IntoFuture = IncomingFuture
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl !Freeze for Incoming
impl !RefUnwindSafe for Incoming
impl Send for Incoming
impl Sync for Incoming
impl Unpin for Incoming
impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
Source§type IntoFuture = IncomingFuture
type IntoFuture = IncomingFuture
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl !Freeze for Incoming
impl !RefUnwindSafe for Incoming
impl Send for Incoming
impl Sync for Incoming
impl Unpin for Incoming
impl !UnwindSafe for Incoming
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/3170/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
index 3abf80c4ba..0117bf58f6 100644
--- a/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3170/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub struct IncomingFuture { /* private fields */ }Expand description
Adaptor to let Incoming be awaited like a Connecting.
Trait Implementations§
Source§impl Debug for IncomingFuture
impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for IncomingFuture
§impl !RefUnwindSafe for IncomingFuture
§impl Send for IncomingFuture
§impl Sync for IncomingFuture
§impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub struct IncomingFuture { /* private fields */ }Expand description
Adaptor to let Incoming be awaited like a Connecting.
Trait Implementations§
Source§impl Debug for IncomingFuture
impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
impl<'pin> Unpin for IncomingFuturewhere
PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
Auto Trait Implementations§
impl !Freeze for IncomingFuture
impl !RefUnwindSafe for IncomingFuture
impl Send for IncomingFuture
impl Sync for IncomingFuture
impl !UnwindSafe for IncomingFuture
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/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
index a4ebc57698..c8c32ec724 100644
--- a/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
+++ b/pr/3170/docs/iroh/endpoint/struct.ZeroRttAccepted.html
@@ -1,7 +1,7 @@
-ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
+ZeroRttAccepted in iroh::endpoint - Rust pub struct ZeroRttAccepted { /* private fields */ }
Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
Auto Trait Implementations§
§impl Freeze for ZeroRttAccepted
§impl !RefUnwindSafe for ZeroRttAccepted
§impl Send for ZeroRttAccepted
§impl Sync for ZeroRttAccepted
§impl Unpin for ZeroRttAccepted
§impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
pub struct ZeroRttAccepted { /* private fields */ }Expand description
Future that completes when a connection is fully established.
+pub struct ZeroRttAccepted { /* private fields */ }Expand description
Future that completes when a connection is fully established.
For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting value is meaningless.
-Trait Implementations§
Source§impl Debug for ZeroRttAccepted
impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
impl Future for ZeroRttAccepted
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Trait Implementations§
Source§impl Debug for ZeroRttAccepted
impl Debug for ZeroRttAccepted
Source§impl Future for ZeroRttAccepted
impl Future for ZeroRttAccepted
Auto Trait Implementations§
impl Freeze for ZeroRttAccepted
impl !RefUnwindSafe for ZeroRttAccepted
impl Send for ZeroRttAccepted
impl Sync for ZeroRttAccepted
impl Unpin for ZeroRttAccepted
impl !UnwindSafe for ZeroRttAccepted
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/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3170/docs/iroh/enum.KeyParsingError.html b/pr/3170/docs/iroh/enum.KeyParsingError.html
index c76cd6ce94..228a38dd2e 100644
--- a/pr/3170/docs/iroh/enum.KeyParsingError.html
+++ b/pr/3170/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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§
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/3170/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
index e3b0954b38..bd8603c62c 100644
--- a/pr/3170/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/3170/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/3170/docs/iroh/struct.NodeAddr.html b/pr/3170/docs/iroh/struct.NodeAddr.html
index b30800c8e0..cede82bb45 100644
--- a/pr/3170/docs/iroh/struct.NodeAddr.html
+++ b/pr/3170/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/3170/docs/iroh/struct.PublicKey.html b/pr/3170/docs/iroh/struct.PublicKey.html
index d2af005b74..b6a6852115 100644
--- a/pr/3170/docs/iroh/struct.PublicKey.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayMap.html b/pr/3170/docs/iroh/struct.RelayMap.html
index 1a35409f22..f1af65137e 100644
--- a/pr/3170/docs/iroh/struct.RelayMap.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayNode.html b/pr/3170/docs/iroh/struct.RelayNode.html
index 132bf02f9c..220a1a3e2c 100644
--- a/pr/3170/docs/iroh/struct.RelayNode.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrl.html b/pr/3170/docs/iroh/struct.RelayUrl.html
index 9e90d65e62..182fe357f9 100644
--- a/pr/3170/docs/iroh/struct.RelayUrl.html
+++ b/pr/3170/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/3170/docs/iroh/struct.RelayUrlParseError.html b/pr/3170/docs/iroh/struct.RelayUrlParseError.html
index 32dc646313..695516a7e8 100644
--- a/pr/3170/docs/iroh/struct.RelayUrlParseError.html
+++ b/pr/3170/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§