diff --git a/pr/3136/docs/help.html b/pr/3136/docs/help.html index d9178219d7..ae20f95c20 100644 --- a/pr/3136/docs/help.html +++ b/pr/3136/docs/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/pr/3136/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html b/pr/3136/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html index 42230fa6e5..33131bcd7c 100644 --- a/pr/3136/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html +++ b/pr/3136/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html @@ -1,4 +1,4 @@ -DEFAULT_RELAY_QUIC_PORT in iroh::defaults - Rust
iroh::defaults

Constant DEFAULT_RELAY_QUIC_PORT

Source
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16
Expand description

The default QUIC port used by the Relay server to accept QUIC connections +DEFAULT_RELAY_QUIC_PORT in iroh::defaults - Rust

iroh::defaults

Constant DEFAULT_RELAY_QUIC_PORT

pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16
Expand description

The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery

The port is “QUIC” typed on a phone keypad. The default QUIC port used by the Relay server to accept QUIC connections diff --git a/pr/3136/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html b/pr/3136/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html index 8af4a3d707..870a4819e2 100644 --- a/pr/3136/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html +++ b/pr/3136/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html @@ -1,4 +1,4 @@ -DEFAULT_STUN_PORT in iroh::defaults - Rust

iroh::defaults

Constant DEFAULT_STUN_PORT

Source
pub const DEFAULT_STUN_PORT: u16 = 3478; // 3_478u16
Expand description

The default STUN port used by the Relay server.

+DEFAULT_STUN_PORT in iroh::defaults - Rust
iroh::defaults

Constant DEFAULT_STUN_PORT

pub const DEFAULT_STUN_PORT: u16 = 3478; // 3_478u16
Expand description

The default STUN port used by the Relay server.

The STUN port as defined by RFC 8489 The default STUN port used by the Relay server.

diff --git a/pr/3136/docs/iroh/endpoint/struct.Endpoint.html b/pr/3136/docs/iroh/endpoint/struct.Endpoint.html index 49f72808e4..0cfacdd7d5 100644 --- a/pr/3136/docs/iroh/endpoint/struct.Endpoint.html +++ b/pr/3136/docs/iroh/endpoint/struct.Endpoint.html @@ -26,7 +26,7 @@ Note that this overrides the current list of ALPNs.

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

Connects to a remote Endpoint.

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

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

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

diff --git a/pr/3136/docs/iroh/enum.KeyParsingError.html b/pr/3136/docs/iroh/enum.KeyParsingError.html index 68863c08fc..04dcdd3274 100644 --- a/pr/3136/docs/iroh/enum.KeyParsingError.html +++ b/pr/3136/docs/iroh/enum.KeyParsingError.html @@ -1,4 +1,4 @@ -KeyParsingError in iroh - Rust
iroh

Enum KeyParsingError

Source
pub enum KeyParsingError {
+KeyParsingError in iroh - Rust
iroh

Enum KeyParsingError

pub enum KeyParsingError {
     Decode(DecodeError),
     Key(Error),
     DecodeInvalidLength,
@@ -6,7 +6,7 @@
 

Variants§

§

Decode(DecodeError)

Error when decoding.

§

Key(Error)

Error when decoding the public key.

§

DecodeInvalidLength

The encoded information had the wrong length.

-

Trait Implementations§

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, __formatter: &mut Formatter<'_>) -> Result<(), Error>

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

impl Error for KeyParsingError

Source§

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

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

fn description(&self) -> &str

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

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

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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 From<DecodeError> for KeyParsingError

Source§

fn from(source: DecodeError) -> KeyParsingError

Converts to this type from the input type.
Source§

impl From<Error> for KeyParsingError

Source§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

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(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for KeyParsingError

§

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

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

fn description(&self) -> &str

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

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

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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 From<DecodeError> for KeyParsingError

§

fn from(source: DecodeError) -> KeyParsingError

Converts to this type from the input type.
§

impl From<Error> for KeyParsingError

§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

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/3136/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3136/docs/iroh/metrics/struct.RelayMetrics.html index f752ee5b27..cad83dc4e3 100644 --- a/pr/3136/docs/iroh/metrics/struct.RelayMetrics.html +++ b/pr/3136/docs/iroh/metrics/struct.RelayMetrics.html @@ -1,4 +1,4 @@ -RelayMetrics in iroh::metrics - Rust
iroh::metrics

Struct RelayMetrics

Source
pub struct RelayMetrics {
Show 21 fields +RelayMetrics in iroh::metrics - Rust
iroh::metrics

Struct RelayMetrics

pub struct RelayMetrics {
Show 21 fields pub bytes_sent: Counter, pub bytes_recv: Counter, pub send_packets_sent: Counter, @@ -42,7 +42,7 @@
§unique_client_keys: Counter

Number of unique client keys per day

§websocket_accepts: Counter

Number of accepted websocket connections

§relay_accepts: Counter

Number of accepted ‘iroh derp http’ connection upgrades

-

Trait Implementations§

Source§

impl Clone for Metrics

Source§

fn clone(&self) -> Metrics

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 Metrics

Source§

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

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

impl Default for Metrics

Source§

fn default() -> Metrics

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

impl Iterable for Metrics

Source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
Source§

impl Metric for Metrics

Source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Available on crate feature metrics only.
Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where +

Trait Implementations§

§

impl Clone for Metrics

§

fn clone(&self) -> Metrics

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 Metrics

§

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

Formats the value using the given formatter. Read more
§

impl Default for Metrics

§

fn default() -> Metrics

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

impl Iterable for Metrics

§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a (dyn Any + 'static))>

Returns an iterator over the struct’s fields as tuples. Read more
§

impl Metric for Metrics

§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Available on crate feature metrics only.
Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

Available on crate feature metrics only.
Access to this metrics group to record a metric. Only records if this metric is registered in the global registry.
§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

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 diff --git a/pr/3136/docs/iroh/struct.NodeAddr.html b/pr/3136/docs/iroh/struct.NodeAddr.html index d7ef6b4809..71e16b3c3e 100644 --- a/pr/3136/docs/iroh/struct.NodeAddr.html +++ b/pr/3136/docs/iroh/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh - Rust
iroh

Struct NodeAddr

Source
pub struct NodeAddr {
+NodeAddr in iroh - Rust
iroh

Struct NodeAddr

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

Fields§

§node_id: 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§

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( +

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( self, addresses: impl IntoIterator<Item = SocketAddr>, ) -> NodeAddr

Adds the given direct addresses.

-
Source

pub fn from_parts( +

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.

-
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

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>( __deserializer: __D, ) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>
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<NodeInfo> for NodeAddr

Source§

fn from(value: NodeInfo) -> Self

Converts to this type from the input type.
Source§

impl From<NodeTicket> for NodeAddr

Source§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

-
Source§

impl From<PublicKey> for NodeAddr

Source§

fn from(node_id: PublicKey) -> NodeAddr

Converts to this type from the input type.
Source§

impl From<RemoteInfo> for NodeAddr

Source§

fn from(info: RemoteInfo) -> Self

Converts to this type from the input type.
Source§

impl Ord for NodeAddr

Source§

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 + __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<NodeInfo> for NodeAddr

Source§

fn from(value: NodeInfo) -> Self

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.
Source§

impl From<RemoteInfo> for NodeAddr

Source§

fn from(info: RemoteInfo) -> Self

Converts to this type from the input type.
§

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,

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 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 + 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 <= 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
Source§

impl Serialize for NodeAddr

Source§

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

§

impl Serialize for NodeAddr

§

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
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 + __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 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/3136/docs/iroh/struct.PublicKey.html b/pr/3136/docs/iroh/struct.PublicKey.html index 2ce8dd5752..9bac3034a6 100644 --- a/pr/3136/docs/iroh/struct.PublicKey.html +++ b/pr/3136/docs/iroh/struct.PublicKey.html @@ -1,43 +1,43 @@ -PublicKey in iroh - Rust
iroh

Struct PublicKey

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

A public key.

+PublicKey in iroh - Rust
iroh

Struct PublicKey

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§

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.

+

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.

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

-
Source

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

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

+

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.

-
Source

pub fn fmt_short(&self) -> String

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

pub fn fmt_short(&self) -> String

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

-

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<'de> Deserialize<'de> for PublicKey

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<'de> Deserialize<'de> for PublicKey

§

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

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

Display is capable of serialising this format.

-
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 +
§

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 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 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,

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

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,

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 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 + 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 <= 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
Source§

impl Serialize for PublicKey

Source§

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

§

impl Serialize for PublicKey

§

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
Source§

impl TryFrom<&[u8]> for PublicKey

Source§

type Error = Error

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

fn try_from( + 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( bytes: &[u8], -) -> 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( +) -> 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( bytes: &[u8; 32], -) -> 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 +) -> 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 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/3136/docs/iroh/struct.RelayMap.html b/pr/3136/docs/iroh/struct.RelayMap.html index 27347451b3..5d52efe8ed 100644 --- a/pr/3136/docs/iroh/struct.RelayMap.html +++ b/pr/3136/docs/iroh/struct.RelayMap.html @@ -1,26 +1,26 @@ -RelayMap in iroh - Rust
iroh

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.

-
Source

pub fn empty() -> RelayMap

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 len(&self) -> usize

How many nodes are known?

-
Source

pub fn is_empty(&self) -> bool

Are there any nodes in this map?

-
Source

pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap

Creates a new RelayMap with a single relay server configured.

+RelayMap in iroh - Rust
iroh

Struct RelayMap

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

Configuration of all the relay servers that can be used.

+

Implementations§

§

impl RelayMap

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

Returns the sorted relay URLs.

+

pub fn empty() -> RelayMap

Create an empty relay map.

+

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

Returns an Iterator over all known nodes.

+

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

Is this a known node?

+

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

Get the given node.

+

pub fn len(&self) -> usize

How many nodes are known?

+

pub fn is_empty(&self) -> bool

Are there any nodes in this map?

+

pub fn default_from_node(url: RelayUrl, stun_port: u16) -> RelayMap

Creates a new RelayMap with a single relay server configured.

Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6. If IP addresses are provided, no DNS lookup will be performed.

Sets the port to the default DEFAULT_RELAY_QUIC_PORT.

-
Source

pub fn from_url(url: RelayUrl) -> RelayMap

Returns a RelayMap from a RelayUrl.

+

pub fn from_url(url: RelayUrl) -> RelayMap

Returns a RelayMap from a RelayUrl.

This will use the default STUN port, the default QUIC port (as defined by the iroh-relay crate) and IP addresses resolved from the URL’s host name via DNS. relay nodes are specified at <../../docs/relay_nodes.md>

-
Source

pub fn from_nodes<I>( +

pub fn from_nodes<I>( value: impl IntoIterator<Item = I>, ) -> Result<RelayMap, Error>
where I: Into<Arc<RelayNode>>,

Constructs the RelayMap from an iterator of RelayNodes.

-

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<(), Error>

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

impl Display for RelayMap

Source§

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

Formats the value using the given formatter. Read more
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, -and should not be overridden without very good reason.
Source§

impl Eq for RelayMap

Source§

impl StructuralPartialEq for RelayMap

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for RelayMap

§

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
§

impl Debug for RelayMap

§

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

Formats the value using the given formatter. Read more
§

impl Display for RelayMap

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for RelayMap

§

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, +and should not be overridden without very good reason.
§

impl Eq for RelayMap

§

impl StructuralPartialEq for RelayMap

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 T: 'a,

§

fn implicit( diff --git a/pr/3136/docs/iroh/struct.RelayNode.html b/pr/3136/docs/iroh/struct.RelayNode.html index c6ebc698ab..390f60faea 100644 --- a/pr/3136/docs/iroh/struct.RelayNode.html +++ b/pr/3136/docs/iroh/struct.RelayNode.html @@ -1,8 +1,8 @@ -RelayNode in iroh - Rust
iroh

Struct RelayNode

Source
pub struct RelayNode {
+RelayNode in iroh - Rust
iroh

Struct RelayNode

pub struct RelayNode {
     pub url: RelayUrl,
     pub stun_only: bool,
     pub stun_port: u16,
-    pub quic: Option<RelayQuicConfig>,
+    pub quic: Option<RelayQuicConfig>,
 }
Expand description

Information on a specific relay server.

Includes the Url where it can be dialed.

Fields§

§url: RelayUrl

The RelayUrl where this relay server can be dialed.

@@ -11,24 +11,24 @@ functionality is used.

§stun_port: u16

The stun port of the relay server.

Setting this to 0 means the default STUN port is used.

-
§quic: Option<RelayQuicConfig>

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

+
§quic: Option<RelayQuicConfig>

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

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

-

Trait Implementations§

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<(), Error>

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

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

Trait Implementations§

§

impl Clone for RelayNode

§

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
§

impl Debug for RelayNode

§

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

Formats the value using the given formatter. Read more
§

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

§

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

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

impl Display for RelayNode

Source§

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

Formats the value using the given formatter. 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
§

impl Display for RelayNode

§

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

Formats the value using the given formatter. Read more
§

impl Ord for RelayNode

§

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, -and should not be overridden without very good reason.
Source§

impl PartialOrd for RelayNode

Source§

fn partial_cmp(&self, other: &RelayNode) -> 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

§

impl PartialEq for RelayNode

§

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, +and should not be overridden without very good reason.
§

impl PartialOrd for RelayNode

§

fn partial_cmp(&self, other: &RelayNode) -> 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
Source§

impl Serialize for RelayNode

Source§

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

§

impl Serialize for RelayNode

§

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
Source§

impl Eq for RelayNode

Source§

impl StructuralPartialEq for RelayNode

Auto Trait Implementations§

§

impl Freeze for RelayNode

§

impl RefUnwindSafe for RelayNode

§

impl Send for RelayNode

§

impl Sync for RelayNode

§

impl Unpin for RelayNode

§

impl UnwindSafe for RelayNode

Blanket Implementations§

Source§

impl<T> Any for T
where + __S: Serializer,

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

impl Eq for RelayNode

§

impl StructuralPartialEq for RelayNode

Auto Trait Implementations§

§

impl Freeze for RelayNode

§

impl RefUnwindSafe for RelayNode

§

impl Send for RelayNode

§

impl Sync for RelayNode

§

impl Unpin for RelayNode

§

impl UnwindSafe for RelayNode

Blanket Implementations§

Source§

impl<T> Any for 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/3136/docs/iroh/struct.RelayUrl.html b/pr/3136/docs/iroh/struct.RelayUrl.html index d01b529c91..6ceb7cb7cc 100644 --- a/pr/3136/docs/iroh/struct.RelayUrl.html +++ b/pr/3136/docs/iroh/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh - Rust
iroh

Struct RelayUrl

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

A URL identifying a relay server.

+RelayUrl in iroh - Rust
iroh

Struct RelayUrl

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

A URL identifying a relay server.

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

    @@ -444,30 +444,30 @@ or if Path::new_opt() returns None. (That is, if the percent-decoded path contains a NUL byte or, for a Windows path, is not UTF-8.)

    This method is only available if the std Cargo feature is enabled.

    -

Trait Implementations§

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.

+

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.

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

-
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

§

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>( __deserializer: __D, ) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>
where - __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 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 FromStr for RelayUrl

Support for parsing strings directly.

+ __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
§

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

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.

-
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 +
§

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 __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 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,

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,

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 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 + 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 <= 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
Source§

impl Serialize for RelayUrl

Source§

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

§

impl Serialize for RelayUrl

§

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
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 + __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 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/3136/docs/iroh/struct.RelayUrlParseError.html b/pr/3136/docs/iroh/struct.RelayUrlParseError.html index 3bd8f48d43..ee0e8f025b 100644 --- a/pr/3136/docs/iroh/struct.RelayUrlParseError.html +++ b/pr/3136/docs/iroh/struct.RelayUrlParseError.html @@ -1,5 +1,5 @@ -RelayUrlParseError in iroh - Rust
iroh

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, __formatter: &mut Formatter<'_>) -> Result<(), Error>

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

impl Error for RelayUrlParseError

Source§

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

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

fn description(&self) -> &str

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

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

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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 From<ParseError> for RelayUrlParseError

Source§

fn from(source: ParseError) -> RelayUrlParseError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +RelayUrlParseError in iroh - Rust
iroh

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(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for RelayUrlParseError

§

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

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

fn description(&self) -> &str

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

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

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
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 From<ParseError> for RelayUrlParseError

§

fn from(source: ParseError) -> RelayUrlParseError

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<'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/3136/docs/iroh/struct.SecretKey.html b/pr/3136/docs/iroh/struct.SecretKey.html index 1cb8127476..9e13773d3b 100644 --- a/pr/3136/docs/iroh/struct.SecretKey.html +++ b/pr/3136/docs/iroh/struct.SecretKey.html @@ -1,24 +1,24 @@ -SecretKey in iroh - Rust
iroh

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: R) -> SecretKey
where +SecretKey in iroh - Rust
iroh

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: R) -> SecretKey
where R: CryptoRngCore,

Generate a new SecretKey with a randomness generator.

// use the OsRng option for OS depedndent most secure RNG.
 let mut rng = rand::rngs::OsRng;
 let _key = iroh_base::SecretKey::generate(&mut rng);
-
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. +

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. The public part can always be recovered.

-
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

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>( deserializer: D, ) -> Result<SecretKey, <D as Deserializer<'de>>::Error>
where - D: Deserializer<'de>,

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

impl Display for SecretKey

Source§

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

Formats the value using the given formatter. 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

Deserialize this value from the given Serde deserializer. Read more

§

impl Display for SecretKey

§

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

Formats the value using the given formatter. 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>( &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
Source§

impl TryFrom<&[u8]> for SecretKey

Source§

type Error = Error

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

fn try_from( + 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( 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/3136/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3136/docs/iroh/test_utils/fn.run_relay_server.html index 0eda4f9b2a..e651b33678 100644 --- a/pr/3136/docs/iroh/test_utils/fn.run_relay_server.html +++ b/pr/3136/docs/iroh/test_utils/fn.run_relay_server.html @@ -1,4 +1,4 @@ -run_relay_server in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server

Source
pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server with STUN and QUIC enabled suitable for tests.

+run_relay_server in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server

Source
pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server with STUN and QUIC enabled suitable for tests.

The returned Url is the url of the relay server in the returned RelayMap. -When dropped, the returned Server does will stop running.

+When dropped, the returned [Server] does will stop running.

\ No newline at end of file diff --git a/pr/3136/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3136/docs/iroh/test_utils/fn.run_relay_server_with.html index 756b881c86..8dbd8350e3 100644 --- a/pr/3136/docs/iroh/test_utils/fn.run_relay_server_with.html +++ b/pr/3136/docs/iroh/test_utils/fn.run_relay_server_with.html @@ -1,9 +1,9 @@ run_relay_server_with in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server_with

Source
pub async fn run_relay_server_with(
-    stun: Option<StunConfig>,
+    stun: Option<StunConfig>,
     quic: bool,
-) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server.

+) -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server.

stun can be set to None to disable stun, or set to Some StunConfig, to enable stun on a specific socket.

-

If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.

+

If quic is set to true, it will make the appropriate [QuicConfig] from the generated tls certificates and run the quic server at a random free port.

The return value is similar to run_relay_server.

\ No newline at end of file diff --git a/pr/3136/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3136/docs/iroh/test_utils/fn.run_relay_server_with_stun.html index f4355f44dc..1a4e1b5156 100644 --- a/pr/3136/docs/iroh/test_utils/fn.run_relay_server_with_stun.html +++ b/pr/3136/docs/iroh/test_utils/fn.run_relay_server_with_stun.html @@ -1,4 +1,4 @@ -run_relay_server_with_stun in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server_with_stun

Source
pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server with STUN enabled suitable for tests.

+run_relay_server_with_stun in iroh::test_utils - Rust
iroh::test_utils

Function run_relay_server_with_stun

Source
pub async fn run_relay_server_with_stun() -> Result<(RelayMap, RelayUrl, Server)>
Available on crate feature test-utils only.
Expand description

Runs a relay server with STUN enabled suitable for tests.

The returned Url is the url of the relay server in the returned RelayMap. -When dropped, the returned Server does will stop running.

+When dropped, the returned [Server] does will stop running.

\ No newline at end of file diff --git a/pr/3136/docs/iroh/type.NodeId.html b/pr/3136/docs/iroh/type.NodeId.html index d75b405bd5..cc7d8dd663 100644 --- a/pr/3136/docs/iroh/type.NodeId.html +++ b/pr/3136/docs/iroh/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh - Rust
iroh

Type Alias NodeId

Source
pub type NodeId = PublicKey;
Expand description

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

+NodeId in iroh - Rust
iroh

Type Alias NodeId

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/3136/docs/iroh_bench/enum.EndpointSelector.html b/pr/3136/docs/iroh_bench/enum.EndpointSelector.html index b9ce7d12f0..11137013d5 100644 --- a/pr/3136/docs/iroh_bench/enum.EndpointSelector.html +++ b/pr/3136/docs/iroh_bench/enum.EndpointSelector.html @@ -1,7 +1,7 @@ EndpointSelector in iroh_bench - Rust
iroh_bench

Enum EndpointSelector

Source
pub enum EndpointSelector {
-    Iroh(Endpoint),
+    Iroh(Endpoint),
     Quinn(Endpoint),
-}

Variants§

§

Iroh(Endpoint)

§

Quinn(Endpoint)

Implementations§

Source§

impl EndpointSelector

Source

pub async fn close(self)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +}

Variants§

§

Iroh(Endpoint)

§

Quinn(Endpoint)

Implementations§

Source§

impl EndpointSelector

Source

pub async fn close(self)

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 T: 'a,

§

fn implicit( diff --git a/pr/3136/docs/iroh_bench/iroh/fn.connect_client.html b/pr/3136/docs/iroh_bench/iroh/fn.connect_client.html index ef5f185d26..fc94b14ed8 100644 --- a/pr/3136/docs/iroh_bench/iroh/fn.connect_client.html +++ b/pr/3136/docs/iroh_bench/iroh/fn.connect_client.html @@ -2,5 +2,5 @@ server_addr: NodeAddr, relay_url: Option<RelayUrl>, opt: Opt, -) -> Result<(Endpoint, Connection)>
Expand description

Create a client endpoint and client connection

+) -> Result<(Endpoint, Connection)>
Expand description

Create a client endpoint and client connection

\ No newline at end of file diff --git a/pr/3136/docs/iroh_bench/iroh/fn.server.html b/pr/3136/docs/iroh_bench/iroh/fn.server.html index ee85dd6d3a..106814961c 100644 --- a/pr/3136/docs/iroh_bench/iroh/fn.server.html +++ b/pr/3136/docs/iroh_bench/iroh/fn.server.html @@ -1,2 +1,2 @@ -server in iroh_bench::iroh - Rust
iroh_bench::iroh

Function server

Source
pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>
Expand description

Take the provided endpoint and run the server

+server in iroh_bench::iroh - Rust
iroh_bench::iroh

Function server

Source
pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>
Expand description

Take the provided endpoint and run the server

\ No newline at end of file diff --git a/pr/3136/docs/iroh_bench/iroh/fn.server_endpoint.html b/pr/3136/docs/iroh_bench/iroh/fn.server_endpoint.html index c21cdcbe3d..692a588fa0 100644 --- a/pr/3136/docs/iroh_bench/iroh/fn.server_endpoint.html +++ b/pr/3136/docs/iroh_bench/iroh/fn.server_endpoint.html @@ -2,5 +2,5 @@ rt: &Runtime, relay_url: &Option<RelayUrl>, opt: &Opt, -) -> (NodeAddr, Endpoint)
Expand description

Creates a server endpoint which runs on the given runtime

+) -> (NodeAddr, Endpoint)
Expand description

Creates a server endpoint which runs on the given runtime

\ No newline at end of file diff --git a/pr/3136/docs/iroh_net_report/struct.Client.html b/pr/3136/docs/iroh_net_report/struct.Client.html index f733465ed6..d4e9fe7755 100644 --- a/pr/3136/docs/iroh_net_report/struct.Client.html +++ b/pr/3136/docs/iroh_net_report/struct.Client.html @@ -16,7 +16,7 @@ stop running.

allows sending messages to the actor.

Source

pub async fn get_report( &mut self, - relay_map: RelayMap, + relay_map: RelayMap, stun_sock_v4: Option<Arc<UdpSocket>>, stun_sock_v6: Option<Arc<UdpSocket>>, quic_config: Option<QuicConfig>, @@ -38,14 +38,14 @@ using QUIC address discovery.

This will attempt to use all probe protocols.

Source

pub async fn get_report_with_opts( &mut self, - relay_map: RelayMap, + relay_map: RelayMap, opts: Options, ) -> Result<Arc<Report>>

Runs a net_report, returning the report.

It may not be called concurrently with itself, &mut self takes care of that.

Look at Options for the different configuration options.

Source

pub async fn get_report_channel( &mut self, - relay_map: RelayMap, + relay_map: RelayMap, opts: Options, ) -> Result<Receiver<Result<Arc<Report>>>>

Get report with channel

Look at Options for the different configuration options.

diff --git a/pr/3136/docs/iroh_net_report/struct.RelayLatencies.html b/pr/3136/docs/iroh_net_report/struct.RelayLatencies.html index 67b6e575f1..e42166b5a7 100644 --- a/pr/3136/docs/iroh_net_report/struct.RelayLatencies.html +++ b/pr/3136/docs/iroh_net_report/struct.RelayLatencies.html @@ -1,5 +1,5 @@ RelayLatencies in iroh_net_report - Rust
iroh_net_report

Struct RelayLatencies

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

Latencies per relay node.

-

Implementations§

Source§

impl RelayLatencies

Source

pub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_

Returns an iterator over all the relays and their latencies.

+

Implementations§

Source§

impl RelayLatencies

Source

pub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_

Returns an iterator over all the relays and their latencies.

Trait Implementations§

Source§

impl Clone for RelayLatencies

Source§

fn clone(&self) -> RelayLatencies

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 RelayLatencies

Source§

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

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

impl Default for RelayLatencies

Source§

fn default() -> RelayLatencies

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

impl PartialEq for RelayLatencies

Source§

fn eq(&self, other: &RelayLatencies) -> 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 RelayLatencies

Source§

impl StructuralPartialEq for RelayLatencies

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 diff --git a/pr/3136/docs/iroh_net_report/struct.Report.html b/pr/3136/docs/iroh_net_report/struct.Report.html index b42c378079..c6dbe22b6e 100644 --- a/pr/3136/docs/iroh_net_report/struct.Report.html +++ b/pr/3136/docs/iroh_net_report/struct.Report.html @@ -11,7 +11,7 @@ pub mapping_varies_by_dest_ipv6: Option<bool>, pub hair_pinning: Option<bool>, pub portmap_probe: Option<ProbeOutput>, - pub preferred_relay: Option<RelayUrl>, + pub preferred_relay: Option<RelayUrl>, pub relay_latency: RelayLatencies, pub relay_v4_latency: RelayLatencies, pub relay_v6_latency: RelayLatencies, @@ -35,7 +35,7 @@ detecting rather than using it. For now.

§hair_pinning: Option<bool>

Whether the router supports communicating between two local devices through the NATted public IP address (on IPv4).

§portmap_probe: Option<ProbeOutput>

Probe indicating the presence of port mapping protocols on the LAN.

-
§preferred_relay: Option<RelayUrl>

None for unknown

+
§preferred_relay: Option<RelayUrl>

None for unknown

§relay_latency: RelayLatencies

keyed by relay Url

§relay_v4_latency: RelayLatencies

keyed by relay Url

§relay_v6_latency: RelayLatencies

keyed by relay Url

diff --git a/pr/3136/docs/settings.html b/pr/3136/docs/settings.html index cb9c1523e7..99365f8fca 100644 --- a/pr/3136/docs/settings.html +++ b/pr/3136/docs/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/pr/3136/docs/type.impl/iroh/struct.PublicKey.js b/pr/3136/docs/type.impl/iroh/struct.PublicKey.js index 89216a167d..72178720b7 100644 --- a/pr/3136/docs/type.impl/iroh/struct.PublicKey.js +++ b/pr/3136/docs/type.impl/iroh/struct.PublicKey.js @@ -1,9 +1,9 @@ (function() { - 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<'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 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) -> String

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"]]]]); + 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<'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"],["
§

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) -> String

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"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[45511]} \ No newline at end of file +//{"start":55,"fragment_lengths":[42259]} \ No newline at end of file