Function iroh::net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayModeExpand description
Returns the default relay mode.
+Function iroh::net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey, Error>Expand description
Extract the PublicKey from the peer’s TLS certificate.
Function iroh::net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey, Error>Expand description
Extract the PublicKey from the peer’s TLS certificate.
pub struct Accept<'a> { /* private fields */ }Expand description
Future produced by Endpoint::accept.
Trait Implementations§
source§impl<'a> Future for Accept<'a>
impl<'a> Future for Accept<'a>
source§fn poll(
+Accept in iroh::net::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
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin, 'a> Unpin for Accept<'a>where
__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/2595/docs/iroh/net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
index e95106a5ad..2f8a99038b 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
@@ -1,14 +1,14 @@
-Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§fn poll(
+Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh/net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
index 99152577c2..9ad831c495 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> PublicKey
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-
sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(
+
fn poll(
+Accept in iroh::net::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
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin, 'a> Unpin for Accept<'a>where
__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/2595/docs/iroh/net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
index e95106a5ad..2f8a99038b 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
@@ -1,14 +1,14 @@
-Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§fn poll(
+Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh/net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
index 99152577c2..9ad831c495 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> PublicKey
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-
sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(
+
pub struct Accept<'a> { /* private fields */ }Expand description
Future produced by Endpoint::accept.
Trait Implementations§
impl<'pin, 'a> Unpin for Accept<'a>where
+the current task for wakeup if the value is not yet available. Read more
impl<'pin, 'a> Unpin for Accept<'a>where
__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/2595/docs/iroh/net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
index e95106a5ad..2f8a99038b 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
@@ -1,14 +1,14 @@
-Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§fn poll(
+Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh/net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
index 99152577c2..9ad831c495 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> PublicKey
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
index e95106a5ad..2f8a99038b 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Connecting.html
@@ -1,14 +1,14 @@
-Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§fn poll(
+Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh/net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
index 99152577c2..9ad831c495 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> PublicKey
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-
Struct iroh::net::endpoint::Connecting
source · 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), Connecting>
pub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-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
-sourcepub fn local_ip(&self) -> Option<IpAddr>
pub fn local_ip(&self) -> Option<IpAddr>
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
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
impl Debug for Connecting
source§impl Future for Connecting
impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
source§fn poll(
+Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh/net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
index 99152577c2..9ad831c495 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
fn poll(
+Connecting in iroh::net::endpoint - Rust Struct iroh::net::endpoint::Connecting
source · pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
source§impl Connecting
sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh/net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
index 99152577c2..9ad831c495 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
Struct iroh::net::endpoint::Connecting
source · 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), Connecting>
pub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Connecting>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+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
+sourcepub fn local_ip(&self) -> Option<IpAddr>
pub fn local_ip(&self) -> Option<IpAddr>
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
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
impl Debug for Connecting
source§impl Future for Connecting
impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
impl<'pin> Unpin for Connectingwhere
+the current task for wakeup if the value is not yet available. Read more
impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh/net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
index 99152577c2..9ad831c495 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
index 99152577c2..9ad831c495 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
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.
sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
pub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
pub async fn connect( &self, node_addr: NodeAddr, alpn: &[u8] @@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
sourcepub async fn connect_by_node_id(
+
pub async fn connect_by_node_id( +
sourcepub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
pub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
pub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
pub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
pub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
sourcepub fn add_node_addr_with_source(
+
pub fn add_node_addr_with_source( +
sourcepub fn secret_key(&self) -> &SecretKey
pub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
pub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> PublicKey
pub fn node_id(&self) -> PublicKey
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
pub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
pub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
sourcepub fn home_relay(&self) -> Option<RelayUrl>
pub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
sourcepub fn home_relay(&self) -> Option<RelayUrl>
pub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
pub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
pub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item in the stream. This makes it possible to use this function to wait for the initial home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
sourcepub fn direct_addresses(&self) -> DirectAddrsStream
pub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
sourcepub fn direct_addresses(&self) -> DirectAddrsStream
pub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
pub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
pub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
sourcepub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
pub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
sourcepub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
pub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
pub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
pub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
sourcepub fn conn_type_stream(
+
pub fn conn_type_stream( +
sourcepub fn conn_type_stream(
&self,
node_id: PublicKey
) -> Result<ConnectionTypeStream, Error>
pub fn conn_type_stream( &self, node_id: PublicKey ) -> Result<ConnectionTypeStream, Error>
Returns a stream that reports connection type changes for the remote node.
@@ -158,13 +158,13 @@ connection when the switch from a relayed to a direct connection can be so fast the relayed state is never exposed.§Errors
Will error if we do not have any address information for the given node_id.
sourcepub fn dns_resolver(
+
pub fn dns_resolver( +
sourcepub fn dns_resolver(
&self
) -> &AsyncResolver<GenericConnector<TokioRuntimeProvider>>
pub fn dns_resolver( &self ) -> &AsyncResolver<GenericConnector<TokioRuntimeProvider>>
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
sourcepub fn discovery(&self) -> Option<&dyn Discovery>
pub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
pub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
pub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
pub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however some systems like android do not expose this functionality to native code. Android does however provide this functionality to Java code. This @@ -172,7 +172,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<(), Error>
pub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<(), Error>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<(), Error>
pub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<(), Error>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards diff --git a/pr/2595/docs/iroh/net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh/net/endpoint/struct.Incoming.html index 46b64252ba..ac02ffe401 100644 --- a/pr/2595/docs/iroh/net/endpoint/struct.Incoming.html +++ b/pr/2595/docs/iroh/net/endpoint/struct.Incoming.html @@ -1,23 +1,23 @@ -
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).
-sourcepub fn accept_with(
+
pub fn accept_with( +
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).
+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
§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
§type IntoFuture = IncomingFuture
type IntoFuture = IncomingFuture
source§fn into_future(self) -> <Incoming as IntoFuture>::IntoFuture
fn into_future(self) -> <Incoming as IntoFuture>::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
§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
§type IntoFuture = IncomingFuture
type IntoFuture = IncomingFuture
source§fn into_future(self) -> <Incoming as IntoFuture>::IntoFuture
fn into_future(self) -> <Incoming as IntoFuture>::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/2595/docs/iroh/net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh/net/endpoint/struct.IncomingFuture.html
index 1909a27fbd..31b0f4085b 100644
--- a/pr/2595/docs/iroh/net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh/net/endpoint/struct.IncomingFuture.html
@@ -1,9 +1,9 @@
-IncomingFuture in iroh::net::endpoint - Rust Struct iroh::net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§fn poll(
+IncomingFuture in iroh::net::endpoint - Rust Struct iroh::net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh/net/struct.Endpoint.html b/pr/2595/docs/iroh/net/struct.Endpoint.html
index 694963c242..e1732a611e 100644
--- a/pr/2595/docs/iroh/net/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> PublicKey
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-
Struct iroh::net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
source§fn poll(
+IncomingFuture in iroh::net::endpoint - Rust Struct iroh::net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh/net/struct.Endpoint.html b/pr/2595/docs/iroh/net/struct.Endpoint.html
index 694963c242..e1732a611e 100644
--- a/pr/2595/docs/iroh/net/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
fn poll(
+IncomingFuture in iroh::net::endpoint - Rust Struct iroh::net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+the current task for wakeup if the value is not yet available. Read more
source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh/net/struct.Endpoint.html b/pr/2595/docs/iroh/net/struct.Endpoint.html
index 694963c242..e1732a611e 100644
--- a/pr/2595/docs/iroh/net/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
Struct iroh::net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
type Output = Result<Connection, ConnectionError>
impl<'pin> Unpin for IncomingFuturewhere
+the current task for wakeup if the value is not yet available. Read more
impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh/net/struct.Endpoint.html b/pr/2595/docs/iroh/net/struct.Endpoint.html
index 694963c242..e1732a611e 100644
--- a/pr/2595/docs/iroh/net/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh/net/struct.Endpoint.html b/pr/2595/docs/iroh/net/struct.Endpoint.html
index 694963c242..e1732a611e 100644
--- a/pr/2595/docs/iroh/net/struct.Endpoint.html
+++ b/pr/2595/docs/iroh/net/struct.Endpoint.html
@@ -15,10 +15,10 @@ behaviour.
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.
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.
sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
pub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<(), Error>
Sets the list of accepted ALPN protocols.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
pub async fn connect( &self, node_addr: NodeAddr, alpn: &[u8] @@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
sourcepub async fn connect_by_node_id(
+
pub async fn connect_by_node_id( +
sourcepub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
pub async fn connect_by_node_id(
&self,
node_id: PublicKey,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
pub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
pub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
pub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), Error>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
sourcepub fn add_node_addr_with_source(
+
pub fn add_node_addr_with_source( +
sourcepub fn secret_key(&self) -> &SecretKey
pub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
pub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> PublicKey
pub fn node_id(&self) -> PublicKey
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
pub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
pub async fn node_addr(&self) -> Result<NodeAddr, Error>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
sourcepub fn home_relay(&self) -> Option<RelayUrl>
pub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
sourcepub fn home_relay(&self) -> Option<RelayUrl>
pub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
pub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
pub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item in the stream. This makes it possible to use this function to wait for the initial home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
sourcepub fn direct_addresses(&self) -> DirectAddrsStream
pub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
sourcepub fn direct_addresses(&self) -> DirectAddrsStream
pub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
pub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
pub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
sourcepub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
pub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
sourcepub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
pub fn remote_info(&self, node_id: PublicKey) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
pub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
pub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
sourcepub fn conn_type_stream(
+
pub fn conn_type_stream( +
sourcepub fn conn_type_stream(
&self,
node_id: PublicKey
) -> Result<ConnectionTypeStream, Error>
pub fn conn_type_stream( &self, node_id: PublicKey ) -> Result<ConnectionTypeStream, Error>
Returns a stream that reports connection type changes for the remote node.
@@ -158,13 +158,13 @@ connection when the switch from a relayed to a direct connection can be so fast the relayed state is never exposed.§Errors
Will error if we do not have any address information for the given node_id.
sourcepub fn dns_resolver(
+
pub fn dns_resolver( +
sourcepub fn dns_resolver(
&self
) -> &AsyncResolver<GenericConnector<TokioRuntimeProvider>>
pub fn dns_resolver( &self ) -> &AsyncResolver<GenericConnector<TokioRuntimeProvider>>
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
sourcepub fn discovery(&self) -> Option<&dyn Discovery>
pub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
pub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
pub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
pub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however some systems like android do not expose this functionality to native code. Android does however provide this functionality to Java code. This @@ -172,7 +172,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<(), Error>
pub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<(), Error>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<(), Error>
pub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<(), Error>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards diff --git a/pr/2595/docs/iroh_blobs/downloader/struct.DownloadRequest.html b/pr/2595/docs/iroh_blobs/downloader/struct.DownloadRequest.html index e59443bdc5..12fdbfc9d9 100644 --- a/pr/2595/docs/iroh_blobs/downloader/struct.DownloadRequest.html +++ b/pr/2595/docs/iroh_blobs/downloader/struct.DownloadRequest.html @@ -1,7 +1,7 @@
Struct iroh_blobs::downloader::DownloadRequest
source · pub struct DownloadRequest { /* private fields */ }Expand description
A download request.
Implementations§
source§impl DownloadRequest
impl DownloadRequest
sourcepub fn new(
resource: impl Into<DownloadKind>,
- nodes: impl IntoIterator<Item = impl Into<NodeAddr>>
+ nodes: impl IntoIterator<Item = impl Into<NodeAddr>>
) -> Self
pub fn new( resource: impl Into<DownloadKind>, - nodes: impl IntoIterator<Item = impl Into<NodeAddr>> + nodes: impl IntoIterator<Item = impl Into<NodeAddr>> ) -> Self
Create a new download request.
It is the responsibility of the caller to ensure that the data is tagged either with a temp tag or with a persistent tag to make sure the data is not garbage collected during diff --git a/pr/2595/docs/iroh_blobs/downloader/struct.Downloader.html b/pr/2595/docs/iroh_blobs/downloader/struct.Downloader.html index 4b9b8839f5..f2029cce3d 100644 --- a/pr/2595/docs/iroh_blobs/downloader/struct.Downloader.html +++ b/pr/2595/docs/iroh_blobs/downloader/struct.Downloader.html @@ -11,7 +11,7 @@ S: Store,
Create a new Downloader with custom ConcurrencyLimits and RetryConfig.
sourcepub async fn queue(&self, request: DownloadRequest) -> DownloadHandle ⓘ
pub async fn queue(&self, request: DownloadRequest) -> DownloadHandle ⓘ
Queue a download.
sourcepub async fn cancel(&self, handle: DownloadHandle)
pub async fn cancel(&self, handle: DownloadHandle)
Cancel a download.
-sourcepub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
Declare that certains nodes can be used to download a hash.
+sourcepub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
Declare that certains nodes can be used to download a hash.
Note that this does not start a download, but only provides new nodes to already queued
downloads. Use Self::queue to queue a download.
Trait Implementations§
source§impl Clone for Downloader
impl Clone for Downloader
source§fn clone(&self) -> Downloader
fn clone(&self) -> Downloader
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 Downloader
impl !RefUnwindSafe for Downloader
impl Send for Downloader
impl Sync for Downloader
impl Unpin for Downloader
impl !UnwindSafe for Downloader
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2595/docs/iroh_blobs/downloader/trait.Dialer.html
index a3b667b870..65007962e0 100644
--- a/pr/2595/docs/iroh_blobs/downloader/trait.Dialer.html
+++ b/pr/2595/docs/iroh_blobs/downloader/trait.Dialer.html
@@ -1,15 +1,15 @@
-Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+
sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2595/docs/iroh_blobs/downloader/trait.Dialer.html
index a3b667b870..65007962e0 100644
--- a/pr/2595/docs/iroh_blobs/downloader/trait.Dialer.html
+++ b/pr/2595/docs/iroh_blobs/downloader/trait.Dialer.html
@@ -1,15 +1,15 @@
-Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+
sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+sourcefn is_pending(&self, node: NodeId) -> bool
fn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+source§impl Dialer for Dialer
impl Dialer for Dialer
type Connection = Connection
fn queue_dial(&mut self, node_id: NodeId)
fn pending_count(&self) -> usize
fn is_pending(&self, node: NodeId) -> bool
fn node_id(&self) -> NodeId
Enum iroh_blobs::BlobFormat
pub enum BlobFormat {
+BlobFormat in iroh_blobs - Rust Enum iroh_blobs::BlobFormat
source · pub enum BlobFormat {
Raw,
HashSeq,
}
Expand description
A format identifier
Variants§
Implementations§
§impl BlobFormat
pub const fn is_hash_seq(&self) -> bool
Is hash seq format
-Trait Implementations§
§impl Clone for BlobFormat
§fn clone(&self) -> BlobFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for BlobFormat
§impl Default for BlobFormat
§fn default() -> BlobFormat
Returns the “default value” for a type. Read more§impl<'de> Deserialize<'de> for BlobFormat
§fn deserialize<__D>(
+
Implementations§
source§impl BlobFormat
Trait Implementations§
source§impl Clone for BlobFormat
source§fn clone(&self) -> BlobFormat
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 BlobFormat
source§impl Default for BlobFormat
source§fn default() -> BlobFormat
Returns the “default value” for a type. Read moresource§impl<'de> Deserialize<'de> for BlobFormat
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<BlobFormat, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for BlobFormat
§impl Hash for BlobFormat
§fn hash<__H>(&self, state: &mut __H)where
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for BlobFormat
source§impl Hash for BlobFormat
§impl MaxSize for BlobFormat
§const POSTCARD_MAX_SIZE: usize = 1usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for BlobFormat
source§impl MaxSize for BlobFormat
source§const POSTCARD_MAX_SIZE: usize = 1usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for BlobFormat
source§fn cmp(&self, other: &BlobFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for BlobFormat
§fn eq(&self, other: &BlobFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for BlobFormat
source§fn eq(&self, other: &BlobFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for BlobFormat
§fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>
source§impl PartialOrd for BlobFormat
source§fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for BlobFormat
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 BlobFormat
§impl Eq for BlobFormat
§impl StructuralPartialEq for BlobFormat
Auto Trait Implementations§
§impl Freeze for BlobFormat
§impl RefUnwindSafe for BlobFormat
§impl Send for BlobFormat
§impl Sync for BlobFormat
§impl Unpin for BlobFormat
§impl UnwindSafe for BlobFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Copy for BlobFormat
source§impl Eq for BlobFormat
source§impl StructuralPartialEq for BlobFormat
Auto Trait Implementations§
impl Freeze for BlobFormat
impl RefUnwindSafe for BlobFormat
impl Send for BlobFormat
impl Sync for BlobFormat
impl Unpin for BlobFormat
impl UnwindSafe for BlobFormat
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/2595/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2595/docs/iroh_blobs/export/enum.ExportProgress.html
index 10cc6d34b8..f82fb3789a 100644
--- a/pr/2595/docs/iroh_blobs/export/enum.ExportProgress.html
+++ b/pr/2595/docs/iroh_blobs/export/enum.ExportProgress.html
@@ -14,7 +14,7 @@
id: u64,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress events for an export operation
Variants§
§Found
The download part is done for this id, we are now exporting the data
to the specified out path.
@@ -30,7 +30,7 @@ to the specified out path.
Expand description
Progress events for an export operation
Found
The download part is done for this id, we are now exporting the data to the specified out path.
@@ -30,7 +30,7 @@ to the specified out path.Done
We finished exporting a blob
AllDone
We are done with the whole operation.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Clone for ExportProgress
impl Clone for ExportProgress
source§fn clone(&self) -> ExportProgress
fn clone(&self) -> ExportProgress
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ExportProgress
impl Debug for ExportProgress
source§impl<'de> Deserialize<'de> for ExportProgress
impl<'de> Deserialize<'de> for ExportProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl !Freeze for ExportProgress
impl RefUnwindSafe for ExportProgress
impl Send for ExportProgress
impl Sync for ExportProgress
impl Unpin for ExportProgress
impl UnwindSafe for ExportProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2595/docs/iroh_blobs/get/db/enum.DownloadProgress.html
index 0261806c03..718f578073 100644
--- a/pr/2595/docs/iroh_blobs/get/db/enum.DownloadProgress.html
+++ b/pr/2595/docs/iroh_blobs/get/db/enum.DownloadProgress.html
@@ -25,7 +25,7 @@
id: u64,
},
AllDone(Stats),
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the get operation.
Variants§
§InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
§FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.
§AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
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 DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
index 8db691fd2c..5887529647 100644
--- a/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
@@ -1,20 +1,20 @@
Metrics in iroh_blobs::metrics - Rust Struct iroh_blobs::metrics::Metrics
source · pub struct Metrics {
- pub download_bytes_total: Counter,
- pub download_time_total: Counter,
- pub downloads_success: Counter,
- pub downloads_error: Counter,
- pub downloads_notfound: Counter,
- pub downloader_tick_main: Counter,
- pub downloader_tick_connection_ready: Counter,
- pub downloader_tick_message_received: Counter,
- pub downloader_tick_transfer_completed: Counter,
- pub downloader_tick_transfer_failed: Counter,
- pub downloader_tick_retry_node: Counter,
- pub downloader_tick_goodbye_node: Counter,
+ pub download_bytes_total: Counter,
+ pub download_time_total: Counter,
+ pub downloads_success: Counter,
+ pub downloads_error: Counter,
+ pub downloads_notfound: Counter,
+ pub downloader_tick_main: Counter,
+ pub downloader_tick_connection_ready: Counter,
+ pub downloader_tick_message_received: Counter,
+ pub downloader_tick_transfer_completed: Counter,
+ pub downloader_tick_transfer_failed: Counter,
+ pub downloader_tick_retry_node: Counter,
+ pub downloader_tick_goodbye_node: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
index 37d472f9e8..28dfa0a370 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index eb6a4213aa..d1d208f5d9 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
@@ -8,7 +8,7 @@
Done {
hash: Hash,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the batch add operation.
Variants§
§Found
An item was found with the given size
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2595/docs/iroh_blobs/get/db/enum.DownloadProgress.html
index 0261806c03..718f578073 100644
--- a/pr/2595/docs/iroh_blobs/get/db/enum.DownloadProgress.html
+++ b/pr/2595/docs/iroh_blobs/get/db/enum.DownloadProgress.html
@@ -25,7 +25,7 @@
id: u64,
},
AllDone(Stats),
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the get operation.
Variants§
§InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
§FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.
§AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
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 DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
index 8db691fd2c..5887529647 100644
--- a/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
@@ -1,20 +1,20 @@
Metrics in iroh_blobs::metrics - Rust Struct iroh_blobs::metrics::Metrics
source · pub struct Metrics {
- pub download_bytes_total: Counter,
- pub download_time_total: Counter,
- pub downloads_success: Counter,
- pub downloads_error: Counter,
- pub downloads_notfound: Counter,
- pub downloader_tick_main: Counter,
- pub downloader_tick_connection_ready: Counter,
- pub downloader_tick_message_received: Counter,
- pub downloader_tick_transfer_completed: Counter,
- pub downloader_tick_transfer_failed: Counter,
- pub downloader_tick_retry_node: Counter,
- pub downloader_tick_goodbye_node: Counter,
+ pub download_bytes_total: Counter,
+ pub download_time_total: Counter,
+ pub downloads_success: Counter,
+ pub downloads_error: Counter,
+ pub downloads_notfound: Counter,
+ pub downloader_tick_main: Counter,
+ pub downloader_tick_connection_ready: Counter,
+ pub downloader_tick_message_received: Counter,
+ pub downloader_tick_transfer_completed: Counter,
+ pub downloader_tick_transfer_failed: Counter,
+ pub downloader_tick_retry_node: Counter,
+ pub downloader_tick_goodbye_node: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
index 37d472f9e8..28dfa0a370 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index eb6a4213aa..d1d208f5d9 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
@@ -8,7 +8,7 @@
Done {
hash: Hash,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the batch add operation.
Variants§
§Found
An item was found with the given size
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Expand description
Progress updates for the get operation.
Variants§
InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
fn clone(&self) -> DownloadProgress
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DownloadProgress
impl Debug for DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Serialize for DownloadProgress
impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
index 8db691fd2c..5887529647 100644
--- a/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
@@ -1,20 +1,20 @@
Metrics in iroh_blobs::metrics - Rust Struct iroh_blobs::metrics::Metrics
source · pub struct Metrics {
- pub download_bytes_total: Counter,
- pub download_time_total: Counter,
- pub downloads_success: Counter,
- pub downloads_error: Counter,
- pub downloads_notfound: Counter,
- pub downloader_tick_main: Counter,
- pub downloader_tick_connection_ready: Counter,
- pub downloader_tick_message_received: Counter,
- pub downloader_tick_transfer_completed: Counter,
- pub downloader_tick_transfer_failed: Counter,
- pub downloader_tick_retry_node: Counter,
- pub downloader_tick_goodbye_node: Counter,
+ pub download_bytes_total: Counter,
+ pub download_time_total: Counter,
+ pub downloads_success: Counter,
+ pub downloads_error: Counter,
+ pub downloads_notfound: Counter,
+ pub downloader_tick_main: Counter,
+ pub downloader_tick_connection_ready: Counter,
+ pub downloader_tick_message_received: Counter,
+ pub downloader_tick_transfer_completed: Counter,
+ pub downloader_tick_transfer_failed: Counter,
+ pub downloader_tick_retry_node: Counter,
+ pub downloader_tick_goodbye_node: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
index 37d472f9e8..28dfa0a370 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index eb6a4213aa..d1d208f5d9 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
@@ -8,7 +8,7 @@
Done {
hash: Hash,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the batch add operation.
Variants§
§Found
An item was found with the given size
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
index 8db691fd2c..5887529647 100644
--- a/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_blobs/metrics/struct.Metrics.html
@@ -1,20 +1,20 @@
Metrics in iroh_blobs::metrics - Rust Struct iroh_blobs::metrics::Metrics
source · pub struct Metrics {
- pub download_bytes_total: Counter,
- pub download_time_total: Counter,
- pub downloads_success: Counter,
- pub downloads_error: Counter,
- pub downloads_notfound: Counter,
- pub downloader_tick_main: Counter,
- pub downloader_tick_connection_ready: Counter,
- pub downloader_tick_message_received: Counter,
- pub downloader_tick_transfer_completed: Counter,
- pub downloader_tick_transfer_failed: Counter,
- pub downloader_tick_retry_node: Counter,
- pub downloader_tick_goodbye_node: Counter,
+ pub download_bytes_total: Counter,
+ pub download_time_total: Counter,
+ pub downloads_success: Counter,
+ pub downloads_error: Counter,
+ pub downloads_notfound: Counter,
+ pub downloader_tick_main: Counter,
+ pub downloader_tick_connection_ready: Counter,
+ pub downloader_tick_message_received: Counter,
+ pub downloader_tick_transfer_completed: Counter,
+ pub downloader_tick_transfer_failed: Counter,
+ pub downloader_tick_retry_node: Counter,
+ pub downloader_tick_goodbye_node: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
index 37d472f9e8..28dfa0a370 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index eb6a4213aa..d1d208f5d9 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
@@ -8,7 +8,7 @@
Done {
hash: Hash,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the batch add operation.
Variants§
§Found
An item was found with the given size
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Struct iroh_blobs::metrics::Metrics
source · pub struct Metrics {
- pub download_bytes_total: Counter,
- pub download_time_total: Counter,
- pub downloads_success: Counter,
- pub downloads_error: Counter,
- pub downloads_notfound: Counter,
- pub downloader_tick_main: Counter,
- pub downloader_tick_connection_ready: Counter,
- pub downloader_tick_message_received: Counter,
- pub downloader_tick_transfer_completed: Counter,
- pub downloader_tick_transfer_failed: Counter,
- pub downloader_tick_retry_node: Counter,
- pub downloader_tick_goodbye_node: Counter,
+ pub download_bytes_total: Counter,
+ pub download_time_total: Counter,
+ pub downloads_success: Counter,
+ pub downloads_error: Counter,
+ pub downloads_notfound: Counter,
+ pub downloader_tick_main: Counter,
+ pub downloader_tick_connection_ready: Counter,
+ pub downloader_tick_message_received: Counter,
+ pub downloader_tick_transfer_completed: Counter,
+ pub downloader_tick_transfer_failed: Counter,
+ pub downloader_tick_retry_node: Counter,
+ pub downloader_tick_goodbye_node: Counter,
}Expand description
Enum of metrics for the module
-Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
source§impl Metric for Metrics
impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
fn with_metric<T, F>(f: F)where
+
Fields§
§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: CounterTrait Implementations§
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§
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
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/2595/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
index 37d472f9e8..28dfa0a370 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index eb6a4213aa..d1d208f5d9 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
@@ -8,7 +8,7 @@
Done {
hash: Hash,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the batch add operation.
Variants§
§Found
An item was found with the given size
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Expand description
Progress updates for the add operation.
Found
An item was found with name name, from now on referred to via id
Fields
Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
source§impl Debug for AddProgress
impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Serialize for AddProgress
impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index eb6a4213aa..d1d208f5d9 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
@@ -8,7 +8,7 @@
Done {
hash: Hash,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the batch add operation.
Variants§
§Found
An item was found with the given size
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index eb6a4213aa..d1d208f5d9 100644
--- a/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2595/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
@@ -8,7 +8,7 @@
Done {
hash: Hash,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the batch add operation.
Variants§
§Found
An item was found with the given size
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Expand description
Progress updates for the batch add operation.
Variants§
Found
An item was found with the given size
Fields
Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Serialize for BatchAddPathProgress
impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index bdb521416b..42a34f72d5 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Expand description
Progress updates for the validate operation
Variants§
level: ReportLevelThe level of the message
Done
Consistency check ended
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ConsistencyCheckProgress
impl RefUnwindSafe for ConsistencyCheckProgress
impl Send for ConsistencyCheckProgress
impl Sync for ConsistencyCheckProgress
impl Unpin for ConsistencyCheckProgress
impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
index e8c90d273f..cc331601fd 100644
--- a/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2595/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Expand description
Progress updates for the validate operation
Variants§
Starting
started validating
Fields
total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.AllDone
We are done with the whole operation.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ValidateProgress
impl RefUnwindSafe for ValidateProgress
impl Send for ValidateProgress
impl Sync for ValidateProgress
impl Unpin for ValidateProgress
impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_blobs/struct.Hash.html b/pr/2595/docs/iroh_blobs/struct.Hash.html
index 9136b58716..35258bb72b 100644
--- a/pr/2595/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2595/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
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 Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);Expand description
Hash type used throughout.
-Implementations§
§impl Hash
impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
pub fn fmt_short(&self) -> String
pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string +
Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
source§impl FromIterator<Hash> for HashSeq
impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
source§impl FromIterator<Hash> for HashSeq
impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
const POSTCARD_MAX_SIZE: usize = 32usize
source§impl MaxSize for Hash
impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
const POSTCARD_MAX_SIZE: usize = 32usize
source§impl Ord for Hash
impl Ord for Hash
source§impl PartialEq for Hash
impl PartialEq for Hash
§impl PartialOrd for Hash
impl PartialOrd for Hash
source§impl PartialOrd for Hash
impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
§impl Value for Hash
impl Value for Hash
§type SelfType<'a> = Hash
type SelfType<'a> = Hash
type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
fn fixed_width() -> Option<usize>
§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
source§impl Value for Hash
impl Value for Hash
§type SelfType<'a> = Hash
type SelfType<'a> = Hash
type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
fn fixed_width() -> Option<usize>
impl Copy for Hash
impl Eq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations§
impl Copy for Hash
impl Eq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
index b64f909c19..e286b66bf2 100644
--- a/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2595/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
index c26a079d61..b40ebb7475 100644
--- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>
sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
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 Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
impl Freeze for HashAndFormat
impl RefUnwindSafe for HashAndFormat
impl Send for HashAndFormat
impl Sync for HashAndFormat
impl Unpin for HashAndFormat
impl UnwindSafe for HashAndFormat
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/2595/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html index c26a079d61..b40ebb7475 100644 --- a/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html +++ b/pr/2595/docs/iroh_docs/actor/struct.SyncHandle.html @@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that namespace: NamespaceId, author: AuthorId, key: Bytes, - hash: Hash, + hash: Hash, len: u64 ) -> Result<()>
pub async fn delete_prefix(
&self,
diff --git a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
index c46a158ba7..eeb76d2ac6 100644
--- a/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/index.html b/pr/2595/docs/iroh_docs/engine/index.html
index 0ff866c778..078ff0b40f 100644
--- a/pr/2595/docs/iroh_docs/engine/index.html
+++ b/pr/2595/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with
-peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/engine/struct.Engine.html b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
index 513f830e93..bbba168c7c 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
index b0375c0507..0f830bd2be 100644
--- a/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2595/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2595/docs/iroh_docs/index.html b/pr/2595/docs/iroh_docs/index.html
index c993ddbf7f..a626c6342f 100644
--- a/pr/2595/docs/iroh_docs/index.html
+++ b/pr/2595/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
index 09df15e741..14f294057a 100644
--- a/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
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()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
index 5cbc568bca..f718a742c7 100644
--- a/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2595/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
index 5128893950..2cf9a6c8ee 100644
--- a/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2595/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
index 5259391b1d..195c3feae2 100644
--- a/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2595/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
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 SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index 80997692e5..9f3ec7ffc5 100644
--- a/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2595/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
🔬This is a nightly-only experimental API. (iter_next_chunk)Advances the iterator and returns an array containing the next N values. Read more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorId.html b/pr/2595/docs/iroh_docs/struct.AuthorId.html
index 485a97651d..1067d7471c 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorId.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
index 2a60734d10..3761908b15 100644
--- a/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.AuthorPublicKey.html
@@ -141,6 +141,6 @@ builds.Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.DocTicket.html b/pr/2595/docs/iroh_docs/struct.DocTicket.html
index 28f7102b23..59eeb4a65d 100644
--- a/pr/2595/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2595/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>, source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
index f0cf35a665..e4a2ecf4e5 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespacePublicKey.html
@@ -140,6 +140,6 @@ builds.
Into<Dispatch>,source§fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
source§impl<T> PeerIdentity for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Entry.html b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
index cae1aa5284..2530044113 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Expand description
Events informing about actions of the live sync progress.
InsertLocal
A local insertion.
InsertRemote
Received a remote insert.
-Fields
from: PublicKeyThe peer that sent us the entry.
+Fields
content_status: ContentStatusIf the content is available at the local node
ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
hash: HashThe content hash of the newly available entry content
+PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If blobs failed to download, this event will still be emitted after all operations completed.
-NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+NeighborDown(PublicKey)
We lost a neighbor in the swarm.
SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for LiveEvent
impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
fn eq(&self, other: &LiveEvent) -> bool
self and other values to be equal, and is used
diff --git a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
index f87850ac2f..24a30d65b5 100644
--- a/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2595/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatusExpand description
Converts an [EntryStatus] into a [‘ContentStatus’].
Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatusExpand description
Converts an EntryStatus into a [‘ContentStatus’].
Expand description
Handlers and actors to for live syncing replicas.
crate::Replica is also called documents here.
Structs§
- Persistent default author for a docs engine.
- The sync engine coordinates actors that manage open documents, set-reconciliation syncs with -peers and a gossip swarm for each syncing document.
- Event emitted when a sync operation completes
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatusinto a [‘ContentStatus’].
Fields§
§endpoint: EndpointEndpoint used by the engine.
sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
impl Engine
Implementations§
source§impl Engine
impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
- gossip: Gossip,
+ gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
pub async fn spawn<B: Store>( endpoint: Endpoint, - gossip: Gossip, + gossip: Gossip, replica_store: Store, bao_store: B, - downloader: Downloader, + downloader: Downloader, default_author_storage: DefaultAuthorStorage ) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the Start to sync a document. If Event emitted when a sync operation completes Peer we synced with Peer we synced with Origin of the sync exchange Timestamp when the sync started Timestamp when the sync finished Multi-dimensional key-value documents with an efficient synchronization protocol The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica. All entries in a replica are signed with two keypairs: Metrics for iroh-docs Errors that may occur on handling incoming sync connections. Failed to establish connection Failed to open replica We aborted the sync request. Failed to run sync Failed to close Connect to a peer and sync a replica Handle an iroh-docs connection and sync all shared documents in the replica store. Details of a finished sync operation. The namespace that was synced. The peer we syned with. The peer we syned with. The outcome of the sync operation The time this operation took Contains both a key (either secret or public) to a document, and a list of peers to join. either a public or private key A list of nodes to contact. Create a new doc ticket A list of nodes to contact.pub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}Expand description
Fields§
§peer: PublicKeyFields§
§peer: PublicKeyorigin: Originfinished: SystemTimestarted: SystemTimeExpand description
pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
Expand description
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
impl Metric for Metrics
fn with_metric<T, F>(f: F)
Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
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§
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 T
impl<'a, T, E> AsTaggedImplicit<'a, E> for T
fn implicit(
diff --git a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
index 5c6788f857..9c90c5f363 100644
--- a/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2595/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}
Expand description
Variants§
Connect
Open
Abort
Sync
Close
Implementations§
impl AcceptError
Implementations§
Trait Implementations§
impl Debug for AcceptError
impl Display for AcceptError
impl Error for AcceptError
fn source(&self) -> Option<&(dyn Error + 'static)>
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for AcceptError
impl RefUnwindSafe for AcceptError
impl Send for AcceptError
impl Sync for AcceptError
impl Unpin for AcceptError
impl UnwindSafe for AcceptError
Blanket Implementations§
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
Expand description
Expand description
Struct iroh_docs::
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}Expand description
Fields§
§namespace: NamespaceIdpeer: PublicKeypeer: PublicKeyoutcome: SyncOutcometimings: TimingsTrait Implementations§
impl Clone for SyncFinished
fn clone(&self) -> SyncFinished
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SyncFinished
impl RefUnwindSafe for SyncFinished
impl Send for SyncFinished
impl Sync for SyncFinished
impl Unpin for SyncFinished
impl UnwindSafe for SyncFinished
Blanket Implementations§
impl<T> Any for T
Implementations§
Trait Implementations§
impl Debug for ContentHashesIterator
Trait Implementations§
impl Debug for ContentHashesIterator
impl Iterator for ContentHashesIterator
fn next(&mut self) -> Option<Self::Item>
fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
iter_next_chunk)N values. Read morefn size_hint(&self) -> (usize, Option<usize>)
fn count(self) -> usize
F9B4CA)fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for T
impl<T> PeerIdentity for T
impl<T> PeerIdentity for T
impl<T> RuleType for T
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for T
impl<T> PeerIdentity for T
impl<T> PeerIdentity for T
impl<T> RuleType for T
pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}Expand description
Fields§
§capability: Capabilitynodes: Vec<NodeAddr>Implementations§
impl DocTicket
pub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
nodes: Vec<NodeAddr>Implementations§
Trait Implementations§
impl<'de> Deserialize<'de> for DocTicket
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
Auto Trait Implementations§
impl Freeze for DocTicket
impl RefUnwindSafe for DocTicket
impl Send for DocTicket
impl Sync for DocTicket
impl Unpin for DocTicket
impl UnwindSafe for DocTicket
Blanket Implementations§
impl<T> Any for T
Auto Trait Implementations§
impl Freeze for DocTicket
impl RefUnwindSafe for DocTicket
impl Send for DocTicket
impl Sync for DocTicket
impl Unpin for DocTicket
impl UnwindSafe for DocTicket
Blanket Implementations§
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
impl<'a, T, E> AsTaggedImplicit<'a, E> for T
fn implicit(
diff --git a/pr/2595/docs/iroh_docs/struct.NamespaceId.html b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
index db8dd7bf7b..3159fab872 100644
--- a/pr/2595/docs/iroh_docs/struct.NamespaceId.html
+++ b/pr/2595/docs/iroh_docs/struct.NamespaceId.html
@@ -149,6 +149,6 @@ letters are used (e.g.
F9B4CA)fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for T
impl<T> PeerIdentity for T
impl<T> PeerIdentity for T
impl<T> RuleType for T
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
impl<T> PeerIdentity for Twhere
+ T: for<'de> Deserialize<'de>,
impl<T> PeerIdentity for T
impl<T> RuleType for T
pub struct Entry { /* private fields */ }Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
pub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
pub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
pub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
pub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<SignedEntry> for Entry
impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
fn from(value: SignedEntry) -> Self
source§impl Ord for Entry
impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Record.html b/pr/2595/docs/iroh_docs/sync/struct.Record.html
index 8fd48b53dd..c09d524968 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
index 3e3f637ad0..4c10f15b90 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
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 SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
pub struct Record { /* private fields */ }Expand description
The data part of an entry in a Replica.
Implementations§
source§impl Record
impl Record
Implementations§
source§impl Record
impl Record
sourcepub fn empty_current() -> Self
pub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
pub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
pub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
pub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Ord for Record
impl Ord for Record
Ordering for entry values.
diff --git a/pr/2595/docs/iroh_docs/sync/struct.Replica.html b/pr/2595/docs/iroh_docs/sync/struct.Replica.html index 3e3f637ad0..4c10f15b90 100644 --- a/pr/2595/docs/iroh_docs/sync/struct.Replica.html +++ b/pr/2595/docs/iroh_docs/sync/struct.Replica.html @@ -5,7 +5,7 @@ &mut self, key: impl AsRef<[u8]>, author: &Author, - hash: Hash, + hash: Hash, len: u64 ) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it. Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
index 3213281947..37aaf38d1a 100644
--- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
pub fn record_id( diff --git a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html index 3213281947..37aaf38d1a 100644 --- a/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html +++ b/pr/2595/docs/iroh_docs/sync/struct.SignedEntry.html @@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
pub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
pub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
sourcepub fn content_len(&self) -> u64
pub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
pub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
sourcepub fn content_hash(&self) -> Hash
pub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
fn clone(&self) -> SignedEntry
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SignedEntry
impl Debug for SignedEntry
source§impl Deref for SignedEntry
impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl From<SignedEntry> for Entry
impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
fn from(value: SignedEntry) -> Self
source§impl Ord for SignedEntry
impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 635487e5a4..2624dba388 100644
--- a/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2595/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
index 56913f092d..7c40cd53a2 100644
--- a/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2595/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+
fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
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§
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
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/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
index 280c9e6be1..0aa278cf46 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh_net::endpoint - Rust Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
index e5e9fb3fae..7ba325b939 100644
--- a/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
+++ b/pr/2595/docs/iroh_net/endpoint/fn.get_remote_node_id.html
@@ -1,2 +1,2 @@
-get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
+get_remote_node_id in iroh_net::endpoint - Rust Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>
Expand description
Extract the PublicKey from the peer’s TLS certificate.
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/endpoint/index.html b/pr/2595/docs/iroh_net/endpoint/index.html
index c6e96a0c09..96f78be52b 100644
--- a/pr/2595/docs/iroh_net/endpoint/index.html
+++ b/pr/2595/docs/iroh_net/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
+iroh_net::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net connections work.
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
index 9b41175d4e..e5fd7e27c7 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh_net::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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayModeExpand description
Returns the default relay mode.
+Function iroh_net::endpoint::default_relay_mode
source · pub fn default_relay_mode() -> RelayModeExpand description
Returns the default relay mode.
If the IROH_FORCE_STAGING_RELAYS environment variable is set to 1, it will return RelayMode::Staging.
Otherwise, it will return RelayMode::Default.
Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>Expand description
Extract the PublicKey from the peer’s TLS certificate.
Function iroh_net::endpoint::get_remote_node_id
source · pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>Expand description
Extract the PublicKey from the peer’s TLS certificate.
Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
Expand description
The Endpoint allows establishing connections to other iroh-net nodes.
The Endpoint is the main API interface to manage a local iroh-net node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh-net 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_net::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<'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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
pub struct Accept<'a> { /* private fields */ }Expand description
Future produced by Endpoint::accept.
Trait Implementations§
impl<'pin, 'a> Unpin for Accept<'a>where
__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/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
index 532732d29b..99a85d3da3 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust
pub struct AddrInfo {
+AddrInfo in iroh_net::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh-net node.
@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to
other node, see NodeAddr for details.
Fields§
§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 AddrInfo
pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+Implementations§
source§impl AddrInfo
sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for AddrInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for AddrInfo
source§impl PartialEq for AddrInfo
§impl PartialOrd for AddrInfo
source§impl PartialOrd for AddrInfo
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for AddrInfo
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 AddrInfo
§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for AddrInfo
source§impl StructuralPartialEq for AddrInfo
Auto Trait Implementations§
§impl Freeze for AddrInfo
§impl RefUnwindSafe for AddrInfo
§impl Send for AddrInfo
§impl Sync for AddrInfo
§impl Unpin for AddrInfo
§impl UnwindSafe for AddrInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
index 49e75b9bf9..b5d2337922 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Connecting.html
@@ -1,11 +1,11 @@
-Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
-sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
-Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
+Connecting in iroh_net::endpoint - Rust Struct iroh_net::endpoint::Connecting
source · 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>
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+sourcepub fn local_ip(&self) -> Option<IpAddr>
The local IP address which was used when the peer established the connection.
+sourcepub fn remote_address(&self) -> SocketAddr
The peer’s UDP address.
+Trait Implementations§
source§impl Debug for Connecting
source§impl Future for Connecting
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for Connectingwhere
__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/2595/docs/iroh_net/endpoint/struct.Endpoint.html b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
index fcc717adae..1e06183502 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Endpoint.html
@@ -14,11 +14,11 @@ behaviour.
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.
-sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>) -> Result<()>
Sets the list of accepted ALPN protocols.
+Implementations§
source§impl Endpoint
sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+sourcepub async fn connect(
&self,
node_addr: NodeAddr,
alpn: &[u8]
@@ -38,7 +38,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-
sourcepub async fn connect_by_node_id(
+
sourcepub async fn connect_by_node_id(
&self,
node_id: NodeId,
alpn: &[u8]
@@ -47,13 +47,13 @@ an error.
information being provided by either the discovery service or using
Endpoint::add_node_addr. See Endpoint::connect for the details of how it
uses the discovery service to establish a connection to a remote node.
-
sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
+sourcepub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<()>
Informs this Endpoint about addresses of the iroh-net node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -63,7 +63,7 @@ silently ignored.
§Errors
Will return an error if we attempt to add our own PublicKey to the node map or if the
direct addresses are a subset of ours.
-sourcepub fn add_node_addr_with_source(
+
sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
+sourcepub async fn node_addr(&self) -> Result<NodeAddr>
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
-sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
+sourcepub fn home_relay(&self) -> Option<RelayUrl>
Returns the RelayUrl of the Relay server used as home relay.
Every endpoint has a home Relay server which it chooses as the server with the
lowest latency out of the configured servers provided by Builder::relay_mode.
This is the server other iroh-net nodes can use to reliably establish a connection
@@ -93,14 +93,14 @@ to this node.
Note that this will be None right after the Endpoint is created since it takes
some time to connect to find and connect to the home relay server. Use
Endpoint::watch_home_relay to wait until the home relay server is available.
-sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
+sourcepub fn watch_home_relay(&self) -> impl Stream<Item = RelayUrl>
Watches for changes to the home relay.
If there is currently a home relay it will be yielded immediately as the first item
in the stream. This makes it possible to use this function to wait for the initial
home relay to be known.
Note that it is not guaranteed that a home relay will ever become available. If no
servers are configured with Builder::relay_mode this stream will never yield an
item.
-sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
+sourcepub fn direct_addresses(&self) -> DirectAddrsStream
Returns the direct addresses of this Endpoint.
The direct addresses of the Endpoint are those that could be used by other
iroh-net nodes to establish direct connectivity, depending on the network
situation. The yielded lists of direct addresses contain both the locally-bound
@@ -123,10 +123,10 @@ most recently discovered IP endpoints.
let mep = Endpoint::builder().bind(0).await.unwrap();
let _addrs = mep.direct_addresses().next().await;
-sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
+sourcepub fn bound_sockets(&self) -> (SocketAddr, Option<SocketAddr>)
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
+sourcepub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>
Returns information about the remote node identified by a NodeId.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. Having information on a remote node, however, does not mean we have
ever connected to it to or even whether a connection is even possible. The information about a
@@ -135,14 +135,14 @@ calls may return different information. Furthermore, node information may even b
completely evicted as it becomes stale.
See also Endpoint::remote_info_iter which returns information on all nodes known
by this Endpoint.
-sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
+sourcepub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>
Returns information about all the remote nodes this Endpoint knows about.
This returns the same information as Endpoint::remote_info for each node known to this
Endpoint.
The Endpoint keeps some information about remote iroh-net nodes, which it uses to find
the best path to a node. This returns all the nodes it knows about, regardless of whether a
connection was ever made or is even possible.
See also Endpoint::remote_info to only retrieve information about a single node.
-sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
+sourcepub fn conn_type_stream(&self, node_id: NodeId) -> Result<ConnectionTypeStream>
Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
@@ -155,11 +155,11 @@ connection when the switch from a relayed to a direct connection can be so fast
the relayed state is never exposed.
§Errors
Will error if we do not have any address information for the given node_id.
-sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
+sourcepub fn dns_resolver(&self) -> &DnsResolver
Returns the DNS resolver used in this Endpoint.
See Builder::discovery.
-sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
+sourcepub fn discovery(&self) -> Option<&dyn Discovery>
Returns the discovery mechanism, if configured.
-sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -167,7 +167,7 @@ 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, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
+sourcepub async fn close(self, error_code: VarInt, reason: &[u8]) -> Result<()>
Closes the QUIC endpoint and the magic socket.
This will close all open QUIC connections with the provided error_code and
reason. See quinn::Connection for details on how these are interpreted.
It will then wait for all connections to actually be shutdown, and afterwards
diff --git a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
index 6aeae7aad3..8e46cbb70c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.Incoming.html
@@ -1,23 +1,23 @@
-
Incoming in iroh_net::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_net::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).
-sourcepub fn accept_with(
+
Implementations§
source§impl Incoming
sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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
§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.§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/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
index 36feed827c..1e22a6d35c 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh_net::endpoint - Rust Struct iroh_net::endpoint::IncomingFuture
source · 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
§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.source§impl<'pin> Unpin for IncomingFuturewhere
__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/2595/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
index d9b9ff6692..c64e243b70 100644
--- a/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2595/docs/iroh_net/endpoint/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
+NodeAddr in iroh_net::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type
whenever a connection to other nodes needs to be established.
Fields§
§node_id: PublicKeyThe node’s identifier.
§info: AddrInfoAddressing information to connect to Self::node_id.
-Implementations§
§impl NodeAddr
pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
-pub fn with_direct_addresses(
+
Implementations§
source§impl NodeAddr
sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr
Adds a relay url to the node’s AddrInfo.
+sourcepub fn with_direct_addresses(
self,
addresses: impl IntoIterator<Item = SocketAddr>
) -> NodeAddr
Adds the given direct addresses to the peer’s AddrInfo.
-pub fn from_parts(
+
sourcepub fn from_parts(
node_id: PublicKey,
relay_url: Option<RelayUrl>,
direct_addresses: Vec<SocketAddr>
) -> NodeAddr
Creates a new NodeAddr from its parts.
-pub fn apply_options(&mut self, opts: AddrInfoOptions)
Applies the options to self.
+sourcepub fn apply_options(&mut self, opts: AddrInfoOptions)
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<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§impl PartialOrd for NodeAddr
source§impl PartialOrd for NodeAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§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 moresource§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/2595/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
index 5b56f65a1b..c12b64b727 100644
--- a/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2595/docs/iroh_net/key/enum.KeyParsingError.html
@@ -1,10 +1,10 @@
-KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
pub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh_net::key - Rust Enum iroh_net::key::KeyParsingError
source · pub enum KeyParsingError {
+ Base32(HexOrBase32ParseError),
Key(Error),
}
Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
+Variants§
§Base32(HexOrBase32ParseError)
Error when decoding the base32.
§Key(Error)
Error when decoding the public key.
-Trait Implementations§
§impl Debug for KeyParsingError
§impl Display for KeyParsingError
§impl Error for KeyParsingError
§fn source(&self) -> Option<&(dyn Error + 'static)>
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<Error> for KeyParsingError
§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.§impl From<HexOrBase32ParseError> for KeyParsingError
§fn from(source: HexOrBase32ParseError) -> 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)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()source§impl From<Error> for KeyParsingError
source§fn from(source: Error) -> KeyParsingError
Converts to this type from the input type.source§impl From<HexOrBase32ParseError> for KeyParsingError
source§fn from(source: HexOrBase32ParseError) -> 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/2595/docs/iroh_net/key/index.html b/pr/2595/docs/iroh_net/key/index.html
index 8ab602f612..4ba1abd5b6 100644
--- a/pr/2595/docs/iroh_net/key/index.html
+++ b/pr/2595/docs/iroh_net/key/index.html
@@ -1,2 +1,2 @@
-iroh_net::key - Rust Expand description
Cryptographic key handling for iroh-net.
+iroh_net::key - Rust
\ No newline at end of file
diff --git a/pr/2595/docs/iroh_net/key/struct.PublicKey.html b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
index 8f3b13a784..9c30e5f859 100644
--- a/pr/2595/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2595/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust