From 8a8365d96c8bd55dae36df50cb27bc757366ae0f Mon Sep 17 00:00:00 2001 From: Arqu Date: Tue, 7 Oct 2025 18:23:24 +0000 Subject: [PATCH] deploy: f08ab9f5cd7df8d113f242ffb3dc902d6e69793b --- .../docs/iroh/endpoint/struct.Endpoint.html | 2 +- pr/3491/docs/iroh/enum.KeyParsingError.html | 10 +++--- pr/3491/docs/iroh/struct.NodeAddr.html | 32 ++++++++--------- pr/3491/docs/iroh/struct.PublicKey.html | 34 +++++++++---------- pr/3491/docs/iroh/struct.RelayUrl.html | 24 ++++++------- .../docs/iroh/struct.RelayUrlParseError.html | 8 ++--- pr/3491/docs/iroh/struct.SecretKey.html | 20 +++++------ pr/3491/docs/iroh/type.NodeId.html | 2 +- .../client/struct.ClientBuilder.html | 4 +-- .../iroh_relay/dns/struct.DnsResolver.html | 8 ++--- pr/3491/docs/iroh_relay/index.html | 2 +- pr/3491/docs/iroh_relay/node_info/index.html | 10 +++--- .../iroh_relay/node_info/struct.NodeData.html | 16 ++++----- .../iroh_relay/node_info/struct.NodeInfo.html | 26 +++++++------- .../iroh_relay/node_info/trait.NodeIdExt.html | 10 +++--- .../protos/relay/enum.ClientToRelayMsg.html | 4 +-- .../protos/relay/enum.RelayToClientMsg.html | 8 ++--- .../iroh_relay/server/enum.AccessConfig.html | 6 ++-- .../docs/iroh_relay/server/struct.Server.html | 4 +-- pr/3491/docs/iroh_relay/struct.RelayMap.html | 10 +++--- pr/3491/docs/iroh_relay/struct.RelayNode.html | 6 ++-- .../trait.impl/core/convert/trait.From.js | 4 +-- .../iter/traits/collect/trait.FromIterator.js | 4 +-- .../docs/type.impl/iroh/struct.PublicKey.js | 4 +-- 24 files changed, 129 insertions(+), 129 deletions(-) diff --git a/pr/3491/docs/iroh/endpoint/struct.Endpoint.html b/pr/3491/docs/iroh/endpoint/struct.Endpoint.html index 8f210bb612..a90e0b0fb4 100644 --- a/pr/3491/docs/iroh/endpoint/struct.Endpoint.html +++ b/pr/3491/docs/iroh/endpoint/struct.Endpoint.html @@ -26,7 +26,7 @@ Note that this overrides the current list of ALPNs.

alpn: &[u8], ) -> Result<Connection, ConnectError>

Connects to a remote Endpoint.

A value that can be converted into a NodeAddr is required. This can be either a -NodeAddr, a NodeId or a [iroh_base::ticket::NodeTicket].

+NodeAddr, a NodeId or a iroh_base::ticket::NodeTicket.

The NodeAddr must contain the NodeId to dial and may also contain a RelayUrl and direct addresses. If direct addresses are provided, they will be used to try and establish a direct connection without involving a relay server.

diff --git a/pr/3491/docs/iroh/enum.KeyParsingError.html b/pr/3491/docs/iroh/enum.KeyParsingError.html index 87685ad6a5..7657cd5f2a 100644 --- a/pr/3491/docs/iroh/enum.KeyParsingError.html +++ b/pr/3491/docs/iroh/enum.KeyParsingError.html @@ -1,4 +1,4 @@ -KeyParsingError in iroh - Rust

Enum KeyParsingError

