Expand description
API to manage the iroh networking stack.
+Expand description
API to manage the iroh networking stack.
The main entry point is the Client.
The client can be used to get information about the node, such as the node id or node address.
diff --git a/pr/2960/docs/iroh/client/net/struct.Client.html b/pr/2960/docs/iroh/client/net/struct.Client.html index 467df9944d..3f95df4a1e 100644 --- a/pr/2960/docs/iroh/client/net/struct.Client.html +++ b/pr/2960/docs/iroh/client/net/struct.Client.html @@ -1,30 +1,30 @@ -pub struct Client { /* private fields */ }Expand description
Iroh net Client.
+pub struct Client { /* private fields */ }Expand description
Iroh net Client.
Cheaply clonable and threadsafe. Use the iroh net::Client to access the
iroh net methods from a different thread, process, or remote machine.
The node::Client api allows you to get information about the iroh node,
its status, and connection status to other nodes. It also allows you to
provide address information about other nodes to your node.
Implementations§
§impl Client
impl Client
pub async fn remote_info_iter(
+
pub async fn remote_info_iter( +
Implementations§
source§impl Client
impl Client
sourcepub fn new(rpc: RpcClient<RpcService>) -> Client
pub fn new(rpc: RpcClient<RpcService>) -> Client
Creates a new net client
+sourcepub async fn remote_info_iter(
&self
) -> Result<impl Stream<Item = Result<RemoteInfo, Error>>, Error>
pub async fn remote_info_iter( &self ) -> Result<impl Stream<Item = Result<RemoteInfo, Error>>, Error>
Fetches information about currently known remote nodes.
This streams a current snapshot. It does not keep the stream open after finishing transferring the snapshot.
See also Endpoint::remote_info_iter.
pub async fn remote_info(
+
pub async fn remote_info( +
sourcepub async fn remote_info(
&self,
node_id: PublicKey
) -> Result<Option<RemoteInfo>, Error>
pub async fn remote_info( &self, node_id: PublicKey ) -> Result<Option<RemoteInfo>, Error>
Fetches node information about a remote iroh node identified by its NodeId.
See also Endpoint::remote_info.
sourcepub async fn node_id(&self) -> Result<PublicKey, Error>
pub async fn node_id(&self) -> Result<PublicKey, Error>
Fetches the node id of this node.
See also Endpoint::node_id.
sourcepub async fn node_addr(&self) -> Result<NodeAddr, Error>
pub async fn node_addr(&self) -> Result<NodeAddr, Error>
Fetches the NodeAddr for this node.
See also Endpoint::node_addr.
pub async fn add_node_addr(&self, addr: NodeAddr) -> Result<(), Error>
pub async fn add_node_addr(&self, addr: NodeAddr) -> Result<(), Error>
Adds a known node address to this node.
+sourcepub async fn add_node_addr(&self, addr: NodeAddr) -> Result<(), Error>
pub async fn add_node_addr(&self, addr: NodeAddr) -> Result<(), Error>
Adds a known node address to this node.
See also Endpoint::add_node_addr.
pub async fn home_relay(&self) -> Result<Option<RelayUrl>, Error>
pub async fn home_relay(&self) -> Result<Option<RelayUrl>, Error>
Returns the relay server we are connected to.
+sourcepub async fn home_relay(&self) -> Result<Option<RelayUrl>, Error>
pub async fn home_relay(&self) -> Result<Option<RelayUrl>, Error>
Returns the relay server we are connected to.
See also Endpoint::home_relay.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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/2960/docs/iroh/client/net/struct.NodeStatus.html b/pr/2960/docs/iroh/client/net/struct.NodeStatus.html
index 3746dc33cf..e292c4a005 100644
--- a/pr/2960/docs/iroh/client/net/struct.NodeStatus.html
+++ b/pr/2960/docs/iroh/client/net/struct.NodeStatus.html
@@ -1,4 +1,4 @@
-NodeStatus in iroh::client::net - Rust Struct iroh::client::net::NodeStatus
pub struct NodeStatus {
+NodeStatus in iroh::client::net - Rust Struct iroh::client::net::NodeStatus
source · pub struct NodeStatus {
pub addr: NodeAddr,
pub listen_addrs: Vec<SocketAddr>,
pub version: String,
@@ -8,10 +8,10 @@
§listen_addrs: Vec<SocketAddr>The bound listening addresses of the node
§version: StringThe version of the node
§rpc_addr: Option<SocketAddr>RPC address, if currently listening.
-Trait Implementations§
§impl Debug for NodeStatus
§impl<'de> Deserialize<'de> for NodeStatus
§fn deserialize<__D>(
+
Trait Implementations§
source§impl Debug for NodeStatus
source§impl<'de> Deserialize<'de> for NodeStatus
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<NodeStatus, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Serialize for NodeStatus
§fn serialize<__S>(
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for NodeStatus
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
diff --git a/pr/2960/docs/iroh/client/node/index.html b/pr/2960/docs/iroh/client/node/index.html
index c786bf619f..745af1a938 100644
--- a/pr/2960/docs/iroh/client/node/index.html
+++ b/pr/2960/docs/iroh/client/node/index.html
@@ -1,3 +1,3 @@
-iroh::client::node - Rust Expand description
Client to interact with an iroh node.
+iroh::client::node - Rust
\ No newline at end of file
diff --git a/pr/2960/docs/iroh/client/node/struct.Client.html b/pr/2960/docs/iroh/client/node/struct.Client.html
index 3656725d28..84323ebb87 100644
--- a/pr/2960/docs/iroh/client/node/struct.Client.html
+++ b/pr/2960/docs/iroh/client/node/struct.Client.html
@@ -1,11 +1,11 @@
-Client in iroh::client::node - Rust pub struct Client { /* private fields */ }
Expand description
Client to interact with an iroh node.
-Implementations§
§impl Client
pub async fn shutdown(&self, force: bool) -> Result<(), Error>
Shuts down the node.
+Client in iroh::client::node - Rust pub struct Client { /* private fields */ }
Expand description
Client to interact with an iroh node.
+Implementations§
source§impl Client
sourcepub fn new(rpc: RpcClient<RpcService>) -> Client
Creates a new node client
+sourcepub async fn shutdown(&self, force: bool) -> Result<(), Error>
Shuts down the node.
If force is true, the node will be shut down instantly without
waiting for things to stop gracefully.
-pub async fn stats(&self) -> Result<BTreeMap<String, CounterStats>, Error>
Fetches statistics of the running node.
-pub async fn status(&self) -> Result<NodeStatus, Error>
Fetches status information about this node.
-Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Client
§impl !RefUnwindSafe for Client
§impl Send for Client
§impl Sync for Client
§impl Unpin for Client
§impl !UnwindSafe for Client
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Client
§impl !RefUnwindSafe for Client
§impl Send for Client
§impl Sync for Client
§impl Unpin for Client
§impl !UnwindSafe for Client
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh/metrics/fn.get_metrics.html b/pr/2960/docs/iroh/metrics/fn.get_metrics.html
index a2a237c55d..332d201791 100644
--- a/pr/2960/docs/iroh/metrics/fn.get_metrics.html
+++ b/pr/2960/docs/iroh/metrics/fn.get_metrics.html
@@ -1,3 +1,3 @@
-get_metrics in iroh::metrics - Rust Function iroh::metrics::get_metrics
source · pub fn get_metrics() -> Result<BTreeMap<String, CounterStats>>
Available on crate feature metrics only.Expand description
Collect the current metrics into a hash map.
+get_metrics in iroh::metrics - Rust Function iroh::metrics::get_metrics
source · pub fn get_metrics() -> Result<BTreeMap<String, CounterStats>>
Available on crate feature metrics only.Expand description
Collect the current metrics into a hash map.
TODO: Only counters are supported for now, other metrics will be skipped without error.
\ No newline at end of file
diff --git a/pr/2960/docs/iroh/router/index.html b/pr/2960/docs/iroh/router/index.html
index d672df6dec..d80583840c 100644
--- a/pr/2960/docs/iroh/router/index.html
+++ b/pr/2960/docs/iroh/router/index.html
@@ -1 +1 @@
-iroh::router - Rust
\ No newline at end of file
+iroh::router - Rust
\ No newline at end of file
diff --git a/pr/2960/docs/iroh/router/struct.ProtocolMap.html b/pr/2960/docs/iroh/router/struct.ProtocolMap.html
index 3d29b1d5f4..1d112c7ce0 100644
--- a/pr/2960/docs/iroh/router/struct.ProtocolMap.html
+++ b/pr/2960/docs/iroh/router/struct.ProtocolMap.html
@@ -1,12 +1,12 @@
-ProtocolMap in iroh::router - Rust Struct iroh::router::ProtocolMap
source · pub struct ProtocolMap(/* private fields */);
Expand description
A typed map of protocol handlers, mapping them from ALPNs.
-Implementations§
source§impl ProtocolMap
sourcepub fn get_typed<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
+ProtocolMap in iroh::router - Rust Struct iroh::router::ProtocolMap
pub struct ProtocolMap(/* private fields */);
Expand description
A typed map of protocol handlers, mapping them from ALPNs.
+Implementations§
§impl ProtocolMap
pub fn get_typed<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
P: ProtocolHandler,
Returns the registered protocol handler for an ALPN as a concrete type.
-sourcepub fn get(&self, alpn: &[u8]) -> Option<Arc<dyn ProtocolHandler>>
Returns the registered protocol handler for an ALPN as a Arc<dyn ProtocolHandler>.
-sourcepub fn insert(&mut self, alpn: Vec<u8>, handler: Arc<dyn ProtocolHandler>)
Inserts a protocol handler.
-sourcepub fn alpns(&self) -> impl Iterator<Item = &Vec<u8>>
Returns an iterator of all registered ALPN protocol identifiers.
-pub fn get(&self, alpn: &[u8]) -> Option<Arc<dyn ProtocolHandler>>
Returns the registered protocol handler for an ALPN as a Arc<dyn ProtocolHandler>.
+pub fn insert(&mut self, alpn: Vec<u8>, handler: Arc<dyn ProtocolHandler>)
Inserts a protocol handler.
+pub fn alpns(&self) -> impl Iterator<Item = &Vec<u8>>
Returns an iterator of all registered ALPN protocol identifiers.
+pub async fn shutdown(&self)
Shuts down all protocol handlers.
Calls and awaits ProtocolHandler::shutdown for all registered handlers concurrently.
-Trait Implementations§
source§impl Clone for ProtocolMap
source§fn clone(&self) -> ProtocolMap
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 ProtocolMap
source§impl Default for ProtocolMap
source§fn default() -> ProtocolMap
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ProtocolMap
§impl !RefUnwindSafe for ProtocolMap
§impl Send for ProtocolMap
§impl Sync for ProtocolMap
§impl Unpin for ProtocolMap
§impl !UnwindSafe for ProtocolMap
Blanket Implementations§
Trait Implementations§
§impl Clone for ProtocolMap
§fn clone(&self) -> ProtocolMap
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 ProtocolMap
§impl Default for ProtocolMap
§fn default() -> ProtocolMap
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ProtocolMap
§impl !RefUnwindSafe for ProtocolMap
§impl Send for ProtocolMap
§impl Sync for ProtocolMap
§impl Unpin for ProtocolMap
§impl !UnwindSafe for ProtocolMap
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh/router/struct.Router.html b/pr/2960/docs/iroh/router/struct.Router.html
index 6649757e5d..7e3d70f56a 100644
--- a/pr/2960/docs/iroh/router/struct.Router.html
+++ b/pr/2960/docs/iroh/router/struct.Router.html
@@ -1,8 +1,8 @@
-Router in iroh::router - Rust pub struct Router { /* private fields */ }
Implementations§
source§impl Router
sourcepub fn builder(endpoint: Endpoint) -> RouterBuilder
sourcepub fn get_protocol<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
+Router in iroh::router - Rust pub struct Router { /* private fields */ }
Implementations§
§impl Router
pub fn builder(endpoint: Endpoint) -> RouterBuilder
pub fn get_protocol<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
P: ProtocolHandler,
Returns a protocol handler for an ALPN.
This downcasts to the concrete type and returns None if the handler registered for alpn
does not match the passed type.
-sourcepub fn endpoint(&self) -> &Endpoint
sourcepub async fn shutdown(self) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Router
§impl !RefUnwindSafe for Router
§impl Send for Router
§impl Sync for Router
§impl Unpin for Router
§impl !UnwindSafe for Router
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Router
§impl !RefUnwindSafe for Router
§impl Send for Router
§impl Sync for Router
§impl Unpin for Router
§impl !UnwindSafe for Router
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh/router/struct.RouterBuilder.html b/pr/2960/docs/iroh/router/struct.RouterBuilder.html
index 7c6697ee56..3bfe8e6a13 100644
--- a/pr/2960/docs/iroh/router/struct.RouterBuilder.html
+++ b/pr/2960/docs/iroh/router/struct.RouterBuilder.html
@@ -1,13 +1,13 @@
-RouterBuilder in iroh::router - Rust Struct iroh::router::RouterBuilder
source · pub struct RouterBuilder { /* private fields */ }
Implementations§
source§impl RouterBuilder
sourcepub fn new(endpoint: Endpoint) -> RouterBuilder
sourcepub fn accept(
+RouterBuilder in iroh::router - Rust Struct iroh::router::RouterBuilder
pub struct RouterBuilder { /* private fields */ }
Implementations§
§impl RouterBuilder
pub fn new(endpoint: Endpoint) -> RouterBuilder
pub fn accept(
self,
alpn: impl AsRef<[u8]>,
handler: Arc<dyn ProtocolHandler>
-) -> RouterBuilder
sourcepub fn get_protocol<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
+) -> RouterBuilderpub fn get_protocol<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
P: ProtocolHandler,
Returns a protocol handler for an ALPN.
This downcasts to the concrete type and returns None if the handler registered for alpn
does not match the passed type.
-sourcepub async fn spawn(self) -> Result<Router, Error>
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for RouterBuilder
§impl !RefUnwindSafe for RouterBuilder
§impl Send for RouterBuilder
§impl Sync for RouterBuilder
§impl Unpin for RouterBuilder
§impl !UnwindSafe for RouterBuilder
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for RouterBuilder
§impl !RefUnwindSafe for RouterBuilder
§impl Send for RouterBuilder
§impl Sync for RouterBuilder
§impl Unpin for RouterBuilder
§impl !UnwindSafe for RouterBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh/router/trait.ProtocolHandler.html b/pr/2960/docs/iroh/router/trait.ProtocolHandler.html
index b1fb417ab6..6135bdb3f1 100644
--- a/pr/2960/docs/iroh/router/trait.ProtocolHandler.html
+++ b/pr/2960/docs/iroh/router/trait.ProtocolHandler.html
@@ -1,4 +1,4 @@
-ProtocolHandler in iroh::router - Rust Trait iroh::router::ProtocolHandler
source · pub trait ProtocolHandler: Send + Sync + IntoArcAny + Debug + 'static {
+ProtocolHandler in iroh::router - Rust Trait iroh::router::ProtocolHandler
pub trait ProtocolHandler: Send + Sync + IntoArcAny + Debug + 'static {
// Required method
fn accept(
self: Arc<Self>,
@@ -13,10 +13,10 @@
Implement this trait on a struct that should handle incoming connections.
The protocol handler must then be registered on the node for an ALPN protocol with
crate::RouterBuilder::accept.
-
Required Methods§
Required Methods§
Provided Methods§
Provided Methods§
Implementors§
\ No newline at end of file
diff --git a/pr/2960/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2960/docs/iroh_net/endpoint/struct.AddrInfo.html
index c195611ca8..7b2333392f 100644
--- a/pr/2960/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2960/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/2960/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2960/docs/iroh_net/endpoint/struct.NodeAddr.html
index 6983a09d92..5761e1de53 100644
--- a/pr/2960/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2960/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,40 +25,40 @@ 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: impl IntoIterator<Item = 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 more§impl From<NodeAddr> for NodeTicket
§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
-§impl From<NodeTicket> for NodeAddr
§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-source§impl From<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl From<NodeAddr> for NodeTicket
source§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
+source§impl From<NodeTicket> for NodeAddr
source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+source§impl From<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§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/2960/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2960/docs/iroh_net/key/enum.KeyParsingError.html
index a6a5c061bc..ec42bbe54a 100644
--- a/pr/2960/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2960/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/2960/docs/iroh_net/key/index.html b/pr/2960/docs/iroh_net/key/index.html
index fe317e06b2..f6ce28ff2d 100644
--- a/pr/2960/docs/iroh_net/key/index.html
+++ b/pr/2960/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/2960/docs/iroh_net/key/struct.PublicKey.html b/pr/2960/docs/iroh_net/key/struct.PublicKey.html
index 7e8f54863b..7aaafc22a6 100644
--- a/pr/2960/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2960/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh_net::key - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is just a 32 byte array, but a key has associated crypto
information that is cached for performance reasons.
The cache item will be refreshed every time a crypto operation is performed,
or when a key is deserialised or created from a byte array.
Serialisation or creation from a byte array is cheap if the key is already
in the cache, but expensive if it is not.
-Implementations§
§impl PublicKey
pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
+Implementations§
source§impl PublicKey
sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
§Warning
This will return a [SignatureError] if the bytes passed into this method do not represent
a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.
See [VerifyingKey::from_bytes] for details.
-pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
+sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
§Return
Returns Ok(()) if the signature is valid, and Err otherwise.
-Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for PublicKey
source§fn deserialize<D>(
deserializer: D
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromStr for PublicKey
§impl Hash for PublicKey
source§impl Ord for PublicKey
source§impl PartialEq for PublicKey
§impl PartialOrd for PublicKey
source§impl PartialOrd for PublicKey
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 PublicKey
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Copy for PublicKey
§impl Eq for PublicKey
§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
source§impl Copy for PublicKey
source§impl Eq for PublicKey
source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/key/struct.SecretKey.html b/pr/2960/docs/iroh_net/key/struct.SecretKey.html
index 42742da74a..e35aa9673f 100644
--- a/pr/2960/docs/iroh_net/key/struct.SecretKey.html
+++ b/pr/2960/docs/iroh_net/key/struct.SecretKey.html
@@ -1,24 +1,24 @@
-SecretKey in iroh_net::key - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
-Implementations§
§impl SecretKey
pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKeywhere
+SecretKey in iroh_net::key - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
+Implementations§
source§impl SecretKey
sourcepub fn generate() -> SecretKey
Generate a new SecretKey with the default randomness generator.
+sourcepub fn generate_with_rng<R>(csprng: &mut R) -> SecretKeywhere
R: CryptoRngCore + ?Sized,
Generate a new SecretKey with a randomness generator.
-pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>
Serialise this key to OpenSSH format.
-pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>where
+
sourcepub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>
Serialise this key to OpenSSH format.
+sourcepub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
Deserialise this key from OpenSSH format.
-sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for SecretKey
source§fn deserialize<D>(
deserializer: D
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for SecretKey
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
§impl !Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2960/docs/iroh_net/key/struct.SharedSecret.html b/pr/2960/docs/iroh_net/key/struct.SharedSecret.html
index c5fadbfb4f..6c79c6c567 100644
--- a/pr/2960/docs/iroh_net/key/struct.SharedSecret.html
+++ b/pr/2960/docs/iroh_net/key/struct.SharedSecret.html
@@ -1,7 +1,7 @@
-SharedSecret in iroh_net::key - Rust Struct iroh_net::key::SharedSecret
pub struct SharedSecret(/* private fields */);
Expand description
Shared Secret.
-Implementations§
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> Any for Twhere
+SharedSecret in iroh_net::key - Rust Struct iroh_net::key::SharedSecret
source · pub struct SharedSecret(/* private fields */);
Expand description
Shared Secret.
+Implementations§
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/key/type.NodeId.html b/pr/2960/docs/iroh_net/key/type.NodeId.html
index e45ed49bae..744b824071 100644
--- a/pr/2960/docs/iroh_net/key/type.NodeId.html
+++ b/pr/2960/docs/iroh_net/key/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh_net::key - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh_net::key - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/2960/docs/iroh_net/struct.AddrInfo.html b/pr/2960/docs/iroh_net/struct.AddrInfo.html
index 7647d1c08b..4ea3dce1e0 100644
--- a/pr/2960/docs/iroh_net/struct.AddrInfo.html
+++ b/pr/2960/docs/iroh_net/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net - Rust pub struct AddrInfo {
+AddrInfo in iroh_net - 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/2960/docs/iroh_net/struct.NodeAddr.html b/pr/2960/docs/iroh_net/struct.NodeAddr.html
index a846006a65..54f6a54f4d 100644
--- a/pr/2960/docs/iroh_net/struct.NodeAddr.html
+++ b/pr/2960/docs/iroh_net/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net - Rust pub struct NodeAddr {
+NodeAddr in iroh_net - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,40 +25,40 @@ 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: impl IntoIterator<Item = 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 more§impl From<NodeAddr> for NodeTicket
§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
-§impl From<NodeTicket> for NodeAddr
§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-source§impl From<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl From<NodeAddr> for NodeTicket
source§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
+source§impl From<NodeTicket> for NodeAddr
source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+source§impl From<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§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/2960/docs/iroh_net/struct.RelayMap.html b/pr/2960/docs/iroh_net/struct.RelayMap.html
index 574fbed079..a0bafe2fa3 100644
--- a/pr/2960/docs/iroh_net/struct.RelayMap.html
+++ b/pr/2960/docs/iroh_net/struct.RelayMap.html
@@ -1,24 +1,24 @@
-RelayMap in iroh_net - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh_net - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
source§impl RelayMap
sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
-pub fn from_nodes<I>(
+
Trait Implementations§
Trait Implementations§
source§impl PartialEq for RelayMap
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
source§impl Eq for RelayMap
source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/struct.RelayNode.html b/pr/2960/docs/iroh_net/struct.RelayNode.html
index 99bdb4ef4a..2ec053da3e 100644
--- a/pr/2960/docs/iroh_net/struct.RelayNode.html
+++ b/pr/2960/docs/iroh_net/struct.RelayNode.html
@@ -1,4 +1,4 @@
-RelayNode in iroh_net - Rust pub struct RelayNode {
+RelayNode in iroh_net - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
@@ -10,21 +10,21 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
source§impl<'de> Deserialize<'de> for RelayNode
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for RelayNode
source§impl PartialEq for RelayNode
§impl PartialOrd for RelayNode
source§impl PartialOrd for RelayNode
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 RelayNode
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for RelayNode
source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/struct.RelayUrl.html b/pr/2960/docs/iroh_net/struct.RelayUrl.html
index c023830d91..4c89e6d6dd 100644
--- a/pr/2960/docs/iroh_net/struct.RelayUrl.html
+++ b/pr/2960/docs/iroh_net/struct.RelayUrl.html
@@ -1,4 +1,4 @@
-RelayUrl in iroh_net - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
+RelayUrl in iroh_net - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
This is but a wrapper around Url, with a few custom tweaks:
-
@@ -443,30 +443,30 @@ or if
Path::new_opt() returns None.
(That is, if the percent-decoded path contains a NUL byte or,
for a Windows path, is not UTF-8.)
This method is only available if the std Cargo feature is enabled.
-
Trait Implementations§
Trait Implementations§
source§impl Deref for RelayUrl
§impl<'de> Deserialize<'de> for RelayUrl
§fn deserialize<__D>(
+
source§impl<'de> Deserialize<'de> for RelayUrl
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl FromStr for RelayUrl
Support for parsing strings directly.
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read moresource§impl FromStr for RelayUrl
Support for parsing strings directly.
If you need more control over the error first create a Url and use RelayUrl::from
instead.
-§impl Hash for RelayUrl
source§impl Ord for RelayUrl
source§impl PartialEq for RelayUrl
§impl PartialOrd for RelayUrl
source§impl PartialOrd for RelayUrl
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 RelayUrl
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayUrl
§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for RelayUrl
source§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/ticket/struct.NodeTicket.html b/pr/2960/docs/iroh_net/ticket/struct.NodeTicket.html
index 63f9a8449f..8fd5ff47ca 100644
--- a/pr/2960/docs/iroh_net/ticket/struct.NodeTicket.html
+++ b/pr/2960/docs/iroh_net/ticket/struct.NodeTicket.html
@@ -1,4 +1,4 @@
-NodeTicket in iroh_net::ticket - Rust Struct iroh_net::ticket::NodeTicket
pub struct NodeTicket { /* private fields */ }
Expand description
A token containing information for establishing a connection to a node.
+NodeTicket in iroh_net::ticket - Rust Struct iroh_net::ticket::NodeTicket
source · pub struct NodeTicket { /* private fields */ }
Expand description
A token containing information for establishing a connection to a node.
Contains
- The
NodeId of the node to connect to (a 32-byte ed25519 public key).
@@ -10,20 +10,20 @@ possible to do so.
This NodeTicket is a single item which can be easily serialized and deserialized and
implements the Ticket trait. The Display and FromStr traits can also be
used to round-trip the ticket to string.
-
Implementations§
§impl NodeTicket
Trait Implementations§
§impl Clone for NodeTicket
§fn clone(&self) -> NodeTicket
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 NodeTicket
§impl<'de> Deserialize<'de> for NodeTicket
§fn deserialize<D>(
+
Implementations§
Trait Implementations§
source§impl Clone for NodeTicket
source§fn clone(&self) -> NodeTicket
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 NodeTicket
source§impl<'de> Deserialize<'de> for NodeTicket
source§fn deserialize<D>(
deserializer: D
) -> Result<NodeTicket, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for NodeTicket
§impl From<NodeAddr> for NodeTicket
§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
-§impl From<NodeTicket> for NodeAddr
§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-§impl FromStr for NodeTicket
§impl PartialEq for NodeTicket
§fn eq(&self, other: &NodeTicket) -> bool
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for NodeTicket
source§impl From<NodeAddr> for NodeTicket
source§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
+source§impl From<NodeTicket> for NodeAddr
source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+source§impl FromStr for NodeTicket
source§impl PartialEq for NodeTicket
source§fn eq(&self, other: &NodeTicket) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl Serialize for NodeTicket
source§impl Serialize for NodeTicket
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 Ticket for NodeTicket
§fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>
Deserialize from the base32 string representation bytes.§fn deserialize(str: &str) -> Result<Self, Error>
Deserialize from a string.§impl Eq for NodeTicket
§impl StructuralPartialEq for NodeTicket
Auto Trait Implementations§
§impl Freeze for NodeTicket
§impl RefUnwindSafe for NodeTicket
§impl Send for NodeTicket
§impl Sync for NodeTicket
§impl Unpin for NodeTicket
§impl UnwindSafe for NodeTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Ticket for NodeTicket
source§fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>
Deserialize from the base32 string representation bytes.source§impl Eq for NodeTicket
source§impl StructuralPartialEq for NodeTicket
Auto Trait Implementations§
§impl Freeze for NodeTicket
§impl RefUnwindSafe for NodeTicket
§impl Send for NodeTicket
§impl Sync for NodeTicket
§impl Unpin for NodeTicket
§impl UnwindSafe for NodeTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/ticket/trait.Ticket.html b/pr/2960/docs/iroh_net/ticket/trait.Ticket.html
index 62d1eea749..aeb5ad78e9 100644
--- a/pr/2960/docs/iroh_net/ticket/trait.Ticket.html
+++ b/pr/2960/docs/iroh_net/ticket/trait.Ticket.html
@@ -1,13 +1,13 @@
-Ticket in iroh_net::ticket - Rust pub trait Ticket: Sized {
+Ticket in iroh_net::ticket - Rust pub trait Ticket: Sized {
const KIND: &'static str;
// Required methods
fn to_bytes(&self) -> Vec<u8> ⓘ;
- fn from_bytes(bytes: &[u8]) -> Result<Self, Error>;
+ fn from_bytes(bytes: &[u8]) -> Result<Self, Error>;
// Provided methods
fn serialize(&self) -> String { ... }
- fn deserialize(str: &str) -> Result<Self, Error> { ... }
+ fn deserialize(str: &str) -> Result<Self, Error> { ... }
}
Expand description
A ticket is a serializable object combining information required for an operation.
Typically tickets contain all information required for an operation, e.g. an iroh blob
ticket would contain the hash of the data as well as information about how to reach the
@@ -18,10 +18,10 @@ ticket will be prepended to the string to make it somewhat self describing.
versioning, others might not.
The serialization format for converting the ticket from and to bytes is left
to the implementer. We recommend using postcard for serialization.
-Required Associated Constants§
Required Associated Constants§
Required Methods§
fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Deserialize from the base32 string representation bytes.
-Provided Methods§
fn deserialize(str: &str) -> Result<Self, Error>
Deserialize from a string.
-Object Safety§
This trait is not object safe.Implementors§
\ No newline at end of file
+
Required Methods§
sourcefn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Deserialize from the base32 string representation bytes.
+Provided Methods§
sourcefn deserialize(str: &str) -> Result<Self, Error>
Deserialize from a string.
+Object Safety§
This trait is not object safe.Implementors§
\ No newline at end of file
diff --git a/pr/2960/docs/iroh_net/type.NodeId.html b/pr/2960/docs/iroh_net/type.NodeId.html
index 22237ce40e..c99be03560 100644
--- a/pr/2960/docs/iroh_net/type.NodeId.html
+++ b/pr/2960/docs/iroh_net/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh_net - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh_net - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/2960/docs/type.impl/iroh_net/key/struct.PublicKey.js b/pr/2960/docs/type.impl/iroh_net/key/struct.PublicKey.js
index fe33e54257..e5e292b351 100644
--- a/pr/2960/docs/type.impl/iroh_net/key/struct.PublicKey.js
+++ b/pr/2960/docs/type.impl/iroh_net/key/struct.PublicKey.js
@@ -1,3 +1,3 @@
(function() {var type_impls = {
-"iroh_net":[["","AsRef<[u8]>","iroh_net::NodeId"],["","Clone","iroh_net::NodeId"],["","Debug","iroh_net::NodeId"],["§impl<'de> Deserialize<'de> for PublicKey
§fn deserialize<D>(\n deserializer: D\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where\n D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more","Deserialize<'de>","iroh_net::NodeId"],["","Display","iroh_net::NodeId"],["","From","iroh_net::NodeId"],["§impl FromStr for PublicKey
","FromStr","iroh_net::NodeId"],["","Hash","iroh_net::NodeId"],["§impl Ord for PublicKey
","Ord","iroh_net::NodeId"],["§impl PartialEq for PublicKey
","PartialEq","iroh_net::NodeId"],["§impl PartialOrd for PublicKey
§fn partial_cmp(&self, other: &PublicKey) -> 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 <=\noperator. Read more","PartialOrd","iroh_net::NodeId"],["§impl PublicKey
pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
\n§Warning
\nThis will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.
\n",0,"iroh_net::NodeId"],["§impl Serialize for PublicKey
§fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where\n S: Serializer,
Serialize this value into the given Serde serializer. Read more","Serialize","iroh_net::NodeId"],["","TryFrom<&[u8]>","iroh_net::NodeId"],["","TryFrom<&[u8; 32]>","iroh_net::NodeId"],["§impl Copy for PublicKey
","Copy","iroh_net::NodeId"],["§impl Eq for PublicKey
","Eq","iroh_net::NodeId"],["§impl StructuralPartialEq for PublicKey
","StructuralPartialEq","iroh_net::NodeId"]]
+"iroh_net":[["","AsRef<[u8]>","iroh_net::NodeId"],["","Clone","iroh_net::NodeId"],["","Debug","iroh_net::NodeId"],["source§impl<'de> Deserialize<'de> for PublicKey
source§fn deserialize<D>(\n deserializer: D\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where\n D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more","Deserialize<'de>","iroh_net::NodeId"],["","Display","iroh_net::NodeId"],["","From","iroh_net::NodeId"],["source§impl FromStr for PublicKey
","FromStr","iroh_net::NodeId"],["","Hash","iroh_net::NodeId"],["source§impl Ord for PublicKey
1.21.0 · source§fn max(self, other: Self) -> Selfwhere\n Self: Sized,
Compares and returns the maximum of two values. Read more","Ord","iroh_net::NodeId"],["source§impl PartialEq for PublicKey
","PartialEq","iroh_net::NodeId"],["source§impl PartialOrd for PublicKey
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 <=\noperator. Read more","PartialOrd","iroh_net::NodeId"],["source§impl PublicKey
sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
\n§Warning
\nThis will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.
\n",0,"iroh_net::NodeId"],["source§impl Serialize for PublicKey
source§fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where\n S: Serializer,
Serialize this value into the given Serde serializer. Read more","Serialize","iroh_net::NodeId"],["","TryFrom<&[u8]>","iroh_net::NodeId"],["","TryFrom<&[u8; 32]>","iroh_net::NodeId"],["source§impl Copy for PublicKey
","Copy","iroh_net::NodeId"],["source§impl Eq for PublicKey
","Eq","iroh_net::NodeId"],["source§impl StructuralPartialEq for PublicKey
","StructuralPartialEq","iroh_net::NodeId"]]
};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})()
\ No newline at end of file
Struct iroh::client::net::NodeStatus
pub struct NodeStatus {
+NodeStatus in iroh::client::net - Rust Struct iroh::client::net::NodeStatus
source · pub struct NodeStatus {
pub addr: NodeAddr,
pub listen_addrs: Vec<SocketAddr>,
pub version: String,
@@ -8,10 +8,10 @@
§listen_addrs: Vec<SocketAddr>The bound listening addresses of the node
§version: StringThe version of the node
§rpc_addr: Option<SocketAddr>RPC address, if currently listening.
-Trait Implementations§
§impl Debug for NodeStatus
§impl<'de> Deserialize<'de> for NodeStatus
§fn deserialize<__D>(
+
Trait Implementations§
source§impl Debug for NodeStatus
source§impl<'de> Deserialize<'de> for NodeStatus
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<NodeStatus, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Serialize for NodeStatus
§fn serialize<__S>(
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for NodeStatus
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
diff --git a/pr/2960/docs/iroh/client/node/index.html b/pr/2960/docs/iroh/client/node/index.html
index c786bf619f..745af1a938 100644
--- a/pr/2960/docs/iroh/client/node/index.html
+++ b/pr/2960/docs/iroh/client/node/index.html
@@ -1,3 +1,3 @@
-iroh::client::node - Rust Expand description
Client to interact with an iroh node.
+iroh::client::node - Rust
\ No newline at end of file
diff --git a/pr/2960/docs/iroh/client/node/struct.Client.html b/pr/2960/docs/iroh/client/node/struct.Client.html
index 3656725d28..84323ebb87 100644
--- a/pr/2960/docs/iroh/client/node/struct.Client.html
+++ b/pr/2960/docs/iroh/client/node/struct.Client.html
@@ -1,11 +1,11 @@
-Client in iroh::client::node - Rust pub struct Client { /* private fields */ }
Expand description
Client to interact with an iroh node.
-Implementations§
§impl Client
pub async fn shutdown(&self, force: bool) -> Result<(), Error>
Shuts down the node.
+Client in iroh::client::node - Rust pub struct Client { /* private fields */ }
Expand description
Client to interact with an iroh node.
+Implementations§
source§impl Client
sourcepub fn new(rpc: RpcClient<RpcService>) -> Client
Creates a new node client
+sourcepub async fn shutdown(&self, force: bool) -> Result<(), Error>
Shuts down the node.
If force is true, the node will be shut down instantly without
waiting for things to stop gracefully.
-pub async fn stats(&self) -> Result<BTreeMap<String, CounterStats>, Error>
Fetches statistics of the running node.
-pub async fn status(&self) -> Result<NodeStatus, Error>
Fetches status information about this node.
-Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Client
§impl !RefUnwindSafe for Client
§impl Send for Client
§impl Sync for Client
§impl Unpin for Client
§impl !UnwindSafe for Client
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Client
§impl !RefUnwindSafe for Client
§impl Send for Client
§impl Sync for Client
§impl Unpin for Client
§impl !UnwindSafe for Client
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh/metrics/fn.get_metrics.html b/pr/2960/docs/iroh/metrics/fn.get_metrics.html
index a2a237c55d..332d201791 100644
--- a/pr/2960/docs/iroh/metrics/fn.get_metrics.html
+++ b/pr/2960/docs/iroh/metrics/fn.get_metrics.html
@@ -1,3 +1,3 @@
-get_metrics in iroh::metrics - Rust Function iroh::metrics::get_metrics
source · pub fn get_metrics() -> Result<BTreeMap<String, CounterStats>>
Available on crate feature metrics only.Expand description
Collect the current metrics into a hash map.
+get_metrics in iroh::metrics - Rust Function iroh::metrics::get_metrics
source · pub fn get_metrics() -> Result<BTreeMap<String, CounterStats>>
Available on crate feature metrics only.Expand description
Collect the current metrics into a hash map.
TODO: Only counters are supported for now, other metrics will be skipped without error.
\ No newline at end of file
diff --git a/pr/2960/docs/iroh/router/index.html b/pr/2960/docs/iroh/router/index.html
index d672df6dec..d80583840c 100644
--- a/pr/2960/docs/iroh/router/index.html
+++ b/pr/2960/docs/iroh/router/index.html
@@ -1 +1 @@
-iroh::router - Rust
\ No newline at end of file
+iroh::router - Rust
\ No newline at end of file
diff --git a/pr/2960/docs/iroh/router/struct.ProtocolMap.html b/pr/2960/docs/iroh/router/struct.ProtocolMap.html
index 3d29b1d5f4..1d112c7ce0 100644
--- a/pr/2960/docs/iroh/router/struct.ProtocolMap.html
+++ b/pr/2960/docs/iroh/router/struct.ProtocolMap.html
@@ -1,12 +1,12 @@
-ProtocolMap in iroh::router - Rust Struct iroh::router::ProtocolMap
source · pub struct ProtocolMap(/* private fields */);
Expand description
A typed map of protocol handlers, mapping them from ALPNs.
-Implementations§
source§impl ProtocolMap
sourcepub fn get_typed<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
+ProtocolMap in iroh::router - Rust Struct iroh::router::ProtocolMap
pub struct ProtocolMap(/* private fields */);
Expand description
A typed map of protocol handlers, mapping them from ALPNs.
+Implementations§
§impl ProtocolMap
pub fn get_typed<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
P: ProtocolHandler,
Returns the registered protocol handler for an ALPN as a concrete type.
-sourcepub fn get(&self, alpn: &[u8]) -> Option<Arc<dyn ProtocolHandler>>
Returns the registered protocol handler for an ALPN as a Arc<dyn ProtocolHandler>.
-sourcepub fn insert(&mut self, alpn: Vec<u8>, handler: Arc<dyn ProtocolHandler>)
Inserts a protocol handler.
-sourcepub fn alpns(&self) -> impl Iterator<Item = &Vec<u8>>
Returns an iterator of all registered ALPN protocol identifiers.
-pub fn get(&self, alpn: &[u8]) -> Option<Arc<dyn ProtocolHandler>>
Returns the registered protocol handler for an ALPN as a Arc<dyn ProtocolHandler>.
+pub fn insert(&mut self, alpn: Vec<u8>, handler: Arc<dyn ProtocolHandler>)
Inserts a protocol handler.
+pub fn alpns(&self) -> impl Iterator<Item = &Vec<u8>>
Returns an iterator of all registered ALPN protocol identifiers.
+pub async fn shutdown(&self)
Shuts down all protocol handlers.
Calls and awaits ProtocolHandler::shutdown for all registered handlers concurrently.
-Trait Implementations§
source§impl Clone for ProtocolMap
source§fn clone(&self) -> ProtocolMap
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 ProtocolMap
source§impl Default for ProtocolMap
source§fn default() -> ProtocolMap
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ProtocolMap
§impl !RefUnwindSafe for ProtocolMap
§impl Send for ProtocolMap
§impl Sync for ProtocolMap
§impl Unpin for ProtocolMap
§impl !UnwindSafe for ProtocolMap
Blanket Implementations§
Trait Implementations§
§impl Clone for ProtocolMap
§fn clone(&self) -> ProtocolMap
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 ProtocolMap
§impl Default for ProtocolMap
§fn default() -> ProtocolMap
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ProtocolMap
§impl !RefUnwindSafe for ProtocolMap
§impl Send for ProtocolMap
§impl Sync for ProtocolMap
§impl Unpin for ProtocolMap
§impl !UnwindSafe for ProtocolMap
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh/router/struct.Router.html b/pr/2960/docs/iroh/router/struct.Router.html
index 6649757e5d..7e3d70f56a 100644
--- a/pr/2960/docs/iroh/router/struct.Router.html
+++ b/pr/2960/docs/iroh/router/struct.Router.html
@@ -1,8 +1,8 @@
-Router in iroh::router - Rust pub struct Router { /* private fields */ }
Implementations§
source§impl Router
sourcepub fn builder(endpoint: Endpoint) -> RouterBuilder
sourcepub fn get_protocol<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
+Router in iroh::router - Rust pub struct Router { /* private fields */ }
Implementations§
§impl Router
pub fn builder(endpoint: Endpoint) -> RouterBuilder
pub fn get_protocol<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
P: ProtocolHandler,
Returns a protocol handler for an ALPN.
This downcasts to the concrete type and returns None if the handler registered for alpn
does not match the passed type.
-sourcepub fn endpoint(&self) -> &Endpoint
sourcepub async fn shutdown(self) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Router
§impl !RefUnwindSafe for Router
§impl Send for Router
§impl Sync for Router
§impl Unpin for Router
§impl !UnwindSafe for Router
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Router
§impl !RefUnwindSafe for Router
§impl Send for Router
§impl Sync for Router
§impl Unpin for Router
§impl !UnwindSafe for Router
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh/router/struct.RouterBuilder.html b/pr/2960/docs/iroh/router/struct.RouterBuilder.html
index 7c6697ee56..3bfe8e6a13 100644
--- a/pr/2960/docs/iroh/router/struct.RouterBuilder.html
+++ b/pr/2960/docs/iroh/router/struct.RouterBuilder.html
@@ -1,13 +1,13 @@
-RouterBuilder in iroh::router - Rust Struct iroh::router::RouterBuilder
source · pub struct RouterBuilder { /* private fields */ }
Implementations§
source§impl RouterBuilder
sourcepub fn new(endpoint: Endpoint) -> RouterBuilder
sourcepub fn accept(
+RouterBuilder in iroh::router - Rust Struct iroh::router::RouterBuilder
pub struct RouterBuilder { /* private fields */ }
Implementations§
§impl RouterBuilder
pub fn new(endpoint: Endpoint) -> RouterBuilder
pub fn accept(
self,
alpn: impl AsRef<[u8]>,
handler: Arc<dyn ProtocolHandler>
-) -> RouterBuilder
sourcepub fn get_protocol<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
+) -> RouterBuilderpub fn get_protocol<P>(&self, alpn: &[u8]) -> Option<Arc<P>>where
P: ProtocolHandler,
Returns a protocol handler for an ALPN.
This downcasts to the concrete type and returns None if the handler registered for alpn
does not match the passed type.
-sourcepub async fn spawn(self) -> Result<Router, Error>
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for RouterBuilder
§impl !RefUnwindSafe for RouterBuilder
§impl Send for RouterBuilder
§impl Sync for RouterBuilder
§impl Unpin for RouterBuilder
§impl !UnwindSafe for RouterBuilder
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for RouterBuilder
§impl !RefUnwindSafe for RouterBuilder
§impl Send for RouterBuilder
§impl Sync for RouterBuilder
§impl Unpin for RouterBuilder
§impl !UnwindSafe for RouterBuilder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh/router/trait.ProtocolHandler.html b/pr/2960/docs/iroh/router/trait.ProtocolHandler.html
index b1fb417ab6..6135bdb3f1 100644
--- a/pr/2960/docs/iroh/router/trait.ProtocolHandler.html
+++ b/pr/2960/docs/iroh/router/trait.ProtocolHandler.html
@@ -1,4 +1,4 @@
-ProtocolHandler in iroh::router - Rust Trait iroh::router::ProtocolHandler
source · pub trait ProtocolHandler: Send + Sync + IntoArcAny + Debug + 'static {
+ProtocolHandler in iroh::router - Rust Trait iroh::router::ProtocolHandler
pub trait ProtocolHandler: Send + Sync + IntoArcAny + Debug + 'static {
// Required method
fn accept(
self: Arc<Self>,
@@ -13,10 +13,10 @@
Implement this trait on a struct that should handle incoming connections.
The protocol handler must then be registered on the node for an ALPN protocol with
crate::RouterBuilder::accept.
-
Required Methods§
Required Methods§
Provided Methods§
Provided Methods§
Implementors§
\ No newline at end of file
diff --git a/pr/2960/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2960/docs/iroh_net/endpoint/struct.AddrInfo.html
index c195611ca8..7b2333392f 100644
--- a/pr/2960/docs/iroh_net/endpoint/struct.AddrInfo.html
+++ b/pr/2960/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/2960/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2960/docs/iroh_net/endpoint/struct.NodeAddr.html
index 6983a09d92..5761e1de53 100644
--- a/pr/2960/docs/iroh_net/endpoint/struct.NodeAddr.html
+++ b/pr/2960/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,40 +25,40 @@ 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: impl IntoIterator<Item = 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 more§impl From<NodeAddr> for NodeTicket
§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
-§impl From<NodeTicket> for NodeAddr
§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-source§impl From<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl From<NodeAddr> for NodeTicket
source§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
+source§impl From<NodeTicket> for NodeAddr
source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+source§impl From<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§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/2960/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2960/docs/iroh_net/key/enum.KeyParsingError.html
index a6a5c061bc..ec42bbe54a 100644
--- a/pr/2960/docs/iroh_net/key/enum.KeyParsingError.html
+++ b/pr/2960/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/2960/docs/iroh_net/key/index.html b/pr/2960/docs/iroh_net/key/index.html
index fe317e06b2..f6ce28ff2d 100644
--- a/pr/2960/docs/iroh_net/key/index.html
+++ b/pr/2960/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/2960/docs/iroh_net/key/struct.PublicKey.html b/pr/2960/docs/iroh_net/key/struct.PublicKey.html
index 7e8f54863b..7aaafc22a6 100644
--- a/pr/2960/docs/iroh_net/key/struct.PublicKey.html
+++ b/pr/2960/docs/iroh_net/key/struct.PublicKey.html
@@ -1,45 +1,45 @@
-PublicKey in iroh_net::key - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh_net::key - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is just a 32 byte array, but a key has associated crypto
information that is cached for performance reasons.
The cache item will be refreshed every time a crypto operation is performed,
or when a key is deserialised or created from a byte array.
Serialisation or creation from a byte array is cheap if the key is already
in the cache, but expensive if it is not.
-Implementations§
§impl PublicKey
pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
+Implementations§
source§impl PublicKey
sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
§Warning
This will return a [SignatureError] if the bytes passed into this method do not represent
a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.
See [VerifyingKey::from_bytes] for details.
-pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
+sourcepub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>
Verify a signature on a message with this secret key’s public key.
§Return
Returns Ok(()) if the signature is valid, and Err otherwise.
-Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for PublicKey
source§fn deserialize<D>(
deserializer: D
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromStr for PublicKey
§impl Hash for PublicKey
source§impl Ord for PublicKey
source§impl PartialEq for PublicKey
§impl PartialOrd for PublicKey
source§impl PartialOrd for PublicKey
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 PublicKey
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Copy for PublicKey
§impl Eq for PublicKey
§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
source§impl Copy for PublicKey
source§impl Eq for PublicKey
source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/key/struct.SecretKey.html b/pr/2960/docs/iroh_net/key/struct.SecretKey.html
index 42742da74a..e35aa9673f 100644
--- a/pr/2960/docs/iroh_net/key/struct.SecretKey.html
+++ b/pr/2960/docs/iroh_net/key/struct.SecretKey.html
@@ -1,24 +1,24 @@
-SecretKey in iroh_net::key - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
-Implementations§
§impl SecretKey
pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKeywhere
+SecretKey in iroh_net::key - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
+Implementations§
source§impl SecretKey
sourcepub fn generate() -> SecretKey
Generate a new SecretKey with the default randomness generator.
+sourcepub fn generate_with_rng<R>(csprng: &mut R) -> SecretKeywhere
R: CryptoRngCore + ?Sized,
Generate a new SecretKey with a randomness generator.
-pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>
Serialise this key to OpenSSH format.
-pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>where
+
sourcepub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>
Serialise this key to OpenSSH format.
+sourcepub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
Deserialise this key from OpenSSH format.
-sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for SecretKey
source§fn deserialize<D>(
deserializer: D
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for SecretKey
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
§impl !Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2960/docs/iroh_net/key/struct.SharedSecret.html b/pr/2960/docs/iroh_net/key/struct.SharedSecret.html
index c5fadbfb4f..6c79c6c567 100644
--- a/pr/2960/docs/iroh_net/key/struct.SharedSecret.html
+++ b/pr/2960/docs/iroh_net/key/struct.SharedSecret.html
@@ -1,7 +1,7 @@
-SharedSecret in iroh_net::key - Rust Struct iroh_net::key::SharedSecret
pub struct SharedSecret(/* private fields */);
Expand description
Shared Secret.
-Implementations§
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> Any for Twhere
+SharedSecret in iroh_net::key - Rust Struct iroh_net::key::SharedSecret
source · pub struct SharedSecret(/* private fields */);
Expand description
Shared Secret.
+Implementations§
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/key/type.NodeId.html b/pr/2960/docs/iroh_net/key/type.NodeId.html
index e45ed49bae..744b824071 100644
--- a/pr/2960/docs/iroh_net/key/type.NodeId.html
+++ b/pr/2960/docs/iroh_net/key/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh_net::key - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh_net::key - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/2960/docs/iroh_net/struct.AddrInfo.html b/pr/2960/docs/iroh_net/struct.AddrInfo.html
index 7647d1c08b..4ea3dce1e0 100644
--- a/pr/2960/docs/iroh_net/struct.AddrInfo.html
+++ b/pr/2960/docs/iroh_net/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh_net - Rust pub struct AddrInfo {
+AddrInfo in iroh_net - 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/2960/docs/iroh_net/struct.NodeAddr.html b/pr/2960/docs/iroh_net/struct.NodeAddr.html
index a846006a65..54f6a54f4d 100644
--- a/pr/2960/docs/iroh_net/struct.NodeAddr.html
+++ b/pr/2960/docs/iroh_net/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh_net - Rust pub struct NodeAddr {
+NodeAddr in iroh_net - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh-net node.
@@ -25,40 +25,40 @@ 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: impl IntoIterator<Item = 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 more§impl From<NodeAddr> for NodeTicket
§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
-§impl From<NodeTicket> for NodeAddr
§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-source§impl From<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl From<NodeAddr> for NodeTicket
source§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
+source§impl From<NodeTicket> for NodeAddr
source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+source§impl From<RemoteInfo> for NodeAddr
source§fn from(info: RemoteInfo) -> Self
Converts to this type from the input type.source§impl Ord for NodeAddr
source§impl PartialEq for NodeAddr
§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/2960/docs/iroh_net/struct.RelayMap.html b/pr/2960/docs/iroh_net/struct.RelayMap.html
index 574fbed079..a0bafe2fa3 100644
--- a/pr/2960/docs/iroh_net/struct.RelayMap.html
+++ b/pr/2960/docs/iroh_net/struct.RelayMap.html
@@ -1,24 +1,24 @@
-RelayMap in iroh_net - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
-Implementations§
§impl RelayMap
pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
-pub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
-pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
+RelayMap in iroh_net - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
source§impl RelayMap
sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
-pub fn from_nodes<I>(
+
Trait Implementations§
Trait Implementations§
source§impl PartialEq for RelayMap
§impl Eq for RelayMap
§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
source§impl Eq for RelayMap
source§impl StructuralPartialEq for RelayMap
Auto Trait Implementations§
§impl Freeze for RelayMap
§impl RefUnwindSafe for RelayMap
§impl Send for RelayMap
§impl Sync for RelayMap
§impl Unpin for RelayMap
§impl UnwindSafe for RelayMap
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/struct.RelayNode.html b/pr/2960/docs/iroh_net/struct.RelayNode.html
index 99bdb4ef4a..2ec053da3e 100644
--- a/pr/2960/docs/iroh_net/struct.RelayNode.html
+++ b/pr/2960/docs/iroh_net/struct.RelayNode.html
@@ -1,4 +1,4 @@
-RelayNode in iroh_net - Rust pub struct RelayNode {
+RelayNode in iroh_net - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
@@ -10,21 +10,21 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
source§impl<'de> Deserialize<'de> for RelayNode
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for RelayNode
source§impl PartialEq for RelayNode
§impl PartialOrd for RelayNode
source§impl PartialOrd for RelayNode
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 RelayNode
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayNode
§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for RelayNode
source§impl StructuralPartialEq for RelayNode
Auto Trait Implementations§
§impl Freeze for RelayNode
§impl RefUnwindSafe for RelayNode
§impl Send for RelayNode
§impl Sync for RelayNode
§impl Unpin for RelayNode
§impl UnwindSafe for RelayNode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/struct.RelayUrl.html b/pr/2960/docs/iroh_net/struct.RelayUrl.html
index c023830d91..4c89e6d6dd 100644
--- a/pr/2960/docs/iroh_net/struct.RelayUrl.html
+++ b/pr/2960/docs/iroh_net/struct.RelayUrl.html
@@ -1,4 +1,4 @@
-RelayUrl in iroh_net - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
+RelayUrl in iroh_net - Rust pub struct RelayUrl(/* private fields */);
Expand description
A URL identifying a relay server.
This is but a wrapper around Url, with a few custom tweaks:
-
@@ -443,30 +443,30 @@ or if
Path::new_opt() returns None.
(That is, if the percent-decoded path contains a NUL byte or,
for a Windows path, is not UTF-8.)
This method is only available if the std Cargo feature is enabled.
-
Trait Implementations§
Trait Implementations§
source§impl Deref for RelayUrl
§impl<'de> Deserialize<'de> for RelayUrl
§fn deserialize<__D>(
+
source§impl<'de> Deserialize<'de> for RelayUrl
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl FromStr for RelayUrl
Support for parsing strings directly.
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read moresource§impl FromStr for RelayUrl
Support for parsing strings directly.
If you need more control over the error first create a Url and use RelayUrl::from
instead.
-§impl Hash for RelayUrl
source§impl Ord for RelayUrl
source§impl PartialEq for RelayUrl
§impl PartialOrd for RelayUrl
source§impl PartialOrd for RelayUrl
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 RelayUrl
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Eq for RelayUrl
§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Eq for RelayUrl
source§impl StructuralPartialEq for RelayUrl
Auto Trait Implementations§
§impl Freeze for RelayUrl
§impl RefUnwindSafe for RelayUrl
§impl Send for RelayUrl
§impl Sync for RelayUrl
§impl Unpin for RelayUrl
§impl UnwindSafe for RelayUrl
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/ticket/struct.NodeTicket.html b/pr/2960/docs/iroh_net/ticket/struct.NodeTicket.html
index 63f9a8449f..8fd5ff47ca 100644
--- a/pr/2960/docs/iroh_net/ticket/struct.NodeTicket.html
+++ b/pr/2960/docs/iroh_net/ticket/struct.NodeTicket.html
@@ -1,4 +1,4 @@
-NodeTicket in iroh_net::ticket - Rust Struct iroh_net::ticket::NodeTicket
pub struct NodeTicket { /* private fields */ }
Expand description
A token containing information for establishing a connection to a node.
+NodeTicket in iroh_net::ticket - Rust Struct iroh_net::ticket::NodeTicket
source · pub struct NodeTicket { /* private fields */ }
Expand description
A token containing information for establishing a connection to a node.
Contains
- The
NodeId of the node to connect to (a 32-byte ed25519 public key).
@@ -10,20 +10,20 @@ possible to do so.
This NodeTicket is a single item which can be easily serialized and deserialized and
implements the Ticket trait. The Display and FromStr traits can also be
used to round-trip the ticket to string.
-
Implementations§
§impl NodeTicket
Trait Implementations§
§impl Clone for NodeTicket
§fn clone(&self) -> NodeTicket
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 NodeTicket
§impl<'de> Deserialize<'de> for NodeTicket
§fn deserialize<D>(
+
Implementations§
Trait Implementations§
source§impl Clone for NodeTicket
source§fn clone(&self) -> NodeTicket
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 NodeTicket
source§impl<'de> Deserialize<'de> for NodeTicket
source§fn deserialize<D>(
deserializer: D
) -> Result<NodeTicket, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for NodeTicket
§impl From<NodeAddr> for NodeTicket
§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
-§impl From<NodeTicket> for NodeAddr
§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
-§impl FromStr for NodeTicket
§impl PartialEq for NodeTicket
§fn eq(&self, other: &NodeTicket) -> bool
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for NodeTicket
source§impl From<NodeAddr> for NodeTicket
source§fn from(addr: NodeAddr) -> NodeTicket
Creates a ticket from given addressing info.
+source§impl From<NodeTicket> for NodeAddr
source§fn from(ticket: NodeTicket) -> NodeAddr
Returns the addressing info from given ticket.
+source§impl FromStr for NodeTicket
source§impl PartialEq for NodeTicket
source§fn eq(&self, other: &NodeTicket) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl Serialize for NodeTicket
source§impl Serialize for NodeTicket
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 Ticket for NodeTicket
§fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>
Deserialize from the base32 string representation bytes.§fn deserialize(str: &str) -> Result<Self, Error>
Deserialize from a string.§impl Eq for NodeTicket
§impl StructuralPartialEq for NodeTicket
Auto Trait Implementations§
§impl Freeze for NodeTicket
§impl RefUnwindSafe for NodeTicket
§impl Send for NodeTicket
§impl Sync for NodeTicket
§impl Unpin for NodeTicket
§impl UnwindSafe for NodeTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Ticket for NodeTicket
source§fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>
Deserialize from the base32 string representation bytes.source§impl Eq for NodeTicket
source§impl StructuralPartialEq for NodeTicket
Auto Trait Implementations§
§impl Freeze for NodeTicket
§impl RefUnwindSafe for NodeTicket
§impl Send for NodeTicket
§impl Sync for NodeTicket
§impl Unpin for NodeTicket
§impl UnwindSafe for NodeTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2960/docs/iroh_net/ticket/trait.Ticket.html b/pr/2960/docs/iroh_net/ticket/trait.Ticket.html
index 62d1eea749..aeb5ad78e9 100644
--- a/pr/2960/docs/iroh_net/ticket/trait.Ticket.html
+++ b/pr/2960/docs/iroh_net/ticket/trait.Ticket.html
@@ -1,13 +1,13 @@
-Ticket in iroh_net::ticket - Rust pub trait Ticket: Sized {
+Ticket in iroh_net::ticket - Rust pub trait Ticket: Sized {
const KIND: &'static str;
// Required methods
fn to_bytes(&self) -> Vec<u8> ⓘ;
- fn from_bytes(bytes: &[u8]) -> Result<Self, Error>;
+ fn from_bytes(bytes: &[u8]) -> Result<Self, Error>;
// Provided methods
fn serialize(&self) -> String { ... }
- fn deserialize(str: &str) -> Result<Self, Error> { ... }
+ fn deserialize(str: &str) -> Result<Self, Error> { ... }
}
Expand description
A ticket is a serializable object combining information required for an operation.
Typically tickets contain all information required for an operation, e.g. an iroh blob
ticket would contain the hash of the data as well as information about how to reach the
@@ -18,10 +18,10 @@ ticket will be prepended to the string to make it somewhat self describing.
versioning, others might not.
The serialization format for converting the ticket from and to bytes is left
to the implementer. We recommend using postcard for serialization.
-Required Associated Constants§
Required Associated Constants§
Required Methods§
fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Deserialize from the base32 string representation bytes.
-Provided Methods§
fn deserialize(str: &str) -> Result<Self, Error>
Deserialize from a string.
-Object Safety§
This trait is not object safe.Implementors§
\ No newline at end of file
+
Required Methods§
sourcefn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Deserialize from the base32 string representation bytes.
+Provided Methods§
sourcefn deserialize(str: &str) -> Result<Self, Error>
Deserialize from a string.
+Object Safety§
This trait is not object safe.Implementors§
\ No newline at end of file
diff --git a/pr/2960/docs/iroh_net/type.NodeId.html b/pr/2960/docs/iroh_net/type.NodeId.html
index 22237ce40e..c99be03560 100644
--- a/pr/2960/docs/iroh_net/type.NodeId.html
+++ b/pr/2960/docs/iroh_net/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh_net - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh_net - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
Each node in iroh has a unique identifier created as a cryptographic key. This can be
used to globally identify a node. Since it is also a cryptographic key it is also the
mechanism by which all traffic is always encrypted for a specific node only.
diff --git a/pr/2960/docs/type.impl/iroh_net/key/struct.PublicKey.js b/pr/2960/docs/type.impl/iroh_net/key/struct.PublicKey.js
index fe33e54257..e5e292b351 100644
--- a/pr/2960/docs/type.impl/iroh_net/key/struct.PublicKey.js
+++ b/pr/2960/docs/type.impl/iroh_net/key/struct.PublicKey.js
@@ -1,3 +1,3 @@
(function() {var type_impls = {
-"iroh_net":[["","AsRef<[u8]>","iroh_net::NodeId"],["","Clone","iroh_net::NodeId"],["","Debug","iroh_net::NodeId"],["§impl<'de> Deserialize<'de> for PublicKey
§fn deserialize<D>(\n deserializer: D\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where\n D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more","Deserialize<'de>","iroh_net::NodeId"],["","Display","iroh_net::NodeId"],["","From","iroh_net::NodeId"],["§impl FromStr for PublicKey
","FromStr","iroh_net::NodeId"],["","Hash","iroh_net::NodeId"],["§impl Ord for PublicKey
","Ord","iroh_net::NodeId"],["§impl PartialEq for PublicKey
","PartialEq","iroh_net::NodeId"],["§impl PartialOrd for PublicKey
§fn partial_cmp(&self, other: &PublicKey) -> 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 <=\noperator. Read more","PartialOrd","iroh_net::NodeId"],["§impl PublicKey
pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
\n§Warning
\nThis will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.
\n",0,"iroh_net::NodeId"],["§impl Serialize for PublicKey
§fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where\n S: Serializer,
Serialize this value into the given Serde serializer. Read more","Serialize","iroh_net::NodeId"],["","TryFrom<&[u8]>","iroh_net::NodeId"],["","TryFrom<&[u8; 32]>","iroh_net::NodeId"],["§impl Copy for PublicKey
","Copy","iroh_net::NodeId"],["§impl Eq for PublicKey
","Eq","iroh_net::NodeId"],["§impl StructuralPartialEq for PublicKey
","StructuralPartialEq","iroh_net::NodeId"]]
+"iroh_net":[["","AsRef<[u8]>","iroh_net::NodeId"],["","Clone","iroh_net::NodeId"],["","Debug","iroh_net::NodeId"],["source§impl<'de> Deserialize<'de> for PublicKey
source§fn deserialize<D>(\n deserializer: D\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where\n D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more","Deserialize<'de>","iroh_net::NodeId"],["","Display","iroh_net::NodeId"],["","From","iroh_net::NodeId"],["source§impl FromStr for PublicKey
","FromStr","iroh_net::NodeId"],["","Hash","iroh_net::NodeId"],["source§impl Ord for PublicKey
1.21.0 · source§fn max(self, other: Self) -> Selfwhere\n Self: Sized,
Compares and returns the maximum of two values. Read more","Ord","iroh_net::NodeId"],["source§impl PartialEq for PublicKey
","PartialEq","iroh_net::NodeId"],["source§impl PartialOrd for PublicKey
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 <=\noperator. Read more","PartialOrd","iroh_net::NodeId"],["source§impl PublicKey
sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
\n§Warning
\nThis will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.
\n",0,"iroh_net::NodeId"],["source§impl Serialize for PublicKey
source§fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where\n S: Serializer,
Serialize this value into the given Serde serializer. Read more","Serialize","iroh_net::NodeId"],["","TryFrom<&[u8]>","iroh_net::NodeId"],["","TryFrom<&[u8; 32]>","iroh_net::NodeId"],["source§impl Copy for PublicKey
","Copy","iroh_net::NodeId"],["source§impl Eq for PublicKey
","Eq","iroh_net::NodeId"],["source§impl StructuralPartialEq for PublicKey
","StructuralPartialEq","iroh_net::NodeId"]]
};if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})()
\ No newline at end of file