pub fn run_iroh(opt: Opt) -> Result<()>diff --git a/pr/2937/docs/bulk/fn.run_iroh.html b/pr/2937/docs/bulk/fn.run_iroh.html index d35aaf31f5..100a805898 100644 --- a/pr/2937/docs/bulk/fn.run_iroh.html +++ b/pr/2937/docs/bulk/fn.run_iroh.html @@ -1 +1 @@ -
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16The default QUIC port used by the Relay server to accept QUIC connections +
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery
The port is “QUIC” typed on a phone keypad. The default QUIC port used by the Relay server to accept QUIC connections diff --git a/pr/2937/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html b/pr/2937/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html index 0a6d9cbf10..9f5722b707 100644 --- a/pr/2937/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html +++ b/pr/2937/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html @@ -1,4 +1,4 @@ -
pub const DEFAULT_STUN_PORT: u16 = 3478; // 3_478u16The default STUN port used by the Relay server.
+pub const DEFAULT_STUN_PORT: u16 = 3478; // 3_478u16The default STUN port used by the Relay server.
The STUN port as defined by RFC 8489 The default STUN port used by the Relay server.
diff --git a/pr/2937/docs/iroh/dialer/struct.Dialer.html b/pr/2937/docs/iroh/dialer/struct.Dialer.html index 91b83b53be..0ca00e9012 100644 --- a/pr/2937/docs/iroh/dialer/struct.Dialer.html +++ b/pr/2937/docs/iroh/dialer/struct.Dialer.html @@ -9,10 +9,10 @@ pending connect futures and emits finished connect results. discovery service or manually by callingEndpoint::add_node_addr.
Aborts a pending dial.
Checks if a node is currently being dialed.
-Waits for the next dial operation to complete.
+Waits for the next dial operation to complete.
Number of pending connections to be opened.
pub struct LocalSwarmDiscovery { /* private fields */ }discovery-local-network only.Discovery using swarm-discovery, a variation on mdns
Create a new LocalSwarmDiscovery Service.
Create a new LocalSwarmDiscovery Service.
This starts a [Discoverer] that broadcasts your addresses and receives addresses from other nodes in your local network.
Returns an error if the network does not allow ipv4 OR ipv6.
@@ -9,7 +9,7 @@ &self, _ep: Endpoint, node_id: NodeId -) -> Option<BoxStream<Result<DiscoveryItem>>>Sets the secret key to use for signing the DNS packets.
Without a secret key, the node will not publish its address to the DHT.
Sets the pkarr relay URL to use.
+Sets the pkarr relay URL to use.
Uses the default number 0 pkarr relay URL.
Sets whether to include the direct addresses in the DNS packet.
Sets the initial delay before the first publish.
Sets the republish delay for the DHT.
-Builds the discovery mechanism.
+Builds the discovery mechanism.
RelayUrl if the AddrInfo contains a
RelayUrl. If the AddrInfo does not contain a RelayUrl the direct
addresses are published instead.
-Creates a new publisher for the SecretKey.
Creates a new publisher for the SecretKey.
This publisher will be able to publish pkarr records for SecretKey. It will
use DEFAULT_PKARR_TTL as the time-to-live value for the published packets. Will
republish discovery information every DEFAULT_REPUBLISH_INTERVAL, even if the
information is unchanged.
Creates a new PkarrPublisher with a custom TTL and republish intervals.
pub struct PkarrRelayClient { /* private fields */ }A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
Resolves a [SignedPacket] for the given NodeId.
Publishes a [SignedPacket].
source. Read moreThis implements the Discovery trait to be used as a node discovery service. Note
that it only resolves node discovery information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentDiscovery.
Creates a new publisher using the pkarr relay server at the URL.
+Creates a new publisher using the pkarr relay server at the URL.
Creates a pkarr resolver which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
Node discovery for super::Endpoint.
This trait defines publishing and resolving addressing information for a NodeId.
@@ -27,7 +27,7 @@ These tasks will be run on the runtime of the Endpoint,
_node_id: NodeId
-) -> Option<BoxStream<Result<DiscoveryItem>>>
Resolves the AddrInfo for the given NodeId.
Resolves the AddrInfo for the given NodeId.
Once the returned [BoxStream] is dropped, the service should stop any pending
work.
Subscribe to all addresses that get passively discovered.
diff --git a/pr/2937/docs/iroh/dns/node_info/fn.from_z32.html b/pr/2937/docs/iroh/dns/node_info/fn.from_z32.html index 7430389e6a..7f8783c376 100644 --- a/pr/2937/docs/iroh/dns/node_info/fn.from_z32.html +++ b/pr/2937/docs/iroh/dns/node_info/fn.from_z32.html @@ -1,2 +1,2 @@ -pub fn from_z32(s: &str) -> Result<NodeId>Parses a NodeId from [z-base-32] encoding.
pub struct NodeInfo {
pub node_id: NodeId,
- pub relay_url: Option<Url>,
+ pub relay_url: Option<Url>,
pub direct_addresses: BTreeSet<SocketAddr>,
}Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
node_id: NodeIdThe NodeId.
relay_url: Option<Url>The advertised home relay server.
+relay_url: Option<Url>The advertised home relay server.
direct_addresses: BTreeSet<SocketAddr>Any direct addresses.
Creates a new NodeInfo from its parts.
Parses a NodeInfo from a set of DNS records.
Parses a NodeInfo from a [pkarr::SignedPacket].
Parses a NodeInfo from a set of DNS records.
Parses a NodeInfo from a [pkarr::SignedPacket].
Creates TxtAttrs from a node id and an iterator of “{key}={value}” strings.
Creates TxtAttrs from a node id and an iterator of “{key}={value}” strings.
Looks up attributes by NodeId and origin domain.
Looks up attributes by NodeId and origin domain.
Looks up attributes by DNS name.
+) -> Result<Self>Looks up attributes by DNS name.
Parses a [pkarr::SignedPacket].
Parses a set of DNS resource records.
+Parses a [pkarr::SignedPacket].
Parses a set of DNS resource records.
Converts to a list of [hickory_proto::rr::Record] resource records.
Converts to a list of [hickory_proto::rr::Record] resource records.
Extension trait to DnsResolver.
Perform an ipv4 lookup with a timeout.
+) -> impl Future<Output = Result<impl Iterator<Item = IpAddr>>>Perform an ipv4 lookup with a timeout.
Perform an ipv6 lookup with a timeout.
+) -> impl Future<Output = Result<impl Iterator<Item = IpAddr>>>Perform an ipv6 lookup with a timeout.
Race an ipv4 and ipv6 lookup with a timeout.
-Looks up node info by DNS name.
+) -> impl Future<Output = Result<impl Iterator<Item = IpAddr>>>Race an ipv4 and ipv6 lookup with a timeout.
+Looks up node info by DNS name.
Looks up node info by NodeId and origin domain name.
Looks up node info by NodeId and origin domain name.
Perform an ipv4 lookup with a timeout in a staggered fashion.
+) -> impl Future<Output = Result<impl Iterator<Item = IpAddr>>>Perform an ipv4 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
@@ -90,7 +90,7 @@ result of the first successful call is returned, or a summary of all errors othe
host: N,
timeout: Duration,
delays_ms: &[u64]
-) -> impl Future<Output = Result<impl Iterator<Item = IpAddr>>>
Perform an ipv6 lookup with a timeout in a staggered fashion.
+) -> impl Future<Output = Result<impl Iterator<Item = IpAddr>>>Perform an ipv6 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
@@ -100,7 +100,7 @@ result of the first successful call is returned, or a summary of all errors othe
host: N,
timeout: Duration,
delays_ms: &[u64]
-) -> impl Future<Output = Result<impl Iterator<Item = IpAddr>>>
Race an ipv4 and ipv6 lookup with a timeout in a staggered fashion.
+) -> impl Future<Output = Result<impl Iterator<Item = IpAddr>>>Race an ipv4 and ipv6 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
@@ -110,7 +110,7 @@ summary of all errors otherwise.
Looks up node info by DNS name in a staggered fashion.
+) -> impl Future<Output = Result<NodeAddr>>Looks up node info by DNS name in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
@@ -120,7 +120,7 @@ summary of all errors otherwise.
Looks up node info by NodeId and origin domain name.
Looks up node info by NodeId and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/2937/docs/iroh/dns/type.DnsResolver.html b/pr/2937/docs/iroh/dns/type.DnsResolver.html
index 48bf054aaf..a8100c091d 100644
--- a/pr/2937/docs/iroh/dns/type.DnsResolver.html
+++ b/pr/2937/docs/iroh/dns/type.DnsResolver.html
@@ -3,20 +3,20 @@
&self,
host: N,
timeout: Duration
-) -> Result<impl Iterator<Item = IpAddr>>
Resolve IPv4 and IPv6 in parallel.
+) -> Result<impl Iterator<Item = IpAddr>>Resolve IPv4 and IPv6 in parallel.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
Looks up node info by DNS name.
+Looks up node info by DNS name.
The resource records returned for name must either contain an node_info::IROH_TXT_NAME TXT
record or be a CNAME record that leads to an node_info::IROH_TXT_NAME TXT record.
Looks up node info by NodeId and origin domain name.
Looks up node info by NodeId and origin domain name.
Perform an ipv4 lookup with a timeout in a staggered fashion.
+) -> Result<impl Iterator<Item = IpAddr>>Perform an ipv4 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
@@ -26,7 +26,7 @@ result of the first successful call is returned, or a summary of all errors othe
host: N,
timeout: Duration,
delays_ms: &[u64]
-) -> Result<impl Iterator<Item = IpAddr>>
Perform an ipv6 lookup with a timeout in a staggered fashion.
+) -> Result<impl Iterator<Item = IpAddr>>Perform an ipv6 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
@@ -36,7 +36,7 @@ result of the first successful call is returned, or a summary of all errors othe
host: N,
timeout: Duration,
delays_ms: &[u64]
-) -> Result<impl Iterator<Item = IpAddr>>
Race an ipv4 and ipv6 lookup with a timeout in a staggered fashion.
+) -> Result<impl Iterator<Item = IpAddr>>Race an ipv4 and ipv6 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
@@ -46,7 +46,7 @@ summary of all errors otherwise.
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeAddr>Looks up node info by DNS name in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
@@ -56,7 +56,7 @@ summary of all errors otherwise.
Looks up node info by NodeId and origin domain name.
Looks up node info by NodeId and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
@@ -65,8 +65,8 @@ summary of all errors otherwise.
pub enum AddrInfoOptions {
+AddrInfoOptions in iroh::endpoint - Rust Enum iroh::endpoint::AddrInfoOptions
source · pub enum AddrInfoOptions {
Id,
RelayAndAddresses,
Relay,
@@ -9,18 +9,18 @@
§RelayAndAddresses
Includes the Node ID and both the relay URL, and the direct addresses.
§Relay
Includes the Node ID and the relay URL.
§Addresses
Includes the Node ID and the direct addresses.
-source. Read moresource. Read moreself and other values to be equal, and is used
+) -> Result<AddrInfoOptions, <AddrInfoOptions as FromStr>::Err>s to return a value of this type. Read moreself and other values to be equal, and is used
by ==.Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moreWithDispatch] wrapper. Read moreThe local application closed the connection
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-source. Read moreself and other values to be equal, and is used
+source. Read moreself and other values to be equal, and is used
by ==.This is the case if we do have a UDP address, but are missing a recent confirmation that the address works.
We have no verified connection to this PublicKey
-source. Read moreself and other values to be equal, and is used
+source. Read moreself and other values to be equal, and is used
by ==.Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moreWithDispatch] wrapper. Read moreWe received a Ping from the node.
We received a Pong from the node.
We received a CallMeMaybe.
-source. Read moreself and other values to be equal, and is used
+source. Read moreself and other values to be equal, and is used
by ==.Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moreWithDispatch] wrapper. Read moreIt is possible to configure iroh to bound to a specific port and independently configure the router to forward this port to the iroh node. This indicates a situation like this, which still uses STUN to discover the public address.
-source. Read moresource. Read moreThis was a 0-RTT stream and the server rejected it
Can only occur on clients for 0-RTT streams, which can be opened using
Connecting::into_0rtt().
Application layer with a specific name added the node directly.
Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moreWithDispatch] wrapper. Read moreThis was a 0-RTT stream and the server rejected it
Can only occur on clients for 0-RTT streams, which can be opened using
Connecting::into_0rtt().
source. Read moreself and other values to be equal, and is used
+source. Read moreself and other values to be equal, and is used
by ==.pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>Extract the PublicKey from the peer’s TLS certificate.
pub fn get_remote_node_id(connection: &Connection) -> Result<PublicKey>Extract the PublicKey from the peer’s TLS certificate.
Creates a ServerConfig with the given secret key and limits.
Creates a ServerConfig with the given secret key and limits.
pub struct AddrInfo {
+AddrInfo in iroh::endpoint - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh 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 more§impl Ord for AddrInfo
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
+) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read more
source§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
+) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
+ __S: Serializer,Serialize this value into the given Serde serializer. Read more
source§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(
@@ -58,6 +58,6 @@ operator. §fn vzip(self) -> V
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/endpoint/struct.Builder.html b/pr/2937/docs/iroh/endpoint/struct.Builder.html
index 1f98114ac5..d827080417 100644
--- a/pr/2937/docs/iroh/endpoint/struct.Builder.html
+++ b/pr/2937/docs/iroh/endpoint/struct.Builder.html
@@ -2,7 +2,7 @@
By default the endpoint will generate a new random SecretKey, which will result in a
new NodeId.
To create the Endpoint call Builder::bind.
-Sets the IPv4 bind address.
Setting the port to 0 will use a random port.
If the port specified is already in use, it will fallback to choosing a random port.
By default, all endpoints share a DNS resolver, which is configured to use the
host system’s DNS configuration. You can pass a custom instance of DnsResolver
here to use a differently configured DNS resolver for this endpoint.
Sets an explicit proxy url to proxy all HTTP(S) traffic through.
+Sets an explicit proxy url to proxy all HTTP(S) traffic through.
Sets the proxy url from the environment, in this order:
HTTP_PROXYpub struct Bytes { /* private fields */ }A cheaply cloneable and sliceable chunk of contiguous memory.
+pub struct Bytes { /* private fields */ }A cheaply cloneable and sliceable chunk of contiguous memory.
Bytes is an efficient container for storing and operating on contiguous
slices of memory. It is intended for use primarily in networking code, but
could have applications elsewhere as well.
Create Bytes with a buffer whose lifetime is controlled +via an explicit owner.
+A common use case is to zero-copy construct from mapped memory.
+ +use bytes::Bytes;
+use memmap2::Mmap;
+
+let file = File::open("upload_bundle.tar.gz")?;
+let mmap = unsafe { Mmap::map(&file) }?;
+let b = Bytes::from_owner(mmap);The owner will be transferred to the constructed Bytes object, which
+will ensure it is dropped once all remaining clones of the constructed
+object are dropped. The owner will then be responsible for dropping the
+specified region of memory as part of its Drop implementation.
Note that converting Bytes constructed from an owner into a [BytesMut] +will always create a deep copy of the buffer into newly allocated memory.
Returns the number of bytes contained in this Bytes.
use bytes::Bytes;
@@ -90,12 +107,14 @@ no allocating or copying.
let b = Bytes::new();
assert!(b.is_empty());Returns true if this is the only reference to the data.
-Always returns false if the data is backed by a static slice.
+Returns true if this is the only reference to the data and
+Into<BytesMut> would avoid cloning the underlying buffer.
Always returns false if the data is backed by a static slice, +or an owner.
The result of this method may be invalidated immediately if another
thread clones this value while this is being called. Ensure you have
unique access to this value (&mut Bytes) first if you need to be
-certain the result is valid (i.e. for safety reasons)
use bytes::Bytes;
@@ -191,6 +210,8 @@ buf.clear();
and return a BytesMut with the contents of self without copying.
If self is not unique for the entire original buffer, this will fail
and return self.
+This will also always fail if the buffer was constructed via either
+from_owner or from_static.
§Examples
use bytes::{Bytes, BytesMut};
@@ -1302,8 +1323,8 @@ given separator between each.
assert_eq!([[1, 2], [3, 4]].connect(&0), [1, 2, 0, 3, 4]);
Buf::remaining(). Note that this can return shorter slice (this allows
-non-continuous internal representation). Read morelen bytes inside self and returns new instance of Bytes
+and Buf::remaining(). Note that this can return a shorter slice (this
+allows non-continuous internal representation). Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in the big-endian byte order. Read moreself in the little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself in little-endian byte order. Read moreself in native-endian byte order. Read moreself in big-endian byte order. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
-operator. Read moreself and other) and is used by the <=
operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read moreself and other) and is used by the <=
+operator. Read morepub struct Connecting { /* private fields */ }In-progress connection attempt future
-Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
-Parameters negotiated during the handshake
+Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security.
+Parameters negotiated during the handshake
The local IP address which was used when the peer established the connection.
The peer’s UDP address.
-The Duration will always indicate the most recent time the source
recorded this address.
source. Read moreself and other values to be equal, and is used
+source. Read moreself and other values to be equal, and is used
by ==.Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moreWithDispatch] wrapper. Read moreNote that due to the light-weight properties of streams a stream will only be accepted once the initiating peer has sent some data on it.
Returns the builder for an Endpoint, with a production configuration.
Sets the list of accepted ALPN protocols.
+Sets the list of accepted ALPN protocols.
This will only affect new incoming connections. Note that this overrides the current list of ALPNs.
Connects to a remote Endpoint.
Connects to a remote Endpoint.
A value that can be converted into a NodeAddr is required. This can be either a
NodeAddr, a NodeId or a iroh_base::ticket::NodeTicket.
The NodeAddr must contain the NodeId to dial and may also contain a RelayUrl
@@ -45,7 +45,7 @@ If multiple ALPNs have been configured the ALPN can be inspected before acceptin
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
Informs this Endpoint about addresses of the iroh node.
Informs this Endpoint about addresses of the iroh node.
This updates the local state for the remote node. If the provided NodeAddr
contains a RelayUrl this will be used as the new relay server for this node. If
it contains any new IP endpoints they will also be stored and tried when next
@@ -59,7 +59,7 @@ direct addresses are a subset of ours.
Informs this Endpoint about addresses of the iroh node, noting the source.
Informs this Endpoint about addresses of the iroh node, noting the source.
This updates the local state for the remote node. If the provided NodeAddr contains a
RelayUrl this will be used as the new relay server for this node. If it contains any
new IP endpoints they will also be stored and tried when next connecting to this node. Any
@@ -72,7 +72,7 @@ direct addresses are a subset of ours.
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know it to be able to connect to this node.
-Returns the current NodeAddr for this endpoint.
Returns the current NodeAddr for this endpoint.
The returned NodeAddr will have the current RelayUrl and local IP endpoints
as they would be returned by Endpoint::home_relay and
Endpoint::direct_addresses.
See also Endpoint::remote_info to only retrieve information about a single node.
Returns a stream that reports connection type changes for the remote node.
+Returns a stream that reports connection type changes for the remote node.
This returns a stream of ConnectionType items, each time the underlying
connection to a remote node changes it yields an item. These connection changes are
when the connection switches between using the Relay server and a direct connection.
Even when the network did not change, or iroh was already able to detect the network change itself, there is no harm in calling this function.
-Closes the QUIC endpoint and the magic socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
pub struct Incoming { /* private fields */ }An incoming connection for which the server has not yet begun its parts of the handshake.
-Attempts to accept this incoming connection (an error may still occur).
+Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC connection listens on a normal UDP socket and any reachable network endpoint can send datagrams to it, solicited or not. Even if the first few bytes look like a @@ -10,10 +10,10 @@ can happen.
Accepts this incoming connection using a custom configuration.
+) -> Result<Connecting, ConnectionError>Accepts this incoming connection using a custom configuration.
See accept() for more details.
Responds with a retry packet.
+Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
Ignores this incoming connection attempt, not sending any packet in response.
diff --git a/pr/2937/docs/iroh/endpoint/struct.NodeAddr.html b/pr/2937/docs/iroh/endpoint/struct.NodeAddr.html index 51cabae7fb..d2fbdc33b4 100644 --- a/pr/2937/docs/iroh/endpoint/struct.NodeAddr.html +++ b/pr/2937/docs/iroh/endpoint/struct.NodeAddr.html @@ -1,4 +1,4 @@ -pub struct NodeAddr {
+NodeAddr in iroh::endpoint - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh 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.§impl Ord for NodeAddr
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
+) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read more
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
+) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
+ __S: Serializer,Serialize this value into the given Serde serializer. Read more
source§impl Eq for NodeAddr
source§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
@@ -90,6 +90,6 @@ operator. §fn vzip(self) -> V
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
Source variant, if different addresses were discovered from the same Source
at different times.
The list is sorted from least to most recent Source.
source. Read moreself and other values to be equal, and is used
+source. Read moreself and other values to be equal, and is used
by ==.Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moreWithDispatch] wrapper. Read moreWhich side of a connection initiated the stream
Which directions data flows in
code: CodeType of error
frame: Option<Type>Frame type that triggered the error
reason: StringHuman-readable explanation of the reason
-self and other values to be equal, and is used
+Extract the integer value
Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead of overflowing.
-self and other) and is used by the <=
operator. Read morepub enum AddrInfoOptions {
+AddrInfoOptions in iroh - Rust Enum iroh::AddrInfoOptions
source · pub enum AddrInfoOptions {
Id,
RelayAndAddresses,
Relay,
@@ -9,18 +9,18 @@
§RelayAndAddresses
Includes the Node ID and both the relay URL, and the direct addresses.
§Relay
Includes the Node ID and the relay URL.
§Addresses
Includes the Node ID and the direct addresses.
-source. Read moresource. Read moreself and other values to be equal, and is used
+) -> Result<AddrInfoOptions, <AddrInfoOptions as FromStr>::Err>s to return a value of this type. Read moreself and other values to be equal, and is used
by ==.Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moreWithDispatch] wrapper. Read morepub enum BlobFormat {
+BlobFormat in iroh::hash - Rust Enum iroh::hash::BlobFormat
source · pub enum BlobFormat {
Raw,
HashSeq,
}
Expand description
A format identifier
Variants§
Implementations§
§impl BlobFormat
pub const fn is_hash_seq(&self) -> bool
Is hash seq format
-Trait Implementations§
§impl Clone for BlobFormat
§fn clone(&self) -> BlobFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for BlobFormat
§impl Default for BlobFormat
§fn default() -> BlobFormat
Returns the “default value” for a type. Read more§impl<'de> Deserialize<'de> for BlobFormat
§fn deserialize<__D>(
+
Implementations§
source§impl BlobFormat
Trait Implementations§
source§impl Clone for BlobFormat
source§fn clone(&self) -> BlobFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for BlobFormat
source§impl Default for BlobFormat
source§fn default() -> BlobFormat
Returns the “default value” for a type. Read moresource§impl<'de> Deserialize<'de> for BlobFormat
source§fn deserialize<__D>(
__deserializer: __D
-) -> Result<BlobFormat, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for BlobFormat
§impl Hash for BlobFormat
§fn hash<__H>(&self, state: &mut __H)where
+) -> Result<BlobFormat, <__D as Deserializer<'de>>::Error>where
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read more
source§impl Display for BlobFormat
source§impl Hash for BlobFormat
§impl MaxSize for BlobFormat
§const POSTCARD_MAX_SIZE: usize = 1usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for BlobFormat
source§impl MaxSize for BlobFormat
source§const POSTCARD_MAX_SIZE: usize = 1usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for BlobFormat
source§fn cmp(&self, other: &BlobFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for BlobFormat
§fn eq(&self, other: &BlobFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for BlobFormat
source§fn eq(&self, other: &BlobFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for BlobFormat
§fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>
source§impl PartialOrd for BlobFormat
source§fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for BlobFormat
source§fn serialize<__S>(
&self,
__serializer: __S
-) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Copy for BlobFormat
§impl Eq for BlobFormat
§impl StructuralPartialEq for BlobFormat
Auto Trait Implementations§
§impl Freeze for BlobFormat
§impl RefUnwindSafe for BlobFormat
§impl Send for BlobFormat
§impl Sync for BlobFormat
§impl Unpin for BlobFormat
§impl UnwindSafe for BlobFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
+ __S: Serializer,Serialize this value into the given Serde serializer. Read more
source§impl Copy for BlobFormat
source§impl Eq for BlobFormat
source§impl StructuralPartialEq for BlobFormat
Auto Trait Implementations§
§impl Freeze for BlobFormat
§impl RefUnwindSafe for BlobFormat
§impl Send for BlobFormat
§impl Sync for BlobFormat
§impl Unpin for BlobFormat
§impl UnwindSafe for BlobFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
@@ -57,7 +57,7 @@ operator. §fn vzip(self) -> V
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
source§impl<T> RuleType for T
The blake3 hash used in Iroh.
+pub struct Hash(/* private fields */);Hash type used throughout.
-Create a Hash from its raw bytes representation.
Convert to a base32 string limited to the first 10 bytes for a friendly string +
pub struct Hash(/* private fields */);Hash type used throughout.
+self and other) and is used by the <=
operator. Read moreSubscriber to this type, returning a
-[WithDispatch] wrapper. Read moreWithDispatch] wrapper. Read morepub struct HashAndFormat {
+HashAndFormat in iroh::hash - Rust Struct iroh::hash::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
-) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
+ D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read more
source§impl Display for HashAndFormat
source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
-) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
+ S: Serializer,Serialize this value into the given Serde serializer. Read more
source§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
source§impl<T> RuleType for T
Please see the examples directory for more nuanced examples.
-irohpub use endpoint::Endpoint;pub use endpoint::RelayMode;pub use iroh_relay as relay;irohcrate::Endpoint if no custom resolver is configured.Endpoint allows establishing connections to other iroh nodes.iroh.test or test-utilspub enum KeyParsingError {
- Base32(HexOrBase32ParseError),
+KeyParsingError in iroh::key - Rust Enum iroh::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/2937/docs/iroh/key/index.html b/pr/2937/docs/iroh/key/index.html
index 6a78611c6d..92f9899f5a 100644
--- a/pr/2937/docs/iroh/key/index.html
+++ b/pr/2937/docs/iroh/key/index.html
@@ -1,2 +1,2 @@
-iroh::key - Rust Expand description
Cryptographic key handling for iroh.
+iroh::key - Rust
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/key/struct.PublicKey.html b/pr/2937/docs/iroh/key/struct.PublicKey.html
index 9c7f6e3704..91d406792a 100644
--- a/pr/2937/docs/iroh/key/struct.PublicKey.html
+++ b/pr/2937/docs/iroh/key/struct.PublicKey.html
@@ -1,46 +1,46 @@
-PublicKey in iroh::key - Rust pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh::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 serialize_public_pem(&self) -> String
Serializes the public key as PEM
-pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>
Construct a PublicKey from a slice of bytes.
+Implementations§
source§impl PublicKey
sourcepub fn serialize_public_pem(&self) -> String
Serializes the public key as PEM
+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 more§impl FromStr for PublicKey
Deserialises the PublicKey from it’s base32 encoding.
+) -> 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 TryFrom<&[u8]> for PublicKey
§fn try_from(
+) -> 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<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
source§impl<T> RuleType for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/key/struct.SecretKey.html b/pr/2937/docs/iroh/key/struct.SecretKey.html
index 47909ba477..95cd7e2711 100644
--- a/pr/2937/docs/iroh/key/struct.SecretKey.html
+++ b/pr/2937/docs/iroh/key/struct.SecretKey.html
@@ -1,25 +1,25 @@
-SecretKey in iroh::key - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
-Implementations§
§impl SecretKey
pub fn serialize_secret_pem(&self) -> Zeroizing<String>
Serializes the secret key as PEM
-pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKeywhere
+SecretKey in iroh::key - Rust pub struct SecretKey { /* private fields */ }
Expand description
A secret key.
+Implementations§
source§impl SecretKey
sourcepub fn serialize_secret_pem(&self) -> Zeroizing<String>
Serializes the secret key as PEM
+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 more§impl Serialize for SecretKey
§fn serialize<S>(
+) -> 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§impl TryFrom<&[u8]> for SecretKey
§fn try_from(
+) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto 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
@@ -48,6 +48,6 @@ The public part can always be recovered.
V: MultiLane<T>,
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/key/struct.SharedSecret.html b/pr/2937/docs/iroh/key/struct.SharedSecret.html
index 09cd304642..f060dfed2e 100644
--- a/pr/2937/docs/iroh/key/struct.SharedSecret.html
+++ b/pr/2937/docs/iroh/key/struct.SharedSecret.html
@@ -1,7 +1,7 @@
-SharedSecret in iroh::key - Rust Struct iroh::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::key - Rust Struct iroh::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/2937/docs/iroh/key/struct.Signature.html b/pr/2937/docs/iroh/key/struct.Signature.html
index aa56ae70e4..db0e9b9c8b 100644
--- a/pr/2937/docs/iroh/key/struct.Signature.html
+++ b/pr/2937/docs/iroh/key/struct.Signature.html
@@ -17,19 +17,19 @@ elements at the time a signature is verified.
Trait Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for Signature
§fn deserialize<D>(
deserializer: D
-) -> Result<Signature, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl FromStr for Signature
Decode a signature from hexadecimal.
+) -> Result<Signature, <D as Deserializer<'de>>::Error>where
+ D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read more§impl FromStr for Signature
Decode a signature from hexadecimal.
Upper and lower case hexadecimal are both accepted, however mixed case is
rejected.
§impl Serialize for Signature
§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 Signature
§impl Eq for Signature
§impl StructuralPartialEq for Signature
Auto Trait Implementations§
§impl Freeze for Signature
§impl RefUnwindSafe for Signature
§impl Send for Signature
§impl Sync for Signature
§impl Unpin for Signature
§impl UnwindSafe for Signature
Blanket Implementations§
source§impl<T> Any for Twhere
+) -> 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 Signature
§impl Eq for Signature
§impl StructuralPartialEq for Signature
Auto Trait Implementations§
§impl Freeze for Signature
§impl RefUnwindSafe for Signature
§impl Send for Signature
§impl Sync for Signature
§impl Unpin for Signature
§impl UnwindSafe for Signature
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/key/type.NodeId.html b/pr/2937/docs/iroh/key/type.NodeId.html
index 3d730836ff..eebe370714 100644
--- a/pr/2937/docs/iroh/key/type.NodeId.html
+++ b/pr/2937/docs/iroh/key/type.NodeId.html
@@ -1,4 +1,4 @@
-NodeId in iroh::key - Rust pub type NodeId = PublicKey;
Expand description
The identifier for a node in the (iroh) network.
+NodeId in iroh::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/2937/docs/iroh/metrics/struct.RelayMetrics.html b/pr/2937/docs/iroh/metrics/struct.RelayMetrics.html
index 6f003df936..b51144030c 100644
--- a/pr/2937/docs/iroh/metrics/struct.RelayMetrics.html
+++ b/pr/2937/docs/iroh/metrics/struct.RelayMetrics.html
@@ -1,4 +1,4 @@
-RelayMetrics in iroh::metrics - Rust Struct iroh::metrics::RelayMetrics
pub struct RelayMetrics {Show 21 fields
+RelayMetrics in iroh::metrics - Rust Struct iroh::metrics::RelayMetrics
source · pub struct RelayMetrics {Show 21 fields
pub bytes_sent: Counter,
pub bytes_recv: Counter,
pub send_packets_sent: Counter,
@@ -42,7 +42,7 @@
§unique_client_keys: CounterNumber of unique client keys per day
§websocket_accepts: CounterNumber of accepted websocket connections
§derp_accepts: CounterNumber of accepted ‘iroh derp http’ connection upgrades
-Trait Implementations§
§impl Metric for Metrics
§fn with_metric<T, F>(f: F)where
+Trait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
Only records if this metric is registered in the global registry.§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2937/docs/iroh/protocol/struct.Router.html b/pr/2937/docs/iroh/protocol/struct.Router.html
index 4eca9a2124..817e3c9cc8 100644
--- a/pr/2937/docs/iroh/protocol/struct.Router.html
+++ b/pr/2937/docs/iroh/protocol/struct.Router.html
@@ -19,7 +19,7 @@ router.shutdown().await?Implementations§
source§impl Router
sourcepub fn is_shutdown(&self) -> bool
Checks if the router is already shutdown.
-sourcepub async fn shutdown(&self) -> Result<()>
Shuts down the accept loop cleanly.
When this function returns, all ProtocolHandlers will be shutdown and
Endpoint::close will have been called.
If already shutdown, it returns Ok.
diff --git a/pr/2937/docs/iroh/protocol/struct.RouterBuilder.html b/pr/2937/docs/iroh/protocol/struct.RouterBuilder.html
index f797cf2828..6eff8804c9 100644
--- a/pr/2937/docs/iroh/protocol/struct.RouterBuilder.html
+++ b/pr/2937/docs/iroh/protocol/struct.RouterBuilder.html
@@ -7,7 +7,7 @@
) -> SelfConfigures the router to accept the ProtocolHandler when receiving a connection
with this alpn.
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
diff --git a/pr/2937/docs/iroh/protocol/trait.ProtocolHandler.html b/pr/2937/docs/iroh/protocol/trait.ProtocolHandler.html
index b55a000ff5..edef715e16 100644
--- a/pr/2937/docs/iroh/protocol/trait.ProtocolHandler.html
+++ b/pr/2937/docs/iroh/protocol/trait.ProtocolHandler.html
@@ -1,6 +1,6 @@
ProtocolHandler in iroh::protocol - Rust Trait iroh::protocol::ProtocolHandler
source · pub trait ProtocolHandler: Send + Sync + Debug + 'static {
// Required method
- fn accept(&self, conn: Connecting) -> BoxedFuture<Result<()>>;
+ fn accept(&self, conn: Connecting) -> BoxedFuture<Result<()>>;
// Provided method
fn shutdown(&self) -> BoxedFuture<()> { ... }
@@ -10,7 +10,7 @@
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::protocol::RouterBuilder::accept.
-
Required Methods§
sourcefn accept(&self, conn: Connecting) -> BoxedFuture<Result<()>>
Handle an incoming connection.
+Required Methods§
sourcefn accept(&self, conn: Connecting) -> BoxedFuture<Result<()>>
Handle an incoming connection.
This runs on a freshly spawned tokio task so this can be long-running.
Provided Methods§
Implementations on Foreign Types§
source§impl<T: ProtocolHandler> ProtocolHandler for Box<T>
source§impl<T: ProtocolHandler> ProtocolHandler for Arc<T>
Implementors§
\ No newline at end of file
+
Implementations on Foreign Types§
source§impl<T: ProtocolHandler> ProtocolHandler for Box<T>
source§impl<T: ProtocolHandler> ProtocolHandler for Arc<T>
Implementors§
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/struct.AddrInfo.html b/pr/2937/docs/iroh/struct.AddrInfo.html
index 5b0b07aa72..bc37f2c9af 100644
--- a/pr/2937/docs/iroh/struct.AddrInfo.html
+++ b/pr/2937/docs/iroh/struct.AddrInfo.html
@@ -1,4 +1,4 @@
-AddrInfo in iroh - Rust pub struct AddrInfo {
+AddrInfo in iroh - Rust pub struct AddrInfo {
pub relay_url: Option<RelayUrl>,
pub direct_addresses: BTreeSet<SocketAddr>,
}
Expand description
Network paths to contact an iroh 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 more§impl Ord for AddrInfo
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
+) -> Result<AddrInfo, <__D as Deserializer<'de>>::Error>where
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read more
source§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
+) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
+ __S: Serializer,Serialize this value into the given Serde serializer. Read more
source§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(
@@ -58,6 +58,6 @@ operator. §fn vzip(self) -> V
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/struct.NodeAddr.html b/pr/2937/docs/iroh/struct.NodeAddr.html
index 817666d41f..f30a559c60 100644
--- a/pr/2937/docs/iroh/struct.NodeAddr.html
+++ b/pr/2937/docs/iroh/struct.NodeAddr.html
@@ -1,4 +1,4 @@
-NodeAddr in iroh - Rust pub struct NodeAddr {
+NodeAddr in iroh - Rust pub struct NodeAddr {
pub node_id: PublicKey,
pub info: AddrInfo,
}
Expand description
Network-level addressing information for an iroh 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.§impl Ord for NodeAddr
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
+) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>where
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read more
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
+) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
+ __S: Serializer,Serialize this value into the given Serde serializer. Read more
source§impl Eq for NodeAddr
source§impl StructuralPartialEq for NodeAddr
Auto Trait Implementations§
§impl Freeze for NodeAddr
§impl RefUnwindSafe for NodeAddr
§impl Send for NodeAddr
§impl Sync for NodeAddr
§impl Unpin for NodeAddr
§impl UnwindSafe for NodeAddr
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
@@ -90,6 +90,6 @@ operator. §fn vzip(self) -> V
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/struct.RelayMap.html b/pr/2937/docs/iroh/struct.RelayMap.html
index 25fff5950c..9c07385f3b 100644
--- a/pr/2937/docs/iroh/struct.RelayMap.html
+++ b/pr/2937/docs/iroh/struct.RelayMap.html
@@ -1,27 +1,27 @@
-RelayMap in iroh - 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 - Rust pub struct RelayMap { /* private fields */ }
Expand description
Configuration of all the relay servers that can be used.
+Implementations§
source§impl RelayMap
sourcepub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>
Returns an Iterator over all known nodes.
+sourcepub fn contains_node(&self, url: &RelayUrl) -> bool
Is this a known node?
+sourcepub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6.
If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
-pub fn from_nodes<I>(
+
Trait Implementations§
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/2937/docs/iroh/struct.RelayNode.html b/pr/2937/docs/iroh/struct.RelayNode.html
index 663d5a3d7b..36ba522a0c 100644
--- a/pr/2937/docs/iroh/struct.RelayNode.html
+++ b/pr/2937/docs/iroh/struct.RelayNode.html
@@ -1,8 +1,8 @@
-RelayNode in iroh - Rust pub struct RelayNode {
+RelayNode in iroh - Rust pub struct RelayNode {
pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
- pub quic: Option<QuicConfig>,
+ pub quic: Option<QuicConfig>,
}
Expand description
Information on a specific relay server.
Includes the Url where it can be dialed.
Fields§
§url: RelayUrlThe RelayUrl where this relay server can be dialed.
@@ -11,24 +11,24 @@
functionality is used.
§stun_port: u16The stun port of the relay server.
Setting this to 0 means the default STUN port is used.
-§quic: Option<QuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
+§quic: Option<QuicConfig>Configuration to speak to the QUIC endpoint on the relay server.
When None, we will not attempt to do QUIC address discovery
with this relay server.
-Trait Implementations§
§impl<'de> Deserialize<'de> for RelayNode
§fn deserialize<__D>(
+
Trait Implementations§
source§impl<'de> Deserialize<'de> for RelayNode
source§fn deserialize<__D>(
__deserializer: __D
-) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Ord for RelayNode
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
+) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>where
+ __D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read more
source§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
+) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
+ __S: Serializer,Serialize this value into the given Serde serializer. Read more
source§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(
@@ -61,6 +61,6 @@ operator. §fn vzip(self) -> V
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/struct.RelayUrl.html b/pr/2937/docs/iroh/struct.RelayUrl.html
index 0f7be54528..12c61638c5 100644
--- a/pr/2937/docs/iroh/struct.RelayUrl.html
+++ b/pr/2937/docs/iroh/struct.RelayUrl.html
@@ -1,5 +1,5 @@
-RelayUrl in iroh - 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:
+RelayUrl in iroh - Rust pub struct RelayUrl(/* private fields */);
Expand description
Methods from Deref<Target = Url>§
sourcepub fn join(&self, input: &str) -> Result<Url, ParseError>
Parse a string as an URL, with this URL as the base URL.
+Methods from Deref<Target = Url>§
sourcepub fn join(&self, input: &str) -> Result<Url, ParseError>
Parse a string as an URL, with this URL as the base URL.
The inverse of this is make_relative.
§Notes
@@ -47,7 +47,7 @@ as input replaces everything in the base URL after the scheme.
§Errors
If the function can not parse an URL from the given string
with this URL as the base URL, a ParseError variant will be returned.
-
sourcepub fn make_relative(&self, url: &Url) -> Option<String>
Creates a relative URL if possible, with this URL as the base URL.
+sourcepub fn make_relative(&self, url: &Url) -> Option<String>
Creates a relative URL if possible, with this URL as the base URL.
This is the inverse of join.
§Examples
use url::Url;
@@ -74,7 +74,7 @@ with this URL as the base URL, a ParseError
§Errors
If this URL can’t be a base for the given URL, None is returned.
This is for example the case if the scheme, host or port are not the same.
-
sourcepub fn as_str(&self) -> &str
Return the serialization of this URL.
This is fast since that serialization is already stored in the Url struct.
§Examples
use url::Url;
@@ -82,7 +82,7 @@ This is for example the case if the scheme, host or port are not the same.
let url_str = "https://example.net/";
let url = Url::parse(url_str)?;
assert_eq!(url.as_str(), url_str);
-sourcepub fn origin(&self) -> Origin
Return the origin of this URL (https://url.spec.whatwg.org/#origin)
+sourcepub fn origin(&self) -> Origin
Return the origin of this URL (https://url.spec.whatwg.org/#origin)
Note: this returns an opaque origin for file: URLs, which causes
url.origin() != url.origin().
§Examples
@@ -119,20 +119,20 @@ This is for example the case if the scheme, host or port are not the same.
let url = Url::parse("foo:bar")?;
assert!(!url.origin().is_tuple());
-sourcepub fn scheme(&self) -> &str
Return the scheme of this URL, lower-cased, as an ASCII string without the ‘:’ delimiter.
+sourcepub fn scheme(&self) -> &str
Return the scheme of this URL, lower-cased, as an ASCII string without the ‘:’ delimiter.
§Examples
use url::Url;
let url = Url::parse("file:///tmp/foo")?;
assert_eq!(url.scheme(), "file");
-sourcepub fn is_special(&self) -> bool
Return whether the URL is special (has a special scheme)
+sourcepub fn is_special(&self) -> bool
Return whether the URL is special (has a special scheme)
§Examples
use url::Url;
assert!(Url::parse("http:///tmp/foo")?.is_special());
assert!(Url::parse("file:///tmp/foo")?.is_special());
assert!(!Url::parse("moz:///tmp/foo")?.is_special());
-
Return whether the URL has an ‘authority’,
+
Return whether the URL has an ‘authority’,
which can contain a username, password, host, and port number.
URLs that do not are either path-only like unix:/run/foo.socket
or cannot-be-a-base like data:text/plain,Stuff.
@@ -148,7 +148,7 @@ or cannot-be-a-base like data:text/plain,Stuff.
let url = Url::parse("data:text/plain,Stuff")?;
assert!(!url.has_authority());
-
Return the authority of this URL as an ASCII string.
+
Return the authority of this URL as an ASCII string.
Non-ASCII domains are punycode-encoded per IDNA if this is the host
of a special URL, or percent encoded for non-special URLs.
IPv6 addresses are given between [ and ] brackets.
@@ -168,7 +168,7 @@ Ports are omitted if they match the well known port of a special URL.
assert_eq!(url.authority(), "%C3%A0lex.%D1%80%D1%84.example.com:6667");
let url = Url::parse("http://àlex.рф.example.com:80/foo")?;
assert_eq!(url.authority(), "xn--lex-8ka.xn--p1ai.example.com");
-sourcepub fn cannot_be_a_base(&self) -> bool
Return whether this URL is a cannot-be-a-base URL,
+
sourcepub fn cannot_be_a_base(&self) -> bool
Return whether this URL is a cannot-be-a-base URL,
meaning that parsing a relative URL string with this URL as the base will return an error.
This is the case if the scheme and : delimiter are not followed by a / slash,
as is typically the case of data: and mailto: URLs.
@@ -183,7 +183,7 @@ as is typically the case of data: and mailto: URLs.let url = Url::parse("data:text/plain,Stuff")?;
assert!(url.cannot_be_a_base());
-sourcepub fn username(&self) -> &str
Return the username for this URL (typically the empty string)
as a percent-encoded ASCII string.
§Examples
use url::Url;
@@ -196,7 +196,7 @@ as a percent-encoded ASCII string.
let url = Url::parse("https://example.com")?;
assert_eq!(url.username(), "");
-sourcepub fn password(&self) -> Option<&str>
Return the password for this URL, if any, as a percent-encoded ASCII string.
+sourcepub fn password(&self) -> Option<&str>
Return the password for this URL, if any, as a percent-encoded ASCII string.
§Examples
use url::Url;
@@ -211,7 +211,7 @@ as a percent-encoded ASCII string.
let url = Url::parse("https://example.com")?;
assert_eq!(url.password(), None);
-sourcepub fn has_host(&self) -> bool
Equivalent to url.host().is_some().
§Examples
use url::Url;
@@ -223,7 +223,7 @@ as a percent-encoded ASCII string.
let url = Url::parse("data:text/plain,Stuff")?;
assert!(!url.has_host());
-sourcepub fn host_str(&self) -> Option<&str>
Return the string representation of the host (domain or IP address) for this URL, if any.
+sourcepub fn host_str(&self) -> Option<&str>
Return the string representation of the host (domain or IP address) for this URL, if any.
Non-ASCII domains are punycode-encoded per IDNA if this is the host
of a special URL, or percent encoded for non-special URLs.
IPv6 addresses are given between [ and ] brackets.
@@ -244,7 +244,7 @@ don’t have a host.
let url = Url::parse("data:text/plain,Stuff")?;
assert_eq!(url.host_str(), None);
-sourcepub fn host(&self) -> Option<Host<&str>>
Return the parsed representation of the host for this URL.
+
sourcepub fn host(&self) -> Option<Host<&str>>
Return the parsed representation of the host for this URL.
Non-ASCII domain labels are punycode-encoded per IDNA if this is the host
of a special URL, or percent encoded for non-special URLs.
Cannot-be-a-base URLs (typical of data: and mailto:) and some file: URLs
@@ -264,7 +264,7 @@ don’t have a host.
let url = Url::parse("data:text/plain,Stuff")?;
assert!(url.host().is_none());
-sourcepub fn domain(&self) -> Option<&str>
If this URL has a host and it is a domain name (not an IP address), return it.
+
sourcepub fn domain(&self) -> Option<&str>
If this URL has a host and it is a domain name (not an IP address), return it.
Non-ASCII domains are punycode-encoded per IDNA if this is the host
of a special URL, or percent encoded for non-special URLs.
§Examples
@@ -278,7 +278,7 @@ of a special URL, or percent encoded for non-special URLs.
let url = Url::parse("https://example.com/")?;
assert_eq!(url.domain(), Some("example.com"));
-
sourcepub fn port(&self) -> Option<u16>
Return the port number for this URL, if any.
Note that default port numbers are never reflected by the serialization,
use the port_or_known_default() method if you want a default port number returned.
§Examples
@@ -292,7 +292,7 @@ use the port_or_known_default() method if you want a default port n
let url = Url::parse("ssh://example.com:22")?;
assert_eq!(url.port(), Some(22));
-
sourcepub fn port_or_known_default(&self) -> Option<u16>
Return the port number for this URL, or the default port number if it is known.
+sourcepub fn port_or_known_default(&self) -> Option<u16>
Return the port number for this URL, or the default port number if it is known.
This method only knows the default port number
of the http, https, ws, wss and ftp schemes.
For URLs in these schemes, this method always returns Some(_).
@@ -308,7 +308,7 @@ For other schemes, it is the same as Url::port().
let url = Url::parse("https://example.com")?;
assert_eq!(url.port_or_known_default(), Some(443));
-sourcepub fn socket_addrs(
+
sourcepub fn socket_addrs(
&self,
default_port_number: impl Fn() -> Option<u16>
) -> Result<Vec<SocketAddr>, Error>
Resolve a URL’s host and port number to SocketAddr.
@@ -329,7 +329,7 @@ std::net::TcpStream::connect(&*addrs)
_ => None,
})
}
-sourcepub fn path(&self) -> &str
Return the path for this URL, as a percent-encoded ASCII string.
For cannot-be-a-base URLs, this is an arbitrary string that doesn’t start with ‘/’.
For other URLs, this starts with a ‘/’ slash
and continues with slash-separated path segments.
@@ -344,7 +344,7 @@ and continues with slash-separated path segments.
let url = Url::parse("https://example.com/countries/việt nam")?;
assert_eq!(url.path(), "/countries/vi%E1%BB%87t%20nam");
-sourcepub fn path_segments(&self) -> Option<Split<'_, char>>
Unless this URL is cannot-be-a-base,
+
sourcepub fn path_segments(&self) -> Option<Split<'_, char>>
Unless this URL is cannot-be-a-base,
return an iterator of ‘/’ slash-separated path segments,
each as a percent-encoded ASCII string.
Return None for cannot-be-a-base URLs.
@@ -372,7 +372,7 @@ each as a percent-encoded ASCII string.
let mut path_segments = url.path_segments().ok_or_else(|| "cannot be base")?;
assert_eq!(path_segments.next(), Some("countries"));
assert_eq!(path_segments.next(), Some("vi%E1%BB%87t%20nam"));
-sourcepub fn query(&self) -> Option<&str>
Return this URL’s query string, if any, as a percent-encoded ASCII string.
+sourcepub fn query(&self) -> Option<&str>
Return this URL’s query string, if any, as a percent-encoded ASCII string.
§Examples
use url::Url;
@@ -388,7 +388,7 @@ each as a percent-encoded ASCII string.
let url = Url::parse("https://example.com/?country=español")?;
let query = url.query();
assert_eq!(query, Some("country=espa%C3%B1ol"));
-sourcepub fn query_pairs(&self) -> Parse<'_>
Parse the URL’s query string, if any, as application/x-www-form-urlencoded
+
sourcepub fn query_pairs(&self) -> Parse<'_>
Parse the URL’s query string, if any, as application/x-www-form-urlencoded
and return an iterator of (key, value) pairs.
§Examples
use std::borrow::Cow;
@@ -402,7 +402,7 @@ and return an iterator of (key, value) pairs.
assert_eq!(pairs.next(), Some((Cow::Borrowed("page"), Cow::Borrowed("2"))));
assert_eq!(pairs.next(), Some((Cow::Borrowed("sort"), Cow::Borrowed("desc"))));
-sourcepub fn fragment(&self) -> Option<&str>
Return this URL’s fragment identifier, if any.
A fragment is the part of the URL after the # symbol.
The fragment is optional and, if present, contains a fragment identifier
that identifies a secondary resource, such as a section heading
@@ -422,15 +422,15 @@ but the input may have been percent-encoded already.
let url = Url::parse("https://example.com/data.csv#cell=4,1-6,2")?;
assert_eq!(url.fragment(), Some("cell=4,1-6,2"));
-
sourcepub fn serialize_internal<S>(
+
sourcepub fn serialize_internal<S>(
&self,
serializer: S
-) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize with Serde using the internal representation of the Url struct.
+) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
+ S: Serializer,Serialize with Serde using the internal representation of the Url struct.
The corresponding deserialize_internal method sacrifices some invariant-checking
for speed, compared to the Deserialize trait impl.
This method is only available if the serde Cargo feature is enabled.
-sourcepub fn to_file_path(&self) -> Result<PathBuf, ()>
Assuming the URL is in the file scheme or similar,
+
sourcepub fn to_file_path(&self) -> Result<PathBuf, ()>
Assuming the URL is in the file scheme or similar,
convert its path to an absolute std::path::Path.
Note: This does not actually check the URL’s scheme,
and may give nonsensical results for other schemes.
@@ -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.
-If you need more control over the error first create a Url and use RelayUrl::from
+) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>
where
+ __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
+) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
+ __S: Serializer,Serialize this value into the given Serde serializer. Read more
source§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(
@@ -499,6 +499,6 @@ operator. §fn vzip(self) -> V
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/test_utils/fn.create_dns_resolver.html b/pr/2937/docs/iroh/test_utils/fn.create_dns_resolver.html
index 962492b0d6..8d591ddffe 100644
--- a/pr/2937/docs/iroh/test_utils/fn.create_dns_resolver.html
+++ b/pr/2937/docs/iroh/test_utils/fn.create_dns_resolver.html
@@ -1,2 +1,2 @@
-create_dns_resolver in iroh::test_utils - Rust Function iroh::test_utils::create_dns_resolver
source · pub fn create_dns_resolver(nameserver: SocketAddr) -> Result<TokioAsyncResolver>
Available on test or crate feature test-utils only.Expand description
Create a DNS resolver with a single nameserver.
+create_dns_resolver in iroh::test_utils - Rust Function iroh::test_utils::create_dns_resolver
source · pub fn create_dns_resolver(nameserver: SocketAddr) -> Result<TokioAsyncResolver>
Available on test or crate feature test-utils only.Expand description
Create a DNS resolver with a single nameserver.
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/test_utils/fn.run_relay_server.html b/pr/2937/docs/iroh/test_utils/fn.run_relay_server.html
index 7588afe3e1..4208818776 100644
--- a/pr/2937/docs/iroh/test_utils/fn.run_relay_server.html
+++ b/pr/2937/docs/iroh/test_utils/fn.run_relay_server.html
@@ -1,4 +1,4 @@
-run_relay_server in iroh::test_utils - Rust Function iroh::test_utils::run_relay_server
source · pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on test or crate feature test-utils only.Expand description
Runs a relay server with STUN and QUIC enabled suitable for tests.
+run_relay_server in iroh::test_utils - Rust Function iroh::test_utils::run_relay_server
source · pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on test or crate feature test-utils only.
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/2937/docs/iroh/test_utils/fn.run_relay_server_with.html
index 0a26af2191..a93ebb063f 100644
--- a/pr/2937/docs/iroh/test_utils/fn.run_relay_server_with.html
+++ b/pr/2937/docs/iroh/test_utils/fn.run_relay_server_with.html
@@ -1,9 +1,9 @@
run_relay_server_with in iroh::test_utils - Rust Function iroh::test_utils::run_relay_server_with
source · pub async fn run_relay_server_with(
- stun: Option<StunConfig>,
+ stun: Option<StunConfig>,
quic: bool
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on test or crate feature test-utils only.Expand description
Runs a relay server.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on test or crate feature test-utils only.Expand description
Runs a relay server.
stun can be set to None to disable stun, or set to Some StunConfig,
to enable stun on a specific socket.
-If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.
+If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.
The return value is similar to run_relay_server.
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/2937/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
index 9242266b9c..b5cfc39152 100644
--- a/pr/2937/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
+++ b/pr/2937/docs/iroh/test_utils/fn.run_relay_server_with_stun.html
@@ -1,5 +1,5 @@
run_relay_server_with_stun in iroh::test_utils - Rust Function iroh::test_utils::run_relay_server_with_stun
source · pub async fn run_relay_server_with_stun(
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on test or crate feature test-utils only.Expand description
Runs a relay server with STUN enabled suitable for tests.
+) -> Result<(RelayMap, RelayUrl, Server)>Available on test or crate feature test-utils only.
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/test_utils/struct.DnsPkarrServer.html b/pr/2937/docs/iroh/test_utils/struct.DnsPkarrServer.html
index 2e8c9f315d..8cdcdaf3de 100644
--- a/pr/2937/docs/iroh/test_utils/struct.DnsPkarrServer.html
+++ b/pr/2937/docs/iroh/test_utils/struct.DnsPkarrServer.html
@@ -1,19 +1,19 @@
DnsPkarrServer in iroh::test_utils - Rust Struct iroh::test_utils::DnsPkarrServer
source · pub struct DnsPkarrServer {
pub node_origin: String,
pub nameserver: SocketAddr,
- pub pkarr_url: Url,
+ pub pkarr_url: Url,
/* private fields */
}
Available on test or crate feature test-utils only.Expand description
Handle and drop guard for test DNS and Pkarr servers.
Once the struct is dropped the servers will shut down.
Fields§
§node_origin: StringThe node origin domain.
§nameserver: SocketAddrThe socket address of the DNS server.
-§pkarr_url: UrlThe HTTP URL of the Pkarr server.
-Implementations§
source§impl DnsPkarrServer
sourcepub async fn run_with_origin(node_origin: String) -> Result<Self>
Run DNS and Pkarr servers on localhost with the specified node_origin domain.
+§pkarr_url: UrlThe HTTP URL of the Pkarr server.
+Implementations§
source§impl DnsPkarrServer
sourcepub async fn run_with_origin(node_origin: String) -> Result<Self>
Run DNS and Pkarr servers on localhost with the specified node_origin domain.
sourcepub fn discovery(&self, secret_key: SecretKey) -> Box<ConcurrentDiscovery>
Create a ConcurrentDiscovery with DnsDiscovery and PkarrPublisher
configured to use the test servers.
sourcepub fn dns_resolver(&self) -> DnsResolver
Create a DnsResolver configured to use the test DNS server.
-Trait Implementations§
Auto Trait Implementations§
§impl Freeze for DnsPkarrServer
§impl !RefUnwindSafe for DnsPkarrServer
§impl Send for DnsPkarrServer
§impl Sync for DnsPkarrServer
§impl Unpin for DnsPkarrServer
§impl !UnwindSafe for DnsPkarrServer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2937/docs/iroh/ticket/enum.Error.html b/pr/2937/docs/iroh/ticket/enum.Error.html
index 7175b8478b..27d793c7b1 100644
--- a/pr/2937/docs/iroh/ticket/enum.Error.html
+++ b/pr/2937/docs/iroh/ticket/enum.Error.html
@@ -1,4 +1,4 @@
-Error in iroh::ticket - Rust pub enum Error {
+Error in iroh::ticket - Rust pub enum Error {
Kind {
expected: &'static str,
},
@@ -10,7 +10,7 @@
§Postcard(Error)
This looks like a ticket, but postcard deserialization failed.
§Encoding(DecodeError)
This looks like a ticket, but base32 decoding failed.
§Verify(&'static str)
Verification of the deserialized bytes failed.
-
Trait Implementations§
§impl Error for Error
§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for Error
§impl RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl UnwindSafe for Error
Blanket Implementations§
Trait Implementations§
source§impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for Error
§impl RefUnwindSafe for Error
§impl Send for Error
§impl Sync for Error
§impl Unpin for Error
§impl UnwindSafe for Error
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2937/docs/iroh/ticket/index.html b/pr/2937/docs/iroh/ticket/index.html
index 6742b89342..288da1d108 100644
--- a/pr/2937/docs/iroh/ticket/index.html
+++ b/pr/2937/docs/iroh/ticket/index.html
@@ -1 +1 @@
-iroh::ticket - Rust
\ No newline at end of file
+iroh::ticket - Rust
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/ticket/struct.BlobTicket.html b/pr/2937/docs/iroh/ticket/struct.BlobTicket.html
index ebdfe65c72..5f2693b843 100644
--- a/pr/2937/docs/iroh/ticket/struct.BlobTicket.html
+++ b/pr/2937/docs/iroh/ticket/struct.BlobTicket.html
@@ -1,25 +1,25 @@
-BlobTicket in iroh::ticket - Rust Struct iroh::ticket::BlobTicket
pub struct BlobTicket { /* private fields */ }
Expand description
A token containing everything to get a file from the provider.
+BlobTicket in iroh::ticket - Rust Struct iroh::ticket::BlobTicket
source · pub struct BlobTicket { /* private fields */ }
Expand description
A token containing everything to get a file from the provider.
It is a single item which can be easily serialized and deserialized.
-Implementations§
§impl BlobTicket
pub fn new(
+
Implementations§
source§impl BlobTicket
sourcepub fn new(
node: NodeAddr,
hash: Hash,
format: BlobFormat
-) -> Result<BlobTicket, Error>
Creates a new ticket.
-pub fn format(&self) -> BlobFormat
The BlobFormat for this ticket.
-pub fn recursive(&self) -> bool
True if the ticket is for a collection and should retrieve all blobs in it.
-pub fn into_parts(self) -> (NodeAddr, Hash, BlobFormat)
Get the contents of the ticket, consuming it.
-Trait Implementations§
§impl Clone for BlobTicket
§fn clone(&self) -> BlobTicket
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 BlobTicket
§impl<'de> Deserialize<'de> for BlobTicket
§fn deserialize<D>(
+) -> Result<BlobTicket, Error>
Creates a new ticket.
+sourcepub fn format(&self) -> BlobFormat
The BlobFormat for this ticket.
+sourcepub fn recursive(&self) -> bool
True if the ticket is for a collection and should retrieve all blobs in it.
+sourcepub fn into_parts(self) -> (NodeAddr, Hash, BlobFormat)
Get the contents of the ticket, consuming it.
+Trait Implementations§
source§impl Clone for BlobTicket
source§fn clone(&self) -> BlobTicket
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 BlobTicket
source§impl<'de> Deserialize<'de> for BlobTicket
source§fn deserialize<D>(
deserializer: D
-) -> Result<BlobTicket, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for BlobTicket
§impl FromStr for BlobTicket
§impl PartialEq for BlobTicket
§fn eq(&self, other: &BlobTicket) -> bool
This method tests for self and other values to be equal, and is used
+) -> Result<BlobTicket, <D as Deserializer<'de>>::Error>where
+ D: Deserializer<'de>,Deserialize this value from the given Serde deserializer. Read moresource§impl Display for BlobTicket
source§impl FromStr for BlobTicket
source§impl PartialEq for BlobTicket
source§fn eq(&self, other: &BlobTicket) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl Serialize for BlobTicket
source§impl Serialize for BlobTicket
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 BlobTicket
§fn from_bytes(bytes: &[u8]) -> Result<BlobTicket, Error>
Deserialize from the base32 string representation bytes.§fn deserialize(str: &str) -> Result<Self, Error>
Deserialize from a string.§impl Eq for BlobTicket
§impl StructuralPartialEq for BlobTicket
Auto Trait Implementations§
§impl Freeze for BlobTicket
§impl RefUnwindSafe for BlobTicket
§impl Send for BlobTicket
§impl Sync for BlobTicket
§impl Unpin for BlobTicket
§impl UnwindSafe for BlobTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
+ S: Serializer,Serialize this value into the given Serde serializer. Read more
source§impl Ticket for BlobTicket
source§fn from_bytes(bytes: &[u8]) -> Result<BlobTicket, Error>
Deserialize from the base32 string representation bytes.source§impl Eq for BlobTicket
source§impl StructuralPartialEq for BlobTicket
Auto Trait Implementations§
§impl Freeze for BlobTicket
§impl RefUnwindSafe for BlobTicket
§impl Send for BlobTicket
§impl Sync for BlobTicket
§impl Unpin for BlobTicket
§impl UnwindSafe for BlobTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/ticket/struct.NodeTicket.html b/pr/2937/docs/iroh/ticket/struct.NodeTicket.html
index 9bddf14b12..78f51b5581 100644
--- a/pr/2937/docs/iroh/ticket/struct.NodeTicket.html
+++ b/pr/2937/docs/iroh/ticket/struct.NodeTicket.html
@@ -1,4 +1,4 @@
-NodeTicket in iroh::ticket - Rust Struct iroh::ticket::NodeTicket
pub struct NodeTicket { /* private fields */ }
Expand description
A token containing information for establishing a connection to a node.
+NodeTicket in iroh::ticket - Rust Struct iroh::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
This method tests for self and other values to be equal, and is used
+) -> Result<NodeTicket, <D as Deserializer<'de>>::Error>where
+ D: Deserializer<'de>,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
+) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
+ S: Serializer,Serialize this value into the given Serde serializer. Read more
source§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,
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
-[WithDispatch] wrapper. Read moresource§impl<T> DeserializeOwned for Twhere
- T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
+[WithDispatch] wrapper. Read more
source§impl<T> DeserializeOwned for Twhere
+ T: for<'de> Deserialize<'de>,
§impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> MaybeSendSync for T
\ No newline at end of file
diff --git a/pr/2937/docs/iroh/ticket/trait.Ticket.html b/pr/2937/docs/iroh/ticket/trait.Ticket.html
index 29a6b228c7..5e8769cc9e 100644
--- a/pr/2937/docs/iroh/ticket/trait.Ticket.html
+++ b/pr/2937/docs/iroh/ticket/trait.Ticket.html
@@ -1,4 +1,4 @@
-Ticket in iroh::ticket - Rust pub trait Ticket: Sized {
+Ticket in iroh::ticket - Rust pub trait Ticket: Sized {
const KIND: &'static str;
// Required methods
@@ -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/2937/docs/iroh/tls/certificate/struct.GenError.html b/pr/2937/docs/iroh/tls/certificate/struct.GenError.html
index b8b5edc222..9133967166 100644
--- a/pr/2937/docs/iroh/tls/certificate/struct.GenError.html
+++ b/pr/2937/docs/iroh/tls/certificate/struct.GenError.html
@@ -1,5 +1,5 @@
GenError in iroh::tls::certificate - Rust Struct iroh::tls::certificate::GenError
source · pub struct GenError(/* private fields */);
Expand description
An error that occurs during certificate generation.
-Trait Implementations§
source§impl Error for GenError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for GenError
§impl RefUnwindSafe for GenError
§impl Send for GenError
§impl Sync for GenError
§impl Unpin for GenError
§impl UnwindSafe for GenError
Blanket Implementations§
Trait Implementations§
source§impl Error for GenError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for GenError
§impl RefUnwindSafe for GenError
§impl Send for GenError
§impl Sync for GenError
§impl Unpin for GenError
§impl UnwindSafe for GenError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2937/docs/iroh/tls/certificate/struct.ParseError.html b/pr/2937/docs/iroh/tls/certificate/struct.ParseError.html
index df35b65645..936c179567 100644
--- a/pr/2937/docs/iroh/tls/certificate/struct.ParseError.html
+++ b/pr/2937/docs/iroh/tls/certificate/struct.ParseError.html
@@ -1,5 +1,5 @@
ParseError in iroh::tls::certificate - Rust Struct iroh::tls::certificate::ParseError
source · pub struct ParseError(/* private fields */);
Expand description
An error that occurs during certificate parsing.
-Trait Implementations§
source§impl Debug for ParseError
source§impl Display for ParseError
source§impl Error for ParseError
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 ParseError
source§impl From<ParseError> for Error
source§fn from(certificate::ParseError: ParseError) -> Self
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for ParseError
§impl RefUnwindSafe for ParseError
§impl Send for ParseError
§impl Sync for ParseError
§impl Unpin for ParseError
§impl UnwindSafe for ParseError
Blanket Implementations§
Trait Implementations§
source§impl Debug for ParseError
source§impl Display for ParseError
source§impl Error for ParseError
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 ParseError
source§impl From<ParseError> for Error
source§fn from(certificate::ParseError: ParseError) -> Self
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for ParseError
§impl RefUnwindSafe for ParseError
§impl Send for ParseError
§impl Sync for ParseError
§impl Unpin for ParseError
§impl UnwindSafe for ParseError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/2937/docs/iroh/tls/certificate/struct.VerificationError.html b/pr/2937/docs/iroh/tls/certificate/struct.VerificationError.html
index 141de6a347..194ab85689 100644
--- a/pr/2937/docs/iroh/tls/certificate/struct.VerificationError.html
+++ b/pr/2937/docs/iroh/tls/certificate/struct.VerificationError.html
@@ -1,5 +1,5 @@
VerificationError in iroh::tls::certificate - Rust Struct iroh::tls::certificate::VerificationError
source · pub struct VerificationError(/* private fields */);
Expand description
An error that occurs during signature verification.
-Trait Implementations§
source§impl Debug for VerificationError
source§impl Display for VerificationError
source§impl Error for VerificationError
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 VerificationError
source§impl From<VerificationError> for Error
source§fn from(certificate::VerificationError: VerificationError) -> Self
Converts to this type from the input type.Auto Trait Implementations§
§impl Freeze for VerificationError
§impl RefUnwindSafe for VerificationError
§impl Send for VerificationError
§impl Sync for VerificationError
§impl Unpin for VerificationError
§impl UnwindSafe for VerificationError
Blanket Implementations§