pub enum KeyParsingError {
+KeyParsingError in iroh - Rust

Enum KeyParsingError

Source
pub enum KeyParsingError {
     Decode {
         source: DecodeError,
         backtrace: Option<Backtrace>,
@@ -17,14 +17,14 @@
 

Variants§

§

Decode

Error when decoding.

Fields

§source: DecodeError
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Key

Error when decoding the public key.

Fields

§source: Error
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

DecodeInvalidLength

The encoded information had the wrong length.

-

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

§

impl Debug for KeyParsingError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for KeyParsingError

§

fn fmt( +

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for KeyParsingError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for KeyParsingError

Source§

fn fmt( &self, __snafu_display_formatter: &mut Formatter<'_>, -) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for KeyParsingError

§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
§

impl ErrorCompat for KeyParsingError

§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for KeyParsingError

Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for KeyParsingError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
§

impl From<DecodeError> for KeyParsingError

§

fn from(error: DecodeError) -> KeyParsingError

Converts to this type from the input type.
§

impl From<Error> for KeyParsingError

§

fn from(error: Error) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<DecodeError> for KeyParsingError

Source§

fn from(error: DecodeError) -> KeyParsingError

Converts to this type from the input type.
Source§

impl From<Error> for KeyParsingError

Source§

fn from(error: Error) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method diff --git a/pr/3491/docs/iroh/struct.NodeAddr.html b/pr/3491/docs/iroh/struct.NodeAddr.html index 8d4913f292..379f6707f4 100644 --- a/pr/3491/docs/iroh/struct.NodeAddr.html +++ b/pr/3491/docs/iroh/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh - Rust

Struct NodeAddr

pub struct NodeAddr {
+NodeAddr in iroh - Rust

Struct NodeAddr

Source
pub struct NodeAddr {
     pub node_id: PublicKey,
     pub relay_url: Option<RelayUrl>,
     pub direct_addresses: BTreeSet<SocketAddr>,
@@ -27,39 +27,39 @@ whenever a connection to other nodes needs to be established.

Fields§

§node_id: PublicKey

The node’s identifier.

§relay_url: Option<RelayUrl>

The node’s home relay url.

§direct_addresses: BTreeSet<SocketAddr>

Socket addresses where the peer might be reached directly.

-

Implementations§

§

impl NodeAddr

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with no relay_url and no direct_addresses.

-

pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

Adds a relay url.

-

pub fn with_direct_addresses( +

Implementations§

Source§

impl NodeAddr

Source

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with no relay_url and no direct_addresses.

+
Source

pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

Adds a relay url.

+
Source

pub fn with_direct_addresses( self, addresses: impl IntoIterator<Item = SocketAddr>, ) -> NodeAddr

Adds the given direct addresses.

-

pub fn from_parts( +

Source

pub 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 is_empty(&self) -> bool

Returns true, if only a NodeId is present.

-

pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

Returns the direct addresses of this peer.

-

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay url of this peer.

-

Trait Implementations§

§

impl Clone for NodeAddr

§

fn clone(&self) -> NodeAddr

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for NodeAddr

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for NodeAddr

§

fn deserialize<__D>( +

Source

pub fn is_empty(&self) -> bool

Returns true, if only a NodeId is present.

+
Source

pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

Returns the direct addresses of this peer.

+
Source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay url of this peer.

+

Trait Implementations§

Source§

impl Clone for NodeAddr

Source§

fn clone(&self) -> NodeAddr

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeAddr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
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<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

§

fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

Converts to this type from the input type.
Source§

impl From<NodeAddr> for NodeData

Source§

fn from(node_addr: NodeAddr) -> NodeData

Converts to this type from the input type.
Source§

impl From<NodeAddr> for NodeInfo

Source§

fn from(addr: NodeAddr) -> NodeInfo

Converts to this type from the input type.
Source§

impl From<NodeInfo> for NodeAddr

Source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
§

impl From<NodeTicket> for NodeAddr

§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

-
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
§

impl Hash for NodeAddr

§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

Source§

fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

Converts to this type from the input type.
Source§

impl From<NodeAddr> for NodeData

Source§

fn from(node_addr: NodeAddr) -> NodeData

Converts to this type from the input type.
Source§

impl From<NodeAddr> for NodeInfo

Source§

fn from(addr: NodeAddr) -> NodeInfo

Converts to this type from the input type.
Source§

impl From<NodeInfo> for NodeAddr

Source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
Source§

impl From<NodeTicket> for NodeAddr

Source§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

+
Source§

impl From<PublicKey> for NodeAddr

Source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
Source§

impl Hash for NodeAddr

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for NodeAddr

§

fn cmp(&self, other: &NodeAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for NodeAddr

Source§

fn cmp(&self, other: &NodeAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for NodeAddr

§

fn eq(&self, other: &NodeAddr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
§

impl PartialOrd for NodeAddr

§

fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the + Self: Sized,
Restrict a value to a certain interval. Read more
Source§

impl PartialEq for NodeAddr

Source§

fn eq(&self, other: &NodeAddr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for NodeAddr

Source§

fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
§

impl Serialize for NodeAddr

§

fn serialize<__S>( +the >= operator. Read more

Source§

impl Serialize for NodeAddr

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for NodeAddr

§

impl StructuralPartialEq for NodeAddr

Auto Trait Implementations§

§

impl Freeze for NodeAddr

§

impl RefUnwindSafe for NodeAddr

§

impl Send for NodeAddr

§

impl Sync for NodeAddr

§

impl Unpin for NodeAddr

§

impl UnwindSafe for NodeAddr

Blanket Implementations§

Source§

impl<T> Any for T
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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3491/docs/iroh/struct.PublicKey.html b/pr/3491/docs/iroh/struct.PublicKey.html index 53910f7ad3..0740908a7b 100644 --- a/pr/3491/docs/iroh/struct.PublicKey.html +++ b/pr/3491/docs/iroh/struct.PublicKey.html @@ -1,18 +1,18 @@ -PublicKey in iroh - Rust

Struct PublicKey

pub struct PublicKey(/* private fields */);
Expand description

A public key.

+PublicKey in iroh - Rust

Struct PublicKey

Source
pub struct PublicKey(/* private fields */);
Expand description

A public key.

The key itself is stored as the CompressedEdwards y coordinate of the public key It is verified to decompress into a valid key when created.

-

Implementations§

§

impl PublicKey

pub const LENGTH: usize = 32usize

The length of an ed25519 PublicKey, in bytes.

-

pub fn as_bytes(&self) -> &[u8; 32]

Get this public key as a byte array.

-

pub fn public(&self) -> VerifyingKey

Returns the [VerifyingKey] for this PublicKey.

-

pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

Construct a PublicKey from a slice of bytes.

+

Implementations§

Source§

impl PublicKey

Source

pub const LENGTH: usize = 32usize

The length of an ed25519 PublicKey, in bytes.

+
Source

pub fn as_bytes(&self) -> &[u8; 32]

Get this public key as a byte array.

+
Source

pub fn public(&self) -> VerifyingKey

Returns the [VerifyingKey] for this PublicKey.

+
Source

pub 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.

+
Source

pub 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.

-

pub fn fmt_short(&self) -> impl Display + 'static

Convert to a hex string limited to the first 5 bytes for a friendly string +

Source

pub fn fmt_short(&self) -> impl Display + 'static

Convert to a hex string limited to the first 5 bytes for a friendly string representation of the key.

Methods from Deref<Target = [u8; 32]>§

Source

pub fn as_ascii(&self) -> Option<&[AsciiChar; N]>

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into an array of ASCII characters, or returns None if any of the characters is non-ASCII.

@@ -101,30 +101,30 @@ indices from [N - M, N) (excluding the index N itself) assert_eq!(left, &[]); assert_eq!(right, &[1, 2, 3, 4, 5, 6]); }
-

Trait Implementations§

§

impl AsRef<[u8]> for PublicKey

§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Borrow<[u8; 32]> for PublicKey

§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
§

impl Clone for PublicKey

§

fn clone(&self) -> PublicKey

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for PublicKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for PublicKey

§

type Target = [u8; 32]

The resulting type after dereferencing.
§

fn deref(&self) -> &<PublicKey as Deref>::Target

Dereferences the value.
§

impl<'de> Deserialize<'de> for PublicKey

§

fn deserialize<D>( +

Trait Implementations§

Source§

impl AsRef<[u8]> for PublicKey

Source§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<[u8; 32]> for PublicKey

Source§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
Source§

impl Clone for PublicKey

Source§

fn clone(&self) -> PublicKey

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PublicKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Deref for PublicKey

Source§

type Target = [u8; 32]

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<PublicKey as Deref>::Target

Dereferences the value.
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 Display for PublicKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<PublicKey> for NodeAddr

§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
§

impl From<VerifyingKey> for PublicKey

§

fn from(verifying_key: VerifyingKey) -> PublicKey

Converts to this type from the input type.
§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

+ D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for PublicKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<PublicKey> for NodeAddr

Source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
Source§

impl From<VerifyingKey> for PublicKey

Source§

fn from(verifying_key: VerifyingKey) -> PublicKey

Converts to this type from the input type.
Source§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

Display is capable of serialising this format.

-
§

type Err = KeyParsingError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for PublicKey

§

fn hash<H>(&self, state: &mut H)
where +
Source§

type Err = KeyParsingError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more

Source§

impl Hash for PublicKey

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl NodeIdExt for PublicKey

Source§

fn to_z32(&self) -> String

Encodes a NodeId in [z-base-32] encoding.
Source§

fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

Parses a NodeId from [z-base-32] encoding.
§

impl Ord for PublicKey

§

fn cmp(&self, other: &PublicKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl NodeIdExt for PublicKey

Source§

fn to_z32(&self) -> String

Encodes a NodeId in [z-base-32] encoding.
Source§

fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

Parses a NodeId from [z-base-32] encoding.
Source§

impl Ord for PublicKey

Source§

fn cmp(&self, other: &PublicKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for PublicKey

§

fn eq(&self, other: &PublicKey) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
§

impl PartialOrd for PublicKey

§

fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the + Self: Sized,
Restrict a value to a certain interval. Read more
Source§

impl PartialEq for PublicKey

Source§

fn eq(&self, other: &PublicKey) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for PublicKey

Source§

fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
§

impl Serialize for PublicKey

§

fn serialize<S>( +the >= operator. Read more

Source§

impl Serialize for PublicKey

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where - S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl TryFrom<&[u8]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( + S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<&[u8]> for PublicKey

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from( bytes: &[u8], -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

Performs the conversion.
§

impl TryFrom<&[u8; 32]> for PublicKey

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

Performs the conversion.
Source§

impl TryFrom<&[u8; 32]> for PublicKey

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from( bytes: &[u8; 32], -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
§

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<T> Any for T
where +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3491/docs/iroh/struct.RelayUrl.html b/pr/3491/docs/iroh/struct.RelayUrl.html index 34ddd6599b..19199c2080 100644 --- a/pr/3491/docs/iroh/struct.RelayUrl.html +++ b/pr/3491/docs/iroh/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh - Rust

Struct RelayUrl

pub struct RelayUrl(/* private fields */);
Expand description

A URL identifying a relay server.

+RelayUrl in iroh - Rust

Struct RelayUrl

Source
pub struct RelayUrl(/* private fields */);
Expand description

A URL identifying a relay server.

It is cheaply clonable, as the underlying type is wrapped into an Arc. The main type under the hood though is Url, with a few custom tweaks:

    @@ -457,37 +457,37 @@ 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§

§

impl Clone for RelayUrl

§

fn clone(&self) -> RelayUrl

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RelayUrl

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for RelayUrl

Dereferences to the wrapped Url.

+

Trait Implementations§

Source§

impl Clone for RelayUrl

Source§

fn clone(&self) -> RelayUrl

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RelayUrl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Deref for RelayUrl

Dereferences to the wrapped Url.

Note that DerefMut is not implemented on purpose, so this type has more flexibility to change the inner later.

-
§

type Target = Url

The resulting type after dereferencing.
§

fn deref(&self) -> &<RelayUrl as Deref>::Target

Dereferences the value.
§

impl<'de> Deserialize<'de> for RelayUrl

§

fn deserialize<__D>( +

Source§

type Target = Url

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<RelayUrl as Deref>::Target

Dereferences the value.
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 Display for RelayUrl

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<RelayUrl> for RelayMap

Source§

fn from(value: RelayUrl) -> RelayMap

Creates a RelayMap from a RelayUrl.

+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for RelayUrl

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl From<RelayUrl> for RelayMap

Source§

fn from(value: RelayUrl) -> RelayMap

Creates a RelayMap from a RelayUrl.

The RelayNodes in the RelayMap will have the default QUIC address discovery ports.

-
Source§

impl From<RelayUrl> for RelayNode

Source§

fn from(value: RelayUrl) -> RelayNode

Converts to this type from the input type.
§

impl From<RelayUrl> for Url

§

fn from(value: RelayUrl) -> Url

Converts to this type from the input type.
§

impl From<Url> for RelayUrl

§

fn from(url: Url) -> RelayUrl

Converts to this type from the input type.
Source§

impl FromIterator<RelayUrl> for RelayMap

Source§

fn from_iter<T>(iter: T) -> RelayMap
where +

Source§

impl From<RelayUrl> for RelayNode

Source§

fn from(value: RelayUrl) -> RelayNode

Converts to this type from the input type.
Source§

impl From<RelayUrl> for Url

Source§

fn from(value: RelayUrl) -> Url

Converts to this type from the input type.
Source§

impl From<Url> for RelayUrl

Source§

fn from(url: Url) -> RelayUrl

Converts to this type from the input type.
Source§

impl FromIterator<RelayUrl> for RelayMap

Source§

fn from_iter<T>(iter: T) -> RelayMap
where T: IntoIterator<Item = RelayUrl>,

Creates a RelayMap from an iterator of RelayUrl.

The RelayNodes in the RelayMap will have the default QUIC address discovery ports.

-
§

impl FromStr for RelayUrl

Support for parsing strings directly.

+
Source§

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.

-
§

type Err = RelayUrlParseError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<RelayUrl, <RelayUrl as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for RelayUrl

§

fn hash<__H>(&self, state: &mut __H)
where +
Source§

type Err = RelayUrlParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<RelayUrl, <RelayUrl as FromStr>::Err>

Parses a string s to return a value of this type. Read more

Source§

impl Hash for RelayUrl

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for RelayUrl

§

fn cmp(&self, other: &RelayUrl) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for RelayUrl

Source§

fn cmp(&self, other: &RelayUrl) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for RelayUrl

§

fn eq(&self, other: &RelayUrl) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
§

impl PartialOrd for RelayUrl

§

fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the + Self: Sized,
Restrict a value to a certain interval. Read more
Source§

impl PartialEq for RelayUrl

Source§

fn eq(&self, other: &RelayUrl) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for RelayUrl

Source§

fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
§

impl Serialize for RelayUrl

§

fn serialize<__S>( +the >= operator. Read more

Source§

impl Serialize for RelayUrl

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for RelayUrl

§

impl StructuralPartialEq for RelayUrl

Auto Trait Implementations§

§

impl Freeze for RelayUrl

§

impl RefUnwindSafe for RelayUrl

§

impl Send for RelayUrl

§

impl Sync for RelayUrl

§

impl Unpin for RelayUrl

§

impl UnwindSafe for RelayUrl

Blanket Implementations§

Source§

impl<T> Any for T
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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3491/docs/iroh/struct.RelayUrlParseError.html b/pr/3491/docs/iroh/struct.RelayUrlParseError.html index a03d4b0829..0ffc0ac9dd 100644 --- a/pr/3491/docs/iroh/struct.RelayUrlParseError.html +++ b/pr/3491/docs/iroh/struct.RelayUrlParseError.html @@ -1,9 +1,9 @@ -RelayUrlParseError in iroh - Rust

Struct RelayUrlParseError

pub struct RelayUrlParseError { /* private fields */ }
Expand description

Can occur when parsing a string into a RelayUrl.

-

Trait Implementations§

§

impl Debug for RelayUrlParseError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for RelayUrlParseError

§

fn fmt( +RelayUrlParseError in iroh - Rust

Struct RelayUrlParseError

Source
pub struct RelayUrlParseError { /* private fields */ }
Expand description

Can occur when parsing a string into a RelayUrl.

+

Trait Implementations§

Source§

impl Debug for RelayUrlParseError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for RelayUrlParseError

Source§

fn fmt( &self, __snafu_display_formatter: &mut Formatter<'_>, -) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for RelayUrlParseError

§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
§

impl ErrorCompat for RelayUrlParseError

§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Error for RelayUrlParseError

Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for RelayUrlParseError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where diff --git a/pr/3491/docs/iroh/struct.SecretKey.html b/pr/3491/docs/iroh/struct.SecretKey.html index 05ed28d1d6..e248a4610e 100644 --- a/pr/3491/docs/iroh/struct.SecretKey.html +++ b/pr/3491/docs/iroh/struct.SecretKey.html @@ -1,23 +1,23 @@ -SecretKey in iroh - Rust

Struct SecretKey

pub struct SecretKey { /* private fields */ }
Expand description

A secret key.

-

Implementations§

§

impl SecretKey

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

-

pub fn generate<R>(csprng: &mut R) -> SecretKey
where +SecretKey in iroh - Rust

Struct SecretKey

Source
pub struct SecretKey { /* private fields */ }
Expand description

A secret key.

+

Implementations§

Source§

impl SecretKey

Source

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

+
Source

pub fn generate<R>(csprng: &mut R) -> SecretKey
where R: CryptoRng + ?Sized,

Generate a new SecretKey with a randomness generator.

// use the OsRng option for OS depedndent most secure RNG.
 let _key = iroh_base::SecretKey::generate(&mut rand::rng());
-

pub fn sign(&self, msg: &[u8]) -> Signature

Sign the given message and return a digital signature

-

pub fn to_bytes(&self) -> [u8; 32]

Convert this to the bytes representing the secret part. +

Source

pub fn sign(&self, msg: &[u8]) -> Signature

Sign the given message and return a digital signature

+
Source

pub fn to_bytes(&self) -> [u8; 32]

Convert this to the bytes representing the secret part. The public part can always be recovered.

-

pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

Create a secret key from its byte representation.

-

pub fn secret(&self) -> &SigningKey

Returns the [SigningKey] for this SecretKey.

-

Trait Implementations§

§

impl Clone for SecretKey

§

fn clone(&self) -> SecretKey

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SecretKey

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SecretKey

§

fn deserialize<D>( +

Source

pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

Create a secret key from its byte representation.

+
Source

pub fn secret(&self) -> &SigningKey

Returns the [SigningKey] for this SecretKey.

+

Trait Implementations§

Source§

impl Clone for SecretKey

Source§

fn clone(&self) -> SecretKey

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SecretKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
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 From<[u8; 32]> for SecretKey

§

fn from(value: [u8; 32]) -> SecretKey

Converts to this type from the input type.
§

impl From<SigningKey> for SecretKey

§

fn from(secret: SigningKey) -> SecretKey

Converts to this type from the input type.
§

impl FromStr for SecretKey

§

type Err = KeyParsingError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<SecretKey, <SecretKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Serialize for SecretKey

§

fn serialize<S>( + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Source§

impl From<[u8; 32]> for SecretKey

Source§

fn from(value: [u8; 32]) -> SecretKey

Converts to this type from the input type.
Source§

impl From<SigningKey> for SecretKey

Source§

fn from(secret: SigningKey) -> SecretKey

Converts to this type from the input type.
Source§

impl FromStr for SecretKey

Source§

type Err = KeyParsingError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<SecretKey, <SecretKey as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

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

§

type Error = Error

The type returned in the event of a conversion error.
§

fn try_from( + S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<&[u8]> for SecretKey

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from( bytes: &[u8], ) -> Result<SecretKey, <SecretKey as TryFrom<&[u8]>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for SecretKey

§

impl RefUnwindSafe for SecretKey

§

impl Send for SecretKey

§

impl Sync for SecretKey

§

impl Unpin for SecretKey

§

impl UnwindSafe for SecretKey

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/3491/docs/iroh/type.NodeId.html b/pr/3491/docs/iroh/type.NodeId.html index c107660e42..4d69a71fb8 100644 --- a/pr/3491/docs/iroh/type.NodeId.html +++ b/pr/3491/docs/iroh/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh - Rust

Type Alias NodeId

pub type NodeId = PublicKey;
Expand description

The identifier for a node in the (iroh) network.

+NodeId in iroh - Rust

Type Alias NodeId

Source
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/3491/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3491/docs/iroh_relay/client/struct.ClientBuilder.html index 8e7a5d8b2f..8133c5e844 100644 --- a/pr/3491/docs/iroh_relay/client/struct.ClientBuilder.html +++ b/pr/3491/docs/iroh_relay/client/struct.ClientBuilder.html @@ -1,7 +1,7 @@ ClientBuilder in iroh_relay::client - Rust

Struct ClientBuilder

Source
pub struct ClientBuilder { /* private fields */ }
Expand description

Build a Client.

Implementations§

Source§

impl ClientBuilder

Source

pub fn new( - url: impl Into<RelayUrl>, - secret_key: SecretKey, + url: impl Into<RelayUrl>, + secret_key: SecretKey, dns_resolver: DnsResolver, ) -> Self

Create a new ClientBuilder

Source

pub fn address_family_selector<S>(self, selector: S) -> Self
where diff --git a/pr/3491/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/3491/docs/iroh_relay/dns/struct.DnsResolver.html index 4194f57d1c..461652d290 100644 --- a/pr/3491/docs/iroh_relay/dns/struct.DnsResolver.html +++ b/pr/3491/docs/iroh_relay/dns/struct.DnsResolver.html @@ -73,9 +73,9 @@ at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in summary of all errors otherwise.

Source

pub async fn lookup_node_by_id( &self, - node_id: &NodeId, + node_id: &NodeId, origin: &str, -) -> Result<NodeInfo, LookupError>

Looks up node info by [NodeId] and origin domain name.

+) -> Result<NodeInfo, LookupError>

Looks up node info by NodeId and origin domain name.

To lookup nodes that published their node info to the DNS servers run by n0, pass N0_DNS_NODE_ORIGIN_PROD as origin.

Source

pub async fn lookup_node_by_domain_name( @@ -93,10 +93,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return summary of all errors otherwise.

Source

pub async fn lookup_node_by_id_staggered( &self, - node_id: &NodeId, + node_id: &NodeId, origin: &str, delays_ms: &[u64], -) -> Result<NodeInfo, StaggeredError<LookupError>>

Looks up node info by [NodeId] and origin domain name.

+) -> Result<NodeInfo, StaggeredError<LookupError>>

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/3491/docs/iroh_relay/index.html b/pr/3491/docs/iroh_relay/index.html index 9dd0d5205d..d5b305c8bf 100644 --- a/pr/3491/docs/iroh_relay/index.html +++ b/pr/3491/docs/iroh_relay/index.html @@ -25,6 +25,6 @@ Tailscale.

QAD support and expose metrics.

-

Re-exports§

pub use protos::relay::MAX_PACKET_SIZE;

Modules§

client
Exposes Client, which allows to establish connections to a relay server.
defaults
Default values used in the relay.
dnsNon-wasm_browser
DNS resolver
http
HTTP-specific constants for the relay server and client.
node_info
Support for handling DNS resource records for dialing by [NodeId].
protos
Protocols used by the iroh-relay
quic
Create a QUIC server that accepts connections +

Re-exports§

pub use protos::relay::MAX_PACKET_SIZE;

Modules§

client
Exposes Client, which allows to establish connections to a relay server.
defaults
Default values used in the relay.
dnsNon-wasm_browser
DNS resolver
http
HTTP-specific constants for the relay server and client.
node_info
Support for handling DNS resource records for dialing by NodeId.
protos
Protocols used by the iroh-relay
quic
Create a QUIC server that accepts connections for QUIC address discovery.
serverserver
A fully-fledged iroh-relay server over HTTP or HTTPS.

Structs§

PingTracker
Tracks pings on a single relay connection.
RelayMap
Configuration of all the relay servers that can be used.
RelayNode
Information on a specific relay server.
RelayQuicConfig
Configuration for speaking to the QUIC endpoint on the relay server to do QUIC address discovery.
\ No newline at end of file diff --git a/pr/3491/docs/iroh_relay/node_info/index.html b/pr/3491/docs/iroh_relay/node_info/index.html index d1636a860a..4dbacf4a4e 100644 --- a/pr/3491/docs/iroh_relay/node_info/index.html +++ b/pr/3491/docs/iroh_relay/node_info/index.html @@ -1,5 +1,5 @@ -iroh_relay::node_info - Rust

Module node_info

Source
Expand description

Support for handling DNS resource records for dialing by [NodeId].

-

Dialing by [NodeId] is supported by iroh nodes publishing Pkarr records to DNS +iroh_relay::node_info - Rust

Module node_info

Source
Expand description

Support for handling DNS resource records for dialing by NodeId.

+

Dialing by NodeId is supported by iroh nodes publishing Pkarr records to DNS servers or the Mainline DHT. This module supports creating and parsing these records.

DNS records are published under the following names:

_iroh.<z32-node-id>.<origin-domain> TXT

@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re

_iroh is the record name as defined by IROH_TXT_NAME.

  • -

    <z32-node-id> is the z-base-32 encoding of the [NodeId].

    +

    <z32-node-id> is the z-base-32 encoding of the NodeId.

  • <origin-domain> is the domain name of the publishing DNS server, @@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re in RFC1464. The following attributes are defined:

    • -

      relay=<url>: The home RelayUrl of this node.

      +

      relay=<url>: The home RelayUrl of this node.

    • addr=<addr> <addr>: A space-separated list of sockets addresses for this iroh node. Each address is an IPv4 or IPv6 address with a port.

    -
  • Structs§

    MaxLengthExceededError
    Error returned when an input value is too long for UserData.
    NodeData
    Data about a node that may be published to and resolved from discovery services.
    NodeInfo
    Information about a node that may be published to and resolved from discovery services.
    UserData
    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    Enums§

    DecodingError
    EncodingError
    ParseError

    Constants§

    IROH_TXT_NAME
    The DNS name for the iroh TXT record.

    Traits§

    NodeIdExt
    Extension methods for [NodeId] to encode to and decode from [z32], +

    Structs§

    MaxLengthExceededError
    Error returned when an input value is too long for UserData.
    NodeData
    Data about a node that may be published to and resolved from discovery services.
    NodeInfo
    Information about a node that may be published to and resolved from discovery services.
    UserData
    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    Enums§

    DecodingError
    EncodingError
    ParseError

    Constants§

    IROH_TXT_NAME
    The DNS name for the iroh TXT record.

    Traits§

    NodeIdExt
    Extension methods for NodeId to encode to and decode from [z32], which is the encoding used in [pkarr] domain names.
    \ No newline at end of file diff --git a/pr/3491/docs/iroh_relay/node_info/struct.NodeData.html b/pr/3491/docs/iroh_relay/node_info/struct.NodeData.html index d7408cef65..2ff4d05d51 100644 --- a/pr/3491/docs/iroh_relay/node_info/struct.NodeData.html +++ b/pr/3491/docs/iroh_relay/node_info/struct.NodeData.html @@ -1,20 +1,20 @@ NodeData in iroh_relay::node_info - Rust

    Struct NodeData

    Source
    pub struct NodeData { /* private fields */ }
    Expand description

    Data about a node that may be published to and resolved from discovery services.

    -

    This includes an optional [RelayUrl], a set of direct addresses, and the optional +

    This includes an optional RelayUrl, a set of direct addresses, and the optional UserData, a string that can be set by applications and is not parsed or used by iroh itself.

    -

    This struct does not include the node’s [NodeId], only the data about a certain -node. See NodeInfo for a struct that contains a [NodeId] with associated NodeData.

    +

    This struct does not include the node’s NodeId, only the data about a certain +node. See NodeInfo for a struct that contains a NodeId with associated NodeData.

    Implementations§

    Source§

    impl NodeData

    Source

    pub fn new( - relay_url: Option<RelayUrl>, + relay_url: Option<RelayUrl>, direct_addresses: BTreeSet<SocketAddr>, ) -> Self

    Creates a new NodeData with a relay URL and a set of direct addresses.

    -
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self

    Sets the relay URL and returns the updated node data.

    +
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self

    Sets the relay URL and returns the updated node data.

    Source

    pub fn with_direct_addresses( self, direct_addresses: BTreeSet<SocketAddr>, ) -> Self

    Sets the direct addresses and returns the updated node data.

    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> Self

    Sets the user-defined data and returns the updated node data.

    -
    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    +
    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    @@ -22,9 +22,9 @@ node. See IntoIterator<Item = SocketAddr>, )

    Adds direct addresses to the node data.

    -
    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    +
    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeData

    Source§

    fn clone(&self) -> NodeData

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for NodeData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for NodeData

    Source§

    fn default() -> NodeData

    Returns the “default value” for a type. Read more
    Source§

    impl From<NodeAddr> for NodeData

    Source§

    fn from(node_addr: NodeAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeData

    Source§

    fn eq(&self, other: &NodeData) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +

    Trait Implementations§

    Source§

    impl Clone for NodeData

    Source§

    fn clone(&self) -> NodeData

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for NodeData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for NodeData

    Source§

    fn default() -> NodeData

    Returns the “default value” for a type. Read more
    Source§

    impl From<NodeAddr> for NodeData

    Source§

    fn from(node_addr: NodeAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeData

    Source§

    fn eq(&self, other: &NodeData) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
    Source§

    impl Eq for NodeData

    Source§

    impl StructuralPartialEq for NodeData

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    Source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/3491/docs/iroh_relay/node_info/struct.NodeInfo.html b/pr/3491/docs/iroh_relay/node_info/struct.NodeInfo.html index d1c70d2b90..1222e2c782 100644 --- a/pr/3491/docs/iroh_relay/node_info/struct.NodeInfo.html +++ b/pr/3491/docs/iroh_relay/node_info/struct.NodeInfo.html @@ -1,20 +1,20 @@ NodeInfo in iroh_relay::node_info - Rust

    Struct NodeInfo

    Source
    pub struct NodeInfo {
    -    pub node_id: NodeId,
    +    pub node_id: NodeId,
         pub data: NodeData,
     }
    Expand description

    Information about a node that may be published to and resolved from discovery services.

    -

    This struct couples a [NodeId] with its associated NodeData.

    -

    Fields§

    §node_id: NodeId

    The [NodeId] of the node this is about.

    +

    This struct couples a NodeId with its associated NodeData.

    +

    Fields§

    §node_id: NodeId

    The NodeId of the node this is about.

    §data: NodeData

    The information published about the node.

    -

    Implementations§

    Source§

    impl NodeInfo

    Source

    pub fn new(node_id: NodeId) -> Self

    Creates a new NodeInfo with an empty NodeData.

    -
    Source

    pub fn from_parts(node_id: NodeId, data: NodeData) -> Self

    Creates a new NodeInfo from its parts.

    -
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self

    Sets the relay URL and returns the updated node info.

    +

    Implementations§

    Source§

    impl NodeInfo

    Source

    pub fn new(node_id: NodeId) -> Self

    Creates a new NodeInfo with an empty NodeData.

    +
    Source

    pub fn from_parts(node_id: NodeId, data: NodeData) -> Self

    Creates a new NodeInfo from its parts.

    +
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self

    Sets the relay URL and returns the updated node info.

    Source

    pub fn with_direct_addresses( self, direct_addresses: BTreeSet<SocketAddr>, ) -> Self

    Sets the direct addresses and returns the updated node info.

    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> Self

    Sets the user-defined data and returns the updated node info.

    -
    Source

    pub fn to_node_addr(&self) -> NodeAddr

    Converts into a [NodeAddr] by cloning the needed fields.

    -
    Source

    pub fn into_node_addr(self) -> NodeAddr

    Converts into a [NodeAddr] without cloning.

    +
    Source

    pub fn to_node_addr(&self) -> NodeAddr

    Converts into a NodeAddr by cloning the needed fields.

    +
    Source

    pub fn into_node_addr(self) -> NodeAddr

    Converts into a NodeAddr without cloning.

    Source

    pub fn from_txt_lookup( domain_name: String, lookup: impl Iterator<Item = TxtRecordData>, @@ -24,12 +24,12 @@ ) -> Result<Self, ParseError>

    Parses a NodeInfo from a [pkarr::SignedPacket].

    Source

    pub fn to_pkarr_signed_packet( &self, - secret_key: &SecretKey, + secret_key: &SecretKey, ttl: u32, ) -> Result<SignedPacket, EncodingError>

    Creates a [pkarr::SignedPacket].

    -

    This constructs a DNS packet and signs it with a [SecretKey].

    +

    This constructs a DNS packet and signs it with a SecretKey.

    Source

    pub fn to_txt_strings(&self) -> Vec<String>

    Converts into a list of {key}={value} strings.

    -

    Methods from Deref<Target = NodeData>§

    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    +

    Methods from Deref<Target = NodeData>§

    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    @@ -37,9 +37,9 @@ &mut self, addrs: impl IntoIterator<Item = SocketAddr>, )

    Adds direct addresses to the node data.

    -
    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    +
    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeInfo

    Source§

    fn clone(&self) -> NodeInfo

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for NodeInfo

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Deref for NodeInfo

    Source§

    type Target = NodeData

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    Source§

    impl DerefMut for NodeInfo

    Source§

    fn deref_mut(&mut self) -> &mut Self::Target

    Mutably dereferences the value.
    Source§

    impl From<NodeAddr> for NodeInfo

    Source§

    fn from(addr: NodeAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl From<NodeInfo> for NodeAddr

    Source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeInfo

    Source§

    fn eq(&self, other: &NodeInfo) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, +

    Trait Implementations§

    Source§

    impl Clone for NodeInfo

    Source§

    fn clone(&self) -> NodeInfo

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for NodeInfo

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Deref for NodeInfo

    Source§

    type Target = NodeData

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    Source§

    impl DerefMut for NodeInfo

    Source§

    fn deref_mut(&mut self) -> &mut Self::Target

    Mutably dereferences the value.
    Source§

    impl From<NodeAddr> for NodeInfo

    Source§

    fn from(addr: NodeAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl From<NodeInfo> for NodeAddr

    Source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeInfo

    Source§

    fn eq(&self, other: &NodeInfo) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
    Source§

    impl Eq for NodeInfo

    Source§

    impl StructuralPartialEq for NodeInfo

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    Source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/3491/docs/iroh_relay/node_info/trait.NodeIdExt.html b/pr/3491/docs/iroh_relay/node_info/trait.NodeIdExt.html index b3f095d994..b3969acf4e 100644 --- a/pr/3491/docs/iroh_relay/node_info/trait.NodeIdExt.html +++ b/pr/3491/docs/iroh_relay/node_info/trait.NodeIdExt.html @@ -1,9 +1,9 @@ NodeIdExt in iroh_relay::node_info - Rust

    Trait NodeIdExt

    Source
    pub trait NodeIdExt {
         // Required methods
         fn to_z32(&self) -> String;
    -    fn from_z32(s: &str) -> Result<NodeId, DecodingError>;
    -}
    Expand description

    Extension methods for [NodeId] to encode to and decode from [z32], + fn from_z32(s: &str) -> Result<NodeId, DecodingError>; +}

    Expand description

    Extension methods for NodeId to encode to and decode from [z32], which is the encoding used in [pkarr] domain names.

    -

    Required Methods§

    Source

    fn to_z32(&self) -> String

    Encodes a [NodeId] in [z-base-32] encoding.

    -
    Source

    fn from_z32(s: &str) -> Result<NodeId, DecodingError>

    Parses a [NodeId] from [z-base-32] encoding.

    -

    Dyn Compatibility§

    This trait is not dyn compatible.

    In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

    Implementations on Foreign Types§

    Source§

    impl NodeIdExt for NodeId

    Implementors§

    \ No newline at end of file +

    Required Methods§

    Source

    fn to_z32(&self) -> String

    Encodes a NodeId in [z-base-32] encoding.

    +
    Source

    fn from_z32(s: &str) -> Result<NodeId, DecodingError>

    Parses a NodeId from [z-base-32] encoding.

    +

    Dyn Compatibility§

    This trait is not dyn compatible.

    In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

    Implementations on Foreign Types§

    Source§

    impl NodeIdExt for NodeId

    Implementors§

    \ No newline at end of file diff --git a/pr/3491/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/3491/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html index 66caeabfe0..594eaa8058 100644 --- a/pr/3491/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html +++ b/pr/3491/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html @@ -2,7 +2,7 @@ Ping([u8; 8]), Pong([u8; 8]), Datagrams { - dst_node_id: NodeId, + dst_node_id: NodeId, datagrams: Datagrams, }, }
    Expand description

    Messages that clients send to relays.

    @@ -11,7 +11,7 @@ other side with a §

    Pong([u8; 8])

    Reply to a RelayToClientMsg::Ping from a server with the payload sent previously in the ping.

    §

    Datagrams

    Request from the client to relay datagrams to given remote node.

    -

    Fields

    §dst_node_id: NodeId

    The remote node to relay to.

    +

    Fields

    §dst_node_id: NodeId

    The remote node to relay to.

    §datagrams: Datagrams

    The datagrams and related metadata to relay.

    Trait Implementations§

    Source§

    impl Clone for ClientToRelayMsg

    Source§

    fn clone(&self) -> ClientToRelayMsg

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for ClientToRelayMsg

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl PartialEq for ClientToRelayMsg

    Source§

    fn eq(&self, other: &ClientToRelayMsg) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
    Source§

    impl Sink<ClientToRelayMsg> for Client

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( diff --git a/pr/3491/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/3491/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html index bb2867c7b3..ea4525f3c5 100644 --- a/pr/3491/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html +++ b/pr/3491/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html @@ -1,9 +1,9 @@ RelayToClientMsg in iroh_relay::protos::relay - Rust

    Enum RelayToClientMsg

    Source
    pub enum RelayToClientMsg {
         Datagrams {
    -        remote_node_id: NodeId,
    +        remote_node_id: NodeId,
             datagrams: Datagrams,
         },
    -    NodeGone(NodeId),
    +    NodeGone(NodeId),
         Health {
             problem: String,
         },
    @@ -15,9 +15,9 @@
         Pong([u8; 8]),
     }
    Expand description

    The messages that a relay sends to clients or the clients receive from the relay.

    Variants§

    §

    Datagrams

    Represents datagrams sent from relays (originally sent to them by another client).

    -

    Fields

    §remote_node_id: NodeId

    The [NodeId] of the original sender.

    +

    Fields

    §remote_node_id: NodeId

    The NodeId of the original sender.

    §datagrams: Datagrams

    The datagrams and related metadata.

    -
    §

    NodeGone(NodeId)

    Indicates that the client identified by the underlying public key had previously sent you a +

    §

    NodeGone(NodeId)

    Indicates that the client identified by the underlying public key had previously sent you a packet but has now disconnected from the relay.

    §

    Health

    A one-way message from relay to client, declaring the connection health state.

    Fields

    §problem: String

    If set, is a description of why the connection is unhealthy.

    diff --git a/pr/3491/docs/iroh_relay/server/enum.AccessConfig.html b/pr/3491/docs/iroh_relay/server/enum.AccessConfig.html index b3289fa763..2ff198317a 100644 --- a/pr/3491/docs/iroh_relay/server/enum.AccessConfig.html +++ b/pr/3491/docs/iroh_relay/server/enum.AccessConfig.html @@ -1,10 +1,10 @@ AccessConfig in iroh_relay::server - Rust

    Enum AccessConfig

    Source
    pub enum AccessConfig {
         Everyone,
    -    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>),
    +    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>),
     }
    Available on crate feature server only.
    Expand description

    Controls which nodes are allowed to use the relay.

    Variants§

    §

    Everyone

    Everyone

    -
    §

    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>)

    Only nodes for which the function returns Access::Allow.

    -

    Implementations§

    Source§

    impl AccessConfig

    Source

    pub async fn is_allowed(&self, node: NodeId) -> bool

    Is this node allowed?

    +
    §

    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>)

    Only nodes for which the function returns Access::Allow.

    +

    Implementations§

    Source§

    impl AccessConfig

    Source

    pub async fn is_allowed(&self, node: NodeId) -> bool

    Is this node allowed?

    Trait Implementations§

    Source§

    impl Debug for AccessConfig

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where T: 'static + ?Sized,

    Source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/3491/docs/iroh_relay/server/struct.Server.html b/pr/3491/docs/iroh_relay/server/struct.Server.html index 7ae78d71ca..fb84064009 100644 --- a/pr/3491/docs/iroh_relay/server/struct.Server.html +++ b/pr/3491/docs/iroh_relay/server/struct.Server.html @@ -17,9 +17,9 @@ case there is an error in the server before it is shut down.

    Source

    pub fn http_addr(&self) -> Option<SocketAddr>

    The socket address the HTTP server is listening on.

    Source

    pub fn quic_addr(&self) -> Option<SocketAddr>

    The socket address the QUIC server is listening on.

    Source

    pub fn certificates(&self) -> Option<Vec<CertificateDer<'static>>>

    The certificates chain if configured with manual TLS certificates.

    -
    Source

    pub fn https_url(&self) -> Option<RelayUrl>

    Available on crate feature test-utils only.

    Get the server’s https [RelayUrl].

    +
    Source

    pub fn https_url(&self) -> Option<RelayUrl>

    Available on crate feature test-utils only.

    Get the server’s https RelayUrl.

    This uses Self::https_addr so it’s mostly useful for local development.

    -
    Source

    pub fn http_url(&self) -> Option<RelayUrl>

    Available on crate feature test-utils only.

    Get the server’s http [RelayUrl].

    +
    Source

    pub fn http_url(&self) -> Option<RelayUrl>

    Available on crate feature test-utils only.

    Get the server’s http RelayUrl.

    This uses Self::http_addr so it’s mostly useful for local development.

    Source

    pub fn metrics(&self) -> &RelayMetrics

    Returns the metrics collected in the relay server.

    Trait Implementations§

    Source§

    impl Debug for Server

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Server

    §

    impl RefUnwindSafe for Server

    §

    impl Send for Server

    §

    impl Sync for Server

    §

    impl Unpin for Server

    §

    impl UnwindSafe for Server

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where diff --git a/pr/3491/docs/iroh_relay/struct.RelayMap.html b/pr/3491/docs/iroh_relay/struct.RelayMap.html index 7058ef5a85..095129f860 100644 --- a/pr/3491/docs/iroh_relay/struct.RelayMap.html +++ b/pr/3491/docs/iroh_relay/struct.RelayMap.html @@ -1,15 +1,15 @@ RelayMap in iroh_relay - Rust

    Struct RelayMap

    Source
    pub struct RelayMap { /* private fields */ }
    Expand description

    Configuration of all the relay servers that can be used.

    -

    Implementations§

    Source§

    impl RelayMap

    Source

    pub fn urls(&self) -> impl Iterator<Item = &RelayUrl>

    Returns the sorted relay URLs.

    +

    Implementations§

    Source§

    impl RelayMap

    Source

    pub fn urls(&self) -> impl Iterator<Item = &RelayUrl>

    Returns the sorted relay URLs.

    Source

    pub fn empty() -> Self

    Create an empty relay map.

    Source

    pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>

    Returns an Iterator over all known nodes.

    -
    Source

    pub fn contains_node(&self, url: &RelayUrl) -> bool

    Is this a known node?

    -
    Source

    pub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>

    Get the given node.

    +
    Source

    pub fn contains_node(&self, url: &RelayUrl) -> bool

    Is this a known node?

    +
    Source

    pub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>

    Get the given node.

    Source

    pub fn len(&self) -> usize

    How many nodes are known?

    Source

    pub fn is_empty(&self) -> bool

    Are there any nodes in this map?

    -

    Trait Implementations§

    Source§

    impl Clone for RelayMap

    Source§

    fn clone(&self) -> RelayMap

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for RelayMap

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RelayMap

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayMap

    Source§

    fn from(value: RelayUrl) -> Self

    Creates a RelayMap from a [RelayUrl].

    +

    Trait Implementations§

    Source§

    impl Clone for RelayMap

    Source§

    fn clone(&self) -> RelayMap

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for RelayMap

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RelayMap

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayMap

    Source§

    fn from(value: RelayUrl) -> Self

    Creates a RelayMap from a RelayUrl.

    The RelayNodes in the RelayMap will have the default QUIC address discovery ports.

    -
    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T: IntoIterator<Item = RelayNode>>(iter: T) -> Self

    Creates a value from an iterator. Read more
    Source§

    impl FromIterator<RelayUrl> for RelayMap

    Source§

    fn from_iter<T: IntoIterator<Item = RelayUrl>>(iter: T) -> Self

    Creates a RelayMap from an iterator of [RelayUrl].

    +
    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T: IntoIterator<Item = RelayNode>>(iter: T) -> Self

    Creates a value from an iterator. Read more
    Source§

    impl FromIterator<RelayUrl> for RelayMap

    Source§

    fn from_iter<T: IntoIterator<Item = RelayUrl>>(iter: T) -> Self

    Creates a RelayMap from an iterator of RelayUrl.

    The RelayNodes in the RelayMap will have the default QUIC address discovery ports.

    Source§

    impl PartialEq for RelayMap

    Source§

    fn eq(&self, other: &RelayMap) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, diff --git a/pr/3491/docs/iroh_relay/struct.RelayNode.html b/pr/3491/docs/iroh_relay/struct.RelayNode.html index d4607a666e..18eef561b8 100644 --- a/pr/3491/docs/iroh_relay/struct.RelayNode.html +++ b/pr/3491/docs/iroh_relay/struct.RelayNode.html @@ -1,14 +1,14 @@ RelayNode in iroh_relay - Rust

    Struct RelayNode

    Source
    pub struct RelayNode {
    -    pub url: RelayUrl,
    +    pub url: RelayUrl,
         pub quic: Option<RelayQuicConfig>,
     }
    Expand description

    Information on a specific relay server.

    Includes the Url where it can be dialed.

    -

    Fields§

    §url: RelayUrl

    The [RelayUrl] where this relay server can be dialed.

    +

    Fields§

    §url: RelayUrl

    The RelayUrl where this relay server can be dialed.

    §quic: Option<RelayQuicConfig>

    Configuration to speak to the QUIC endpoint on the relay server.

    When None, we will not attempt to do QUIC address discovery with this relay server.

    Trait Implementations§

    Source§

    impl Clone for RelayNode

    Source§

    fn clone(&self) -> RelayNode

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for RelayNode

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayNode

    Source§

    fn from(value: RelayUrl) -> Self

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T: IntoIterator<Item = RelayNode>>(iter: T) -> Self

    Creates a value from an iterator. Read more
    Source§

    impl Ord for RelayNode

    Source§

    fn cmp(&self, other: &RelayNode) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayNode

    Source§

    fn from(value: RelayUrl) -> Self

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T: IntoIterator<Item = RelayNode>>(iter: T) -> Self

    Creates a value from an iterator. Read more
    Source§

    impl Ord for RelayNode

    Source§

    fn cmp(&self, other: &RelayNode) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayNode

    Source§

    fn eq(&self, other: &RelayNode) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient, diff --git a/pr/3491/docs/trait.impl/core/convert/trait.From.js b/pr/3491/docs/trait.impl/core/convert/trait.From.js index a83a0d9d12..0ab33d9df3 100644 --- a/pr/3491/docs/trait.impl/core/convert/trait.From.js +++ b/pr/3491/docs/trait.impl/core/convert/trait.From.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl From<PkarrError> for DiscoveryError"],["impl From<AddNodeAddrError> for ConnectWithOptsError"],["impl From<ConnectWithOptsError> for ConnectError"],["impl From<ConnectionError> for AlpnError"],["impl From<ConnectionError> for ConnectError"],["impl From<ConnectionError> for AcceptError"],["impl From<Box<dyn Error + Send + Sync>> for AcceptError"],["impl From<Error> for AcceptError"],["impl From<DiscoveryItem> for NodeInfo"],["impl From<ClosedStream> for AcceptError"],["impl From<RemoteNodeIdError> for AcceptError"],["impl<T> From<T> for ConcurrentDiscovery
    where\n T: IntoIterator<Item = Box<dyn Discovery>>,
    "],["impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>"]]],["iroh_base",[["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["impl From<Url> for RelayUrl"],["impl From<NodeAddr> for NodeTicket"],["impl From<PublicKey> for NodeAddr"],["impl From<RelayUrl> for Url"],["impl From<NodeTicket> for NodeAddr"],["impl From<DecodeError> for KeyParsingError"],["impl From<DecodeError> for ParseError"],["impl From<Error> for KeyParsingError"],["impl From<Error> for ParseError"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<DialError> for ConnectError"],["impl From<DnsError> for DialError"],["impl From<DecodingError> for ParseError"],["impl From<FrameType> for u32"],["impl From<FrameType> for VarInt"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Vec<Box<[u8]>>> for TxtRecordData"],["impl From<Error> for DialError"],["impl From<NodeInfo> for NodeAddr"],["impl From<RelayNode> for RelayMap"],["impl From<ConnectError> for Error"],["impl From<ConnectionError> for Error"],["impl From<Elapsed> for DialError"],["impl From<Elapsed> for DnsError"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<JoinError> for SupervisorError"],["impl From<NodeAddr> for NodeData"],["impl From<NodeAddr> for NodeInfo"],["impl From<RecvError> for Error"],["impl From<RelayUrl> for RelayMap"],["impl From<RelayUrl> for RelayNode"],["impl From<ResolveError> for DnsError"],["impl From<SignedPacketBuildError> for EncodingError"],["impl<T: AsRef<[u8]>> From<T> for Datagrams"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl From<PkarrError> for DiscoveryError"],["impl From<AddNodeAddrError> for ConnectWithOptsError"],["impl From<ConnectWithOptsError> for ConnectError"],["impl From<ConnectionError> for AlpnError"],["impl From<ConnectionError> for ConnectError"],["impl From<ConnectionError> for AcceptError"],["impl From<Box<dyn Error + Send + Sync>> for AcceptError"],["impl From<Error> for AcceptError"],["impl From<DiscoveryItem> for NodeInfo"],["impl From<ClosedStream> for AcceptError"],["impl From<RemoteNodeIdError> for AcceptError"],["impl<T> From<T> for ConcurrentDiscovery
    where\n T: IntoIterator<Item = Box<dyn Discovery>>,
    "],["impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>"]]],["iroh_base",[["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["impl From<Url> for RelayUrl"],["impl From<NodeAddr> for NodeTicket"],["impl From<PublicKey> for NodeAddr"],["impl From<RelayUrl> for Url"],["impl From<NodeTicket> for NodeAddr"],["impl From<DecodeError> for KeyParsingError"],["impl From<DecodeError> for ParseError"],["impl From<Error> for KeyParsingError"],["impl From<Error> for ParseError"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<DialError> for ConnectError"],["impl From<DnsError> for DialError"],["impl From<DecodingError> for ParseError"],["impl From<FrameType> for u32"],["impl From<FrameType> for VarInt"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Vec<Box<[u8]>>> for TxtRecordData"],["impl From<Error> for DialError"],["impl From<NodeAddr> for NodeData"],["impl From<NodeAddr> for NodeInfo"],["impl From<RelayUrl> for RelayMap"],["impl From<RelayUrl> for RelayNode"],["impl From<NodeInfo> for NodeAddr"],["impl From<RelayNode> for RelayMap"],["impl From<ConnectError> for Error"],["impl From<ConnectionError> for Error"],["impl From<Elapsed> for DialError"],["impl From<Elapsed> for DnsError"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<JoinError> for SupervisorError"],["impl From<RecvError> for Error"],["impl From<ResolveError> for DnsError"],["impl From<SignedPacketBuildError> for EncodingError"],["impl<T: AsRef<[u8]>> From<T> for Datagrams"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[6459,4938,10893]} \ No newline at end of file +//{"start":57,"fragment_lengths":[6459,4938,11503]} \ No newline at end of file diff --git a/pr/3491/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/pr/3491/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js index bdc1bf6fa3..8c038d8a54 100644 --- a/pr/3491/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js +++ b/pr/3491/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh_relay",[["impl FromIterator<Box<[u8]>> for TxtRecordData"],["impl FromIterator<RelayNode> for RelayMap"],["impl FromIterator<RelayUrl> for RelayMap"]]]]); + var implementors = Object.fromEntries([["iroh_relay",[["impl FromIterator<Box<[u8]>> for TxtRecordData"],["impl FromIterator<RelayUrl> for RelayMap"],["impl FromIterator<RelayNode> for RelayMap"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[1356]} \ No newline at end of file +//{"start":57,"fragment_lengths":[1478]} \ No newline at end of file diff --git a/pr/3491/docs/type.impl/iroh/struct.PublicKey.js b/pr/3491/docs/type.impl/iroh/struct.PublicKey.js index 1ce01933e1..b2a9a8cc23 100644 --- a/pr/3491/docs/type.impl/iroh/struct.PublicKey.js +++ b/pr/3491/docs/type.impl/iroh/struct.PublicKey.js @@ -1,9 +1,9 @@ (function() { - var type_impls = Object.fromEntries([["iroh",[["
    §

    impl AsRef<[u8]> for PublicKey

    §

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[u8]>","iroh::NodeId"],["
    §

    impl Borrow<[u8; 32]> for PublicKey

    §

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    ","Borrow<[u8; 32]>","iroh::NodeId"],["
    §

    impl Clone for PublicKey

    §

    fn clone(&self) -> PublicKey

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    ","Clone","iroh::NodeId"],["
    §

    impl Debug for PublicKey

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Debug","iroh::NodeId"],["
    §

    impl Deref for PublicKey

    §

    type Target = [u8; 32]

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<PublicKey as Deref>::Target

    Dereferences the value.
    ","Deref","iroh::NodeId"],["
    §

    impl<'de> Deserialize<'de> for PublicKey

    §

    fn deserialize<D>(\n deserializer: D,\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh::NodeId"],["
    §

    impl Display for PublicKey

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Display","iroh::NodeId"],["
    §

    impl From<VerifyingKey> for PublicKey

    §

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    ","From","iroh::NodeId"],["
    §

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    §

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    §

    fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh::NodeId"],["
    §

    impl Hash for PublicKey

    §

    fn hash<H>(&self, state: &mut H)
    where\n H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh::NodeId"],["
    Source§

    impl NodeIdExt for PublicKey

    Source§

    fn to_z32(&self) -> String

    Encodes a NodeId in [z-base-32] encoding.
    Source§

    fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

    Parses a NodeId from [z-base-32] encoding.
    ","NodeIdExt","iroh::NodeId"],["
    §

    impl Ord for PublicKey

    §

    fn cmp(&self, other: &PublicKey) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where\n Self: Sized,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh::NodeId"],["
    §

    impl PartialEq for PublicKey

    §

    fn eq(&self, other: &PublicKey) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
    ","PartialEq","iroh::NodeId"],["
    §

    impl PartialOrd for PublicKey

    §

    fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the >\noperator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
    ","PartialOrd","iroh::NodeId"],["
    §

    impl PublicKey

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    \n

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    \n

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    \n

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    \n
    §Warning
    \n

    This will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

    \n

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    \n
    §Return
    \n

    Returns Ok(()) if the signature is valid, and Err otherwise.

    \n

    pub fn fmt_short(&self) -> impl Display + 'static

    Convert to a hex string limited to the first 5 bytes for a friendly string\nrepresentation of the key.

    \n
    ",0,"iroh::NodeId"],["
    §

    impl Serialize for PublicKey

    §

    fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh::NodeId"],["
    §

    impl TryFrom<&[u8]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from(\n bytes: &[u8],\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8]>","iroh::NodeId"],["
    §

    impl TryFrom<&[u8; 32]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from(\n bytes: &[u8; 32],\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8; 32]>","iroh::NodeId"],["
    §

    impl Copy for PublicKey

    ","Copy","iroh::NodeId"],["
    §

    impl Eq for PublicKey

    ","Eq","iroh::NodeId"],["
    §

    impl StructuralPartialEq for PublicKey

    ","StructuralPartialEq","iroh::NodeId"]]]]); + var type_impls = Object.fromEntries([["iroh",[["
    Source§

    impl AsRef<[u8]> for PublicKey

    Source§

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[u8]>","iroh::NodeId"],["
    Source§

    impl Borrow<[u8; 32]> for PublicKey

    Source§

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    ","Borrow<[u8; 32]>","iroh::NodeId"],["
    Source§

    impl Clone for PublicKey

    Source§

    fn clone(&self) -> PublicKey

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    ","Clone","iroh::NodeId"],["
    Source§

    impl Debug for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Debug","iroh::NodeId"],["
    Source§

    impl Deref for PublicKey

    Source§

    type Target = [u8; 32]

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &<PublicKey as Deref>::Target

    Dereferences the value.
    ","Deref","iroh::NodeId"],["
    Source§

    impl<'de> Deserialize<'de> for PublicKey

    Source§

    fn deserialize<D>(\n deserializer: D,\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh::NodeId"],["
    Source§

    impl Display for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Display","iroh::NodeId"],["
    Source§

    impl From<VerifyingKey> for PublicKey

    Source§

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    ","From","iroh::NodeId"],["
    Source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh::NodeId"],["
    Source§

    impl Hash for PublicKey

    Source§

    fn hash<H>(&self, state: &mut H)
    where\n H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh::NodeId"],["
    Source§

    impl NodeIdExt for PublicKey

    Source§

    fn to_z32(&self) -> String

    Encodes a NodeId in [z-base-32] encoding.
    Source§

    fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

    Parses a NodeId from [z-base-32] encoding.
    ","NodeIdExt","iroh::NodeId"],["
    Source§

    impl Ord for PublicKey

    Source§

    fn cmp(&self, other: &PublicKey) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where\n Self: Sized,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh::NodeId"],["
    Source§

    impl PartialEq for PublicKey

    Source§

    fn eq(&self, other: &PublicKey) -> bool

    Tests for self and other values to be equal, and is used by ==.
    1.0.0 · Source§

    fn ne(&self, other: &Rhs) -> bool

    Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
    ","PartialEq","iroh::NodeId"],["
    Source§

    impl PartialOrd for PublicKey

    Source§

    fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the >\noperator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
    ","PartialOrd","iroh::NodeId"],["
    Source§

    impl PublicKey

    Source

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    \n
    Source

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    \n
    Source

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    \n
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    \n
    §Warning
    \n

    This will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

    \n
    Source

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    \n
    §Return
    \n

    Returns Ok(()) if the signature is valid, and Err otherwise.

    \n
    Source

    pub fn fmt_short(&self) -> impl Display + 'static

    Convert to a hex string limited to the first 5 bytes for a friendly string\nrepresentation of the key.

    \n
    ",0,"iroh::NodeId"],["
    Source§

    impl Serialize for PublicKey

    Source§

    fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh::NodeId"],["
    Source§

    impl TryFrom<&[u8]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(\n bytes: &[u8],\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8]>","iroh::NodeId"],["
    Source§

    impl TryFrom<&[u8; 32]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(\n bytes: &[u8; 32],\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8; 32]>","iroh::NodeId"],["
    Source§

    impl Copy for PublicKey

    ","Copy","iroh::NodeId"],["
    Source§

    impl Eq for PublicKey

    ","Eq","iroh::NodeId"],["
    Source§

    impl StructuralPartialEq for PublicKey

    ","StructuralPartialEq","iroh::NodeId"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[46932]} \ No newline at end of file +//{"start":55,"fragment_lengths":[50412]} \ No newline at end of file