diff --git a/pr/3028/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html b/pr/3028/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html index b788391a67..0ef6859c8e 100644 --- a/pr/3028/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html +++ b/pr/3028/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html @@ -1,4 +1,4 @@ -DEFAULT_RELAY_QUIC_PORT in iroh::defaults - Rust

Constant iroh::defaults::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 +DEFAULT_RELAY_QUIC_PORT in iroh::defaults - Rust

Constant iroh::defaults::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 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/3028/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html b/pr/3028/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html index 0a6d9cbf10..9f5722b707 100644 --- a/pr/3028/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html +++ b/pr/3028/docs/iroh/defaults/constant.DEFAULT_STUN_PORT.html @@ -1,4 +1,4 @@ -DEFAULT_STUN_PORT in iroh::defaults - Rust

Constant iroh::defaults::DEFAULT_STUN_PORT

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

Constant iroh::defaults::DEFAULT_STUN_PORT

source ·
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/3028/docs/iroh/endpoint/enum.AddrInfoOptions.html b/pr/3028/docs/iroh/endpoint/enum.AddrInfoOptions.html index 6a9c63b7fa..14cbcef57e 100644 --- a/pr/3028/docs/iroh/endpoint/enum.AddrInfoOptions.html +++ b/pr/3028/docs/iroh/endpoint/enum.AddrInfoOptions.html @@ -1,4 +1,4 @@ -AddrInfoOptions in iroh::endpoint - Rust

Enum iroh::endpoint::AddrInfoOptions

pub enum AddrInfoOptions {
+AddrInfoOptions in iroh::endpoint - Rust

Enum iroh::endpoint::AddrInfoOptions

source ·
pub enum AddrInfoOptions {
     Id,
     RelayAndAddresses,
     Relay,
@@ -9,18 +9,18 @@
 
§

RelayAndAddresses

Includes the Node ID and both the relay URL, and the direct addresses.

§

Relay

Includes the Node ID and the relay URL.

§

Addresses

Includes the Node ID and the direct addresses.

-

Trait Implementations§

§

impl Clone for AddrInfoOptions

§

fn clone(&self) -> AddrInfoOptions

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 AddrInfoOptions

§

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

Formats the value using the given formatter. Read more
§

impl Default for AddrInfoOptions

§

fn default() -> AddrInfoOptions

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

impl<'de> Deserialize<'de> for AddrInfoOptions

§

fn deserialize<__D>( +

Trait Implementations§

source§

impl Clone for AddrInfoOptions

source§

fn clone(&self) -> AddrInfoOptions

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 AddrInfoOptions

source§

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

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

impl Default for AddrInfoOptions

source§

fn default() -> AddrInfoOptions

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

impl<'de> Deserialize<'de> for AddrInfoOptions

source§

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

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

impl Display for AddrInfoOptions

§

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

Formats the value using the given formatter. Read more
§

impl FromStr for AddrInfoOptions

§

type Err = FromStrError

The associated error which can be returned from parsing.
§

fn from_str( + __D: Deserializer<'de>,

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

impl Display for AddrInfoOptions

source§

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

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

impl FromStr for AddrInfoOptions

§

type Err = FromStrError

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

fn from_str( src: &str -) -> Result<AddrInfoOptions, <AddrInfoOptions as FromStr>::Err>

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

impl PartialEq for AddrInfoOptions

§

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

This method tests for self and other values to be equal, and is used +) -> Result<AddrInfoOptions, <AddrInfoOptions as FromStr>::Err>
Parses a string s to return a value of this type. Read more
source§

impl PartialEq for AddrInfoOptions

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl Serialize for AddrInfoOptions

§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for AddrInfoOptions

source§

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

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

impl Copy for AddrInfoOptions

§

impl Eq for AddrInfoOptions

§

impl StructuralPartialEq for AddrInfoOptions

Auto Trait Implementations§

§

impl Freeze for AddrInfoOptions

§

impl RefUnwindSafe for AddrInfoOptions

§

impl Send for AddrInfoOptions

§

impl Sync for AddrInfoOptions

§

impl Unpin for AddrInfoOptions

§

impl UnwindSafe for AddrInfoOptions

Blanket Implementations§

source§

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

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

impl Copy for AddrInfoOptions

source§

impl Eq for AddrInfoOptions

source§

impl StructuralPartialEq for AddrInfoOptions

Auto Trait Implementations§

§

impl Freeze for AddrInfoOptions

§

impl RefUnwindSafe for AddrInfoOptions

§

impl Send for AddrInfoOptions

§

impl Sync for AddrInfoOptions

§

impl Unpin for AddrInfoOptions

§

impl UnwindSafe for AddrInfoOptions

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/3028/docs/iroh/endpoint/struct.AddrInfo.html b/pr/3028/docs/iroh/endpoint/struct.AddrInfo.html index 7de8534ee4..43c627bae0 100644 --- a/pr/3028/docs/iroh/endpoint/struct.AddrInfo.html +++ b/pr/3028/docs/iroh/endpoint/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh::endpoint - Rust

Struct iroh::endpoint::AddrInfo

pub struct AddrInfo {
+AddrInfo in iroh::endpoint - Rust

Struct iroh::endpoint::AddrInfo

source ·
pub struct AddrInfo {
     pub relay_url: Option<RelayUrl>,
     pub direct_addresses: BTreeSet<SocketAddr>,
 }
Expand description

Network paths to contact an iroh node.

@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to other node, see NodeAddr for details.

Fields§

§relay_url: Option<RelayUrl>

The node’s home relay url.

§direct_addresses: BTreeSet<SocketAddr>

Socket addresses where the peer might be reached directly.

-

Implementations§

§

impl AddrInfo

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

-

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+

Implementations§

source§

impl AddrInfo

source

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

+
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in ab AddrInfo received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-

Trait Implementations§

§

impl Clone for AddrInfo

§

fn clone(&self) -> AddrInfo

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 AddrInfo

§

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

Formats the value using the given formatter. Read more
§

impl Default for AddrInfo

§

fn default() -> AddrInfo

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

impl<'de> Deserialize<'de> for AddrInfo

§

fn deserialize<__D>( +

Trait Implementations§

source§

impl Clone for AddrInfo

source§

fn clone(&self) -> AddrInfo

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 AddrInfo

source§

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

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

impl Default for AddrInfo

source§

fn default() -> AddrInfo

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

impl<'de> Deserialize<'de> for AddrInfo

source§

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

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

impl From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> Self

Converts to this type from the input type.
§

impl Ord for AddrInfo

§

fn cmp(&self, other: &AddrInfo) -> 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 From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> Self

Converts to this type from the input type.
source§

impl Ord for AddrInfo

source§

fn cmp(&self, other: &AddrInfo) -> 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 + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for AddrInfo

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

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

impl PartialEq for AddrInfo

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl PartialOrd for AddrInfo

§

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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for AddrInfo

source§

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

This method 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

This method 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

This method 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

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

impl Serialize for AddrInfo

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for AddrInfo

source§

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

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

impl Eq for AddrInfo

§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

§

impl Freeze for AddrInfo

§

impl RefUnwindSafe for AddrInfo

§

impl Send for AddrInfo

§

impl Sync for AddrInfo

§

impl Unpin for AddrInfo

§

impl UnwindSafe for AddrInfo

Blanket Implementations§

source§

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

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

impl Eq for AddrInfo

source§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

§

impl Freeze for AddrInfo

§

impl RefUnwindSafe for AddrInfo

§

impl Send for AddrInfo

§

impl Sync for AddrInfo

§

impl Unpin for AddrInfo

§

impl UnwindSafe for AddrInfo

Blanket Implementations§

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/3028/docs/iroh/endpoint/struct.NodeAddr.html b/pr/3028/docs/iroh/endpoint/struct.NodeAddr.html index 58f6e1aa1c..41715d8d4a 100644 --- a/pr/3028/docs/iroh/endpoint/struct.NodeAddr.html +++ b/pr/3028/docs/iroh/endpoint/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh::endpoint - Rust

Struct iroh::endpoint::NodeAddr

pub struct NodeAddr {
+NodeAddr in iroh::endpoint - Rust

Struct iroh::endpoint::NodeAddr

source ·
pub struct NodeAddr {
     pub node_id: PublicKey,
     pub info: AddrInfo,
 }
Expand description

Network-level addressing information for an iroh node.

@@ -25,40 +25,40 @@ number of network-level addressing information. It is a generic addressing type whenever a connection to other nodes needs to be established.

Fields§

§node_id: PublicKey

The node’s identifier.

§info: AddrInfo

Addressing information to connect to Self::node_id.

-

Implementations§

§

impl NodeAddr

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

-

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

Adds a relay url to the node’s AddrInfo.

-

pub fn with_direct_addresses( +

Implementations§

source§

impl NodeAddr

source

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

+
source

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

Adds a relay url to the node’s AddrInfo.

+
source

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

Adds the given direct addresses to the peer’s AddrInfo.

-

pub fn from_parts( +

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 apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in a NodeAddr received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-

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

impl From<NodeAddr> for NodeTicket

§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

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

source§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for NodeAddr

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
source§

impl PartialEq for NodeAddr

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +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

This method 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

This method 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

This method 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

This method 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>( +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/3028/docs/iroh/enum.AddrInfoOptions.html b/pr/3028/docs/iroh/enum.AddrInfoOptions.html index 77a66eb53c..37f4b1cf34 100644 --- a/pr/3028/docs/iroh/enum.AddrInfoOptions.html +++ b/pr/3028/docs/iroh/enum.AddrInfoOptions.html @@ -1,4 +1,4 @@ -AddrInfoOptions in iroh - Rust

Enum iroh::AddrInfoOptions

pub enum AddrInfoOptions {
+AddrInfoOptions in iroh - Rust

Enum iroh::AddrInfoOptions

source ·
pub enum AddrInfoOptions {
     Id,
     RelayAndAddresses,
     Relay,
@@ -9,18 +9,18 @@
 
§

RelayAndAddresses

Includes the Node ID and both the relay URL, and the direct addresses.

§

Relay

Includes the Node ID and the relay URL.

§

Addresses

Includes the Node ID and the direct addresses.

-

Trait Implementations§

§

impl Clone for AddrInfoOptions

§

fn clone(&self) -> AddrInfoOptions

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 AddrInfoOptions

§

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

Formats the value using the given formatter. Read more
§

impl Default for AddrInfoOptions

§

fn default() -> AddrInfoOptions

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

impl<'de> Deserialize<'de> for AddrInfoOptions

§

fn deserialize<__D>( +

Trait Implementations§

source§

impl Clone for AddrInfoOptions

source§

fn clone(&self) -> AddrInfoOptions

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 AddrInfoOptions

source§

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

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

impl Default for AddrInfoOptions

source§

fn default() -> AddrInfoOptions

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

impl<'de> Deserialize<'de> for AddrInfoOptions

source§

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

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

impl Display for AddrInfoOptions

§

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

Formats the value using the given formatter. Read more
§

impl FromStr for AddrInfoOptions

§

type Err = FromStrError

The associated error which can be returned from parsing.
§

fn from_str( + __D: Deserializer<'de>,

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

impl Display for AddrInfoOptions

source§

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

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

impl FromStr for AddrInfoOptions

§

type Err = FromStrError

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

fn from_str( src: &str -) -> Result<AddrInfoOptions, <AddrInfoOptions as FromStr>::Err>

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

impl PartialEq for AddrInfoOptions

§

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

This method tests for self and other values to be equal, and is used +) -> Result<AddrInfoOptions, <AddrInfoOptions as FromStr>::Err>
Parses a string s to return a value of this type. Read more
source§

impl PartialEq for AddrInfoOptions

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl Serialize for AddrInfoOptions

§

fn serialize<__S>( +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for AddrInfoOptions

source§

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

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

impl Copy for AddrInfoOptions

§

impl Eq for AddrInfoOptions

§

impl StructuralPartialEq for AddrInfoOptions

Auto Trait Implementations§

§

impl Freeze for AddrInfoOptions

§

impl RefUnwindSafe for AddrInfoOptions

§

impl Send for AddrInfoOptions

§

impl Sync for AddrInfoOptions

§

impl Unpin for AddrInfoOptions

§

impl UnwindSafe for AddrInfoOptions

Blanket Implementations§

source§

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

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

impl Copy for AddrInfoOptions

source§

impl Eq for AddrInfoOptions

source§

impl StructuralPartialEq for AddrInfoOptions

Auto Trait Implementations§

§

impl Freeze for AddrInfoOptions

§

impl RefUnwindSafe for AddrInfoOptions

§

impl Send for AddrInfoOptions

§

impl Sync for AddrInfoOptions

§

impl Unpin for AddrInfoOptions

§

impl UnwindSafe for AddrInfoOptions

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/3028/docs/iroh/hash/enum.BlobFormat.html b/pr/3028/docs/iroh/hash/enum.BlobFormat.html index ce8940a112..6dd1dc05bc 100644 --- a/pr/3028/docs/iroh/hash/enum.BlobFormat.html +++ b/pr/3028/docs/iroh/hash/enum.BlobFormat.html @@ -1,30 +1,30 @@ -BlobFormat in iroh::hash - Rust

Enum iroh::hash::BlobFormat

pub enum BlobFormat {
+BlobFormat in iroh::hash - Rust

Enum iroh::hash::BlobFormat

source ·
pub enum BlobFormat {
     Raw,
     HashSeq,
 }
Expand description

A format identifier

Variants§

§

Raw

Raw blob

§

HashSeq

A sequence of BLAKE3 hashes

-

Implementations§

§

impl BlobFormat

pub const fn is_raw(&self) -> bool

Is raw format

-

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

-

Trait Implementations§

§

impl Clone for BlobFormat

§

fn clone(&self) -> BlobFormat

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

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

Performs copy-assignment from source. Read more
§

impl Debug for BlobFormat

§

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

Formats the value using the given formatter. Read more
§

impl Default for BlobFormat

§

fn default() -> BlobFormat

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

impl<'de> Deserialize<'de> for BlobFormat

§

fn deserialize<__D>( +

Implementations§

source§

impl BlobFormat

source

pub const fn is_raw(&self) -> bool

Is raw format

+
source

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

+

Trait Implementations§

source§

impl Clone for BlobFormat

source§

fn clone(&self) -> BlobFormat

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 BlobFormat

source§

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

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

impl Default for BlobFormat

source§

fn default() -> BlobFormat

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

impl<'de> Deserialize<'de> for BlobFormat

source§

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

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

impl Display for BlobFormat

§

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

Formats the value using the given formatter. Read more
§

impl Hash for BlobFormat

§

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

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

impl Display for BlobFormat

source§

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

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

impl Hash for BlobFormat

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 MaxSize for BlobFormat

§

const POSTCARD_MAX_SIZE: usize = 1usize

The maximum possible size that the serialization of this -type can have, in bytes.
§

impl Ord for BlobFormat

§

fn cmp(&self, other: &BlobFormat) -> 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 MaxSize for BlobFormat

source§

const POSTCARD_MAX_SIZE: usize = 1usize

The maximum possible size that the serialization of this +type can have, in bytes.
source§

impl Ord for BlobFormat

source§

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

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for BlobFormat

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

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

impl PartialEq for BlobFormat

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl PartialOrd for BlobFormat

§

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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for BlobFormat

source§

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

This method 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

This method 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

This method 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

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

impl Serialize for BlobFormat

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for BlobFormat

source§

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

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

impl Copy for BlobFormat

§

impl Eq for BlobFormat

§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

§

impl Freeze for BlobFormat

§

impl RefUnwindSafe for BlobFormat

§

impl Send for BlobFormat

§

impl Sync for BlobFormat

§

impl Unpin for BlobFormat

§

impl UnwindSafe for BlobFormat

Blanket Implementations§

source§

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

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

impl Copy for BlobFormat

source§

impl Eq for BlobFormat

source§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

§

impl Freeze for BlobFormat

§

impl RefUnwindSafe for BlobFormat

§

impl Send for BlobFormat

§

impl Sync for BlobFormat

§

impl Unpin for BlobFormat

§

impl UnwindSafe for BlobFormat

Blanket Implementations§

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/3028/docs/iroh/hash/index.html b/pr/3028/docs/iroh/hash/index.html index 08facf3957..45a816dc9a 100644 --- a/pr/3028/docs/iroh/hash/index.html +++ b/pr/3028/docs/iroh/hash/index.html @@ -1,2 +1,2 @@ -iroh::hash - Rust

Module iroh::hash

Expand description

The blake3 hash used in Iroh.

+iroh::hash - Rust

Module iroh::hash

source ·
Expand description

The blake3 hash used in Iroh.

Structs§

Enums§

\ No newline at end of file diff --git a/pr/3028/docs/iroh/hash/struct.Hash.html b/pr/3028/docs/iroh/hash/struct.Hash.html index 342eb3b8d9..831bcf7be2 100644 --- a/pr/3028/docs/iroh/hash/struct.Hash.html +++ b/pr/3028/docs/iroh/hash/struct.Hash.html @@ -1,36 +1,36 @@ -Hash in iroh::hash - Rust

Struct iroh::hash::Hash

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

Hash type used throughout.

-

Implementations§

§

impl Hash

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

-

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

-

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

Bytes of the hash.

-

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

-

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

-

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +Hash in iroh::hash - Rust

Struct iroh::hash::Hash

source ·
pub struct Hash(/* private fields */);
Expand description

Hash type used throughout.

+

Implementations§

source§

impl Hash

source

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

+
source

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

+
source

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

Bytes of the hash.

+
source

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

+
source

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

+
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string representation of the hash.

-

Trait Implementations§

§

impl AsRef<[u8]> for Hash

§

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

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

impl Borrow<[u8]> for Hash

§

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

Immutably borrows from an owned value. Read more
§

impl Borrow<[u8; 32]> for Hash

§

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

Immutably borrows from an owned value. Read more
§

impl Clone for Hash

§

fn clone(&self) -> Hash

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 Hash

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Hash

§

fn deserialize<D>( +

Trait Implementations§

source§

impl AsRef<[u8]> for Hash

source§

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

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

impl Borrow<[u8]> for Hash

source§

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

Immutably borrows from an owned value. Read more
source§

impl Borrow<[u8; 32]> for Hash

source§

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

Immutably borrows from an owned value. Read more
source§

impl Clone for Hash

source§

fn clone(&self) -> Hash

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 Hash

source§

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

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

impl<'de> Deserialize<'de> for Hash

source§

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

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

impl Display for Hash

§

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

Formats the value using the given formatter. Read more
§

impl From<&[u8; 32]> for Hash

§

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

Converts to this type from the input type.
§

impl From<[u8; 32]> for Hash

§

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

Converts to this type from the input type.
§

impl From<Hash> for [u8; 32]

§

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

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
§

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

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

impl Hash for Hash

§

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

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

impl Display for Hash

source§

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

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

impl From<&[u8; 32]> for Hash

source§

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

Converts to this type from the input type.
source§

impl From<[u8; 32]> for Hash

source§

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

Converts to this type from the input type.
source§

impl From<Hash> for [u8; 32]

source§

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

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

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

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

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

impl Hash for Hash

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 Key for Hash

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl MaxSize for Hash

§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this -type can have, in bytes.
§

impl Ord for Hash

§

fn cmp(&self, other: &Hash) -> 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 Key for Hash

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
source§

impl MaxSize for Hash

source§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this +type can have, in bytes.
source§

impl Ord for Hash

source§

fn cmp(&self, other: &Hash) -> 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 + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Hash

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

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

impl PartialEq for Hash

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl PartialOrd for Hash

§

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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Hash

source§

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

This method 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

This method 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

This method 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

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

impl Serialize for Hash

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for Hash

source§

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

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

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where + S: Serializer,

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

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where Hash: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

source§

fn as_bytes<'a, 'b>( value: &'a <Hash as Value>::SelfType<'b> ) -> <Hash as Value>::AsBytes<'a>
where 'b: 'a, - Hash: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for Hash

§

impl Eq for Hash

§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

impl<T> Any for T
where + Hash: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Copy for Hash

source§

impl Eq for Hash

source§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

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/3028/docs/iroh/hash/struct.HashAndFormat.html b/pr/3028/docs/iroh/hash/struct.HashAndFormat.html index 6c4c5aaf8b..55d219540e 100644 --- a/pr/3028/docs/iroh/hash/struct.HashAndFormat.html +++ b/pr/3028/docs/iroh/hash/struct.HashAndFormat.html @@ -1,37 +1,37 @@ -HashAndFormat in iroh::hash - Rust

Struct iroh::hash::HashAndFormat

pub struct HashAndFormat {
+HashAndFormat in iroh::hash - Rust

Struct iroh::hash::HashAndFormat

source ·
pub struct HashAndFormat {
     pub hash: Hash,
     pub format: BlobFormat,
 }
Expand description

A hash and format pair

Fields§

§hash: Hash

The hash

§format: BlobFormat

The format

-

Implementations§

§

impl HashAndFormat

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

-

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

-

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

-

Trait Implementations§

§

impl Clone for HashAndFormat

§

fn clone(&self) -> HashAndFormat

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

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

Performs copy-assignment from source. Read more
§

impl Debug for HashAndFormat

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for HashAndFormat

§

fn deserialize<D>( +

Implementations§

source§

impl HashAndFormat

source

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

+
source

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

+
source

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

+

Trait Implementations§

source§

impl Clone for HashAndFormat

source§

fn clone(&self) -> HashAndFormat

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for HashAndFormat

source§

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

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

impl<'de> Deserialize<'de> for HashAndFormat

source§

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

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

impl Display for HashAndFormat

§

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

Formats the value using the given formatter. Read more
§

impl FromStr for HashAndFormat

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Hash for HashAndFormat

§

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

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

impl Display for HashAndFormat

source§

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

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

impl FromStr for HashAndFormat

§

type Err = Error

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

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

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

impl Hash for HashAndFormat

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 MaxSize for HashAndFormat

§

const POSTCARD_MAX_SIZE: usize = 33usize

The maximum possible size that the serialization of this -type can have, in bytes.
§

impl Ord for HashAndFormat

§

fn cmp(&self, other: &HashAndFormat) -> 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 MaxSize for HashAndFormat

source§

const POSTCARD_MAX_SIZE: usize = 33usize

The maximum possible size that the serialization of this +type can have, in bytes.
source§

impl Ord for HashAndFormat

source§

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

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for HashAndFormat

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

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

impl PartialEq for HashAndFormat

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl PartialOrd for HashAndFormat

§

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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for HashAndFormat

source§

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

This method 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

This method 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

This method 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

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

impl Serialize for HashAndFormat

§

fn serialize<S>( +operator. Read more

source§

impl Serialize for HashAndFormat

source§

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

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

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>
where + S: Serializer,

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

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>
where HashAndFormat: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

source§

fn as_bytes<'a, 'b>( value: &'a <HashAndFormat as Value>::SelfType<'b> ) -> <HashAndFormat as Value>::AsBytes<'a>
where 'b: 'a, - HashAndFormat: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for HashAndFormat

§

impl Eq for HashAndFormat

§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

§

impl Freeze for HashAndFormat

§

impl RefUnwindSafe for HashAndFormat

§

impl Send for HashAndFormat

§

impl Sync for HashAndFormat

§

impl Unpin for HashAndFormat

§

impl UnwindSafe for HashAndFormat

Blanket Implementations§

source§

impl<T> Any for T
where + HashAndFormat: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Copy for HashAndFormat

source§

impl Eq for HashAndFormat

source§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

§

impl Freeze for HashAndFormat

§

impl RefUnwindSafe for HashAndFormat

§

impl Send for HashAndFormat

§

impl Sync for HashAndFormat

§

impl Unpin for HashAndFormat

§

impl UnwindSafe for HashAndFormat

Blanket Implementations§

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/3028/docs/iroh/index.html b/pr/3028/docs/iroh/index.html index 30210b79da..4dbadc2525 100644 --- a/pr/3028/docs/iroh/index.html +++ b/pr/3028/docs/iroh/index.html @@ -162,5 +162,5 @@ connecting using only the < Ok(()) }

Please see the examples directory for more nuanced examples.

-

Re-exports§

Modules§

\ No newline at end of file diff --git a/pr/3028/docs/iroh/key/enum.KeyParsingError.html b/pr/3028/docs/iroh/key/enum.KeyParsingError.html index 47778bcd3d..adc345c075 100644 --- a/pr/3028/docs/iroh/key/enum.KeyParsingError.html +++ b/pr/3028/docs/iroh/key/enum.KeyParsingError.html @@ -1,10 +1,10 @@ -KeyParsingError in iroh::key - Rust

Enum iroh::key::KeyParsingError

pub enum KeyParsingError {
-    Base32(HexOrBase32ParseError),
+KeyParsingError in iroh::key - Rust

Enum iroh::key::KeyParsingError

source ·
pub enum KeyParsingError {
+    Base32(HexOrBase32ParseError),
     Key(Error),
 }
Expand description

Error when deserialising a PublicKey or a SecretKey.

-

Variants§

§

Base32(HexOrBase32ParseError)

Error when decoding the base32.

+

Variants§

§

Base32(HexOrBase32ParseError)

Error when decoding the base32.

§

Key(Error)

Error when decoding the public key.

-

Trait Implementations§

§

impl Debug for KeyParsingError

§

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

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<Error> for KeyParsingError

§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.
§

impl From<HexOrBase32ParseError> for KeyParsingError

§

fn from(source: HexOrBase32ParseError) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

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

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<Error> for KeyParsingError

source§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.
source§

impl From<HexOrBase32ParseError> for KeyParsingError

source§

fn from(source: HexOrBase32ParseError) -> KeyParsingError

Converts to this type from the input type.

Auto Trait Implementations§

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/3028/docs/iroh/key/index.html b/pr/3028/docs/iroh/key/index.html index 6a78611c6d..92f9899f5a 100644 --- a/pr/3028/docs/iroh/key/index.html +++ b/pr/3028/docs/iroh/key/index.html @@ -1,2 +1,2 @@ -iroh::key - Rust

Module iroh::key

Expand description

Cryptographic key handling for iroh.

+iroh::key - Rust

Module iroh::key

source ·
Expand description

Cryptographic key handling for iroh.

Structs§

Enums§

Constants§

Type Aliases§

  • The identifier for a node in the (iroh) network.
\ No newline at end of file diff --git a/pr/3028/docs/iroh/key/struct.PublicKey.html b/pr/3028/docs/iroh/key/struct.PublicKey.html index 70211b9eec..cf7a51756f 100644 --- a/pr/3028/docs/iroh/key/struct.PublicKey.html +++ b/pr/3028/docs/iroh/key/struct.PublicKey.html @@ -1,45 +1,45 @@ -PublicKey in iroh::key - Rust

Struct iroh::key::PublicKey

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

A public key.

+PublicKey in iroh::key - Rust

Struct iroh::key::PublicKey

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

A public key.

The key itself is just a 32 byte array, but a key has associated crypto information that is cached for performance reasons.

The cache item will be refreshed every time a crypto operation is performed, or when a key is deserialised or created from a byte array.

Serialisation or creation from a byte array is cheap if the key is already in the cache, but expensive if it is not.

-

Implementations§

§

impl PublicKey

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

Get this public key as a byte array.

-

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

Construct a PublicKey from a slice of bytes.

+

Implementations§

source§

impl PublicKey

source

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

Get this public key as a byte array.

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

Convert to a base32 string limited to the first 10 bytes for a friendly string +

source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string representation of the key.

-

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

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

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

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
§

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for PublicKey

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
source§

impl PartialEq for PublicKey

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +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

This method 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

This method 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

This method 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

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

§

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

§

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§

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§

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/3028/docs/iroh/key/struct.SecretKey.html b/pr/3028/docs/iroh/key/struct.SecretKey.html index 24adb5f449..ad6d41889f 100644 --- a/pr/3028/docs/iroh/key/struct.SecretKey.html +++ b/pr/3028/docs/iroh/key/struct.SecretKey.html @@ -1,24 +1,24 @@ -SecretKey in iroh::key - Rust

Struct iroh::key::SecretKey

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

A secret key.

-

Implementations§

§

impl SecretKey

pub fn shared(&self, other: &PublicKey) -> SharedSecret

Returns the shared key for communication between this key and other.

-
§

impl SecretKey

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

-

pub fn generate() -> SecretKey

Generate a new SecretKey with the default randomness generator.

-

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

Struct iroh::key::SecretKey

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

A secret key.

+

Implementations§

source§

impl SecretKey

source

pub fn shared(&self, other: &PublicKey) -> SharedSecret

Returns the shared key for communication between this key and other.

+
source§

impl SecretKey

source

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

+
source

pub fn generate() -> SecretKey

Generate a new SecretKey with the default randomness generator.

+
source

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

Generate a new SecretKey with a randomness generator.

-

pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>

Serialise this key to OpenSSH format.

-

pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
where +

source

pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>

Serialise this key to OpenSSH format.

+
source

pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
where T: AsRef<[u8]>,

Deserialise this key from OpenSSH format.

-

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.

-

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.

+

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

§

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

§

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§

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/3028/docs/iroh/key/struct.SharedSecret.html b/pr/3028/docs/iroh/key/struct.SharedSecret.html index f87fcb80d6..71f82c4773 100644 --- a/pr/3028/docs/iroh/key/struct.SharedSecret.html +++ b/pr/3028/docs/iroh/key/struct.SharedSecret.html @@ -1,7 +1,7 @@ -SharedSecret in iroh::key - Rust

Struct iroh::key::SharedSecret

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

Shared Secret.

-

Implementations§

§

impl SharedSecret

pub fn seal(&self, buffer: &mut dyn Buffer)

Seals the provided cleartext.

-

pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), Error>

Opens the ciphertext, which must have been created using Self::seal, and places the clear text into the provided buffer.

-

Trait Implementations§

§

impl Debug for SharedSecret

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +SharedSecret in iroh::key - Rust

Struct iroh::key::SharedSecret

source ·
pub struct SharedSecret(/* private fields */);
Expand description

Shared Secret.

+

Implementations§

source§

impl SharedSecret

source

pub fn seal(&self, buffer: &mut dyn Buffer)

Seals the provided cleartext.

+
source

pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), Error>

Opens the ciphertext, which must have been created using Self::seal, and places the clear text into the provided buffer.

+

Trait Implementations§

source§

impl Debug for SharedSecret

source§

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

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

§

fn implicit( diff --git a/pr/3028/docs/iroh/key/type.NodeId.html b/pr/3028/docs/iroh/key/type.NodeId.html index 3d730836ff..d241140069 100644 --- a/pr/3028/docs/iroh/key/type.NodeId.html +++ b/pr/3028/docs/iroh/key/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh::key - Rust

Type Alias iroh::key::NodeId

pub type NodeId = PublicKey;
Expand description

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

+NodeId in iroh::key - Rust

Type Alias iroh::key::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/3028/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3028/docs/iroh/metrics/struct.RelayMetrics.html index 603358f59a..8cf034eec0 100644 --- a/pr/3028/docs/iroh/metrics/struct.RelayMetrics.html +++ b/pr/3028/docs/iroh/metrics/struct.RelayMetrics.html @@ -1,4 +1,4 @@ -RelayMetrics in iroh::metrics - Rust

Struct iroh::metrics::RelayMetrics

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

Struct iroh::metrics::RelayMetrics

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

Number of unique client keys per day

§websocket_accepts: Counter

Number of accepted websocket connections

§derp_accepts: Counter

Number of accepted ‘iroh derp http’ connection upgrades

-

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

Initializes this metric group.
§

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

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

Initializes this metric group.
§

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

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/3028/docs/iroh/struct.AddrInfo.html b/pr/3028/docs/iroh/struct.AddrInfo.html index 50f0b65575..7232cfd58a 100644 --- a/pr/3028/docs/iroh/struct.AddrInfo.html +++ b/pr/3028/docs/iroh/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh - Rust

Struct iroh::AddrInfo

pub struct AddrInfo {
+AddrInfo in iroh - Rust

Struct iroh::AddrInfo

source ·
pub struct AddrInfo {
     pub relay_url: Option<RelayUrl>,
     pub direct_addresses: BTreeSet<SocketAddr>,
 }
Expand description

Network paths to contact an iroh node.

@@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to other node, see NodeAddr for details.

Fields§

§relay_url: Option<RelayUrl>

The node’s home relay url.

§direct_addresses: BTreeSet<SocketAddr>

Socket addresses where the peer might be reached directly.

-

Implementations§

§

impl AddrInfo

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

-

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+

Implementations§

source§

impl AddrInfo

source

pub fn is_empty(&self) -> bool

Returns whether this addressing information is empty.

+
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in ab AddrInfo received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-

Trait Implementations§

§

impl Clone for AddrInfo

§

fn clone(&self) -> AddrInfo

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 AddrInfo

§

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

Formats the value using the given formatter. Read more
§

impl Default for AddrInfo

§

fn default() -> AddrInfo

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

impl<'de> Deserialize<'de> for AddrInfo

§

fn deserialize<__D>( +

Trait Implementations§

source§

impl Clone for AddrInfo

source§

fn clone(&self) -> AddrInfo

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 AddrInfo

source§

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

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

impl Default for AddrInfo

source§

fn default() -> AddrInfo

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

impl<'de> Deserialize<'de> for AddrInfo

source§

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

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

impl From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> Self

Converts to this type from the input type.
§

impl Ord for AddrInfo

§

fn cmp(&self, other: &AddrInfo) -> 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 From<NodeInfo> for AddrInfo

source§

fn from(value: NodeInfo) -> Self

Converts to this type from the input type.
source§

impl Ord for AddrInfo

source§

fn cmp(&self, other: &AddrInfo) -> 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 + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for AddrInfo

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

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

impl PartialEq for AddrInfo

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl PartialOrd for AddrInfo

§

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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for AddrInfo

source§

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

This method 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

This method 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

This method 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

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

impl Serialize for AddrInfo

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for AddrInfo

source§

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

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

impl Eq for AddrInfo

§

impl StructuralPartialEq for AddrInfo

Auto Trait Implementations§

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 AddrInfo

source§

impl StructuralPartialEq for AddrInfo

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/3028/docs/iroh/struct.NodeAddr.html b/pr/3028/docs/iroh/struct.NodeAddr.html index 6339ed03f5..9c5f02bbf0 100644 --- a/pr/3028/docs/iroh/struct.NodeAddr.html +++ b/pr/3028/docs/iroh/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh - Rust

Struct iroh::NodeAddr

pub struct NodeAddr {
+NodeAddr in iroh - Rust

Struct iroh::NodeAddr

source ·
pub struct NodeAddr {
     pub node_id: PublicKey,
     pub info: AddrInfo,
 }
Expand description

Network-level addressing information for an iroh node.

@@ -25,40 +25,40 @@ number of network-level addressing information. It is a generic addressing type whenever a connection to other nodes needs to be established.

Fields§

§node_id: PublicKey

The node’s identifier.

§info: AddrInfo

Addressing information to connect to Self::node_id.

-

Implementations§

§

impl NodeAddr

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

-

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

Adds a relay url to the node’s AddrInfo.

-

pub fn with_direct_addresses( +

Implementations§

source§

impl NodeAddr

source

pub fn new(node_id: PublicKey) -> NodeAddr

Creates a new NodeAddr with empty AddrInfo.

+
source

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

Adds a relay url to the node’s AddrInfo.

+
source

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

Adds the given direct addresses to the peer’s AddrInfo.

-

pub fn from_parts( +

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 apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

+
source

pub fn apply_options(&mut self, opts: AddrInfoOptions)

Applies the options to self.

This is used to more tightly control the information stored in a NodeAddr received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

-

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

impl From<NodeAddr> for NodeTicket

§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

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

source§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for NodeAddr

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more

source§

impl PartialEq for NodeAddr

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +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

This method 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

This method 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

This method 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

This method 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>( +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§

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§

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/3028/docs/iroh/struct.RelayMap.html b/pr/3028/docs/iroh/struct.RelayMap.html index c04112c1f1..2c354de2df 100644 --- a/pr/3028/docs/iroh/struct.RelayMap.html +++ b/pr/3028/docs/iroh/struct.RelayMap.html @@ -1,27 +1,27 @@ -RelayMap in iroh - Rust

Struct iroh::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.

+RelayMap in iroh - Rust

Struct iroh::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.

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

Sets the port to the default DEFAULT_RELAY_QUIC_PORT.

-

pub fn from_url(url: RelayUrl) -> RelayMap

Returns a RelayMap from a RelayUrl.

+
source

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>

-

pub fn from_nodes<I>( +

source

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§

§

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

This method tests for self and other values to be equal, and is used +

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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 +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 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/3028/docs/iroh/struct.RelayNode.html b/pr/3028/docs/iroh/struct.RelayNode.html index 023ac04bd5..be49be446c 100644 --- a/pr/3028/docs/iroh/struct.RelayNode.html +++ b/pr/3028/docs/iroh/struct.RelayNode.html @@ -1,8 +1,8 @@ -RelayNode in iroh - Rust

Struct iroh::RelayNode

pub struct RelayNode {
+RelayNode in iroh - Rust

Struct iroh::RelayNode

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

Information on a specific relay server.

Includes the Url where it can be dialed.

Fields§

§url: 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<QuicConfig>

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

+
§quic: Option<QuicConfig>

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

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

-

Trait Implementations§

§

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

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

source§

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

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

impl 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 + __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 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 + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for RelayNode

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more

source§

impl PartialEq for RelayNode

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +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

This method 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

This method 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

This method 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

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

impl Serialize for RelayNode

§

fn serialize<__S>( +operator. Read more

source§

impl Serialize for RelayNode

source§

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

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

impl Eq for RelayNode

§

impl StructuralPartialEq for RelayNode

Auto Trait Implementations§

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 RelayNode

source§

impl StructuralPartialEq for RelayNode

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/3028/docs/iroh/struct.RelayUrl.html b/pr/3028/docs/iroh/struct.RelayUrl.html index 3d9029556a..f5e27baa0c 100644 --- a/pr/3028/docs/iroh/struct.RelayUrl.html +++ b/pr/3028/docs/iroh/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh - Rust

Struct iroh::RelayUrl

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

A URL identifying a relay server.

+RelayUrl in iroh - Rust

Struct iroh::RelayUrl

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

A URL identifying a relay server.

This is but a wrapper around Url, with a few custom tweaks:

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

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

    -

Trait Implementations§

§

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

§

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
§

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.

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

If you need more control over the error first create a Url and use RelayUrl::from instead.

-
§

type Err = Error

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

type Err = Error

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for RelayUrl

§

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

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
source§

impl PartialEq for RelayUrl

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method 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

This method tests less than or equal to (for self and other) and is used by the <= +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

This method 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

This method 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

This method 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

This method 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>( +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§

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§

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/3028/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3028/docs/iroh/test_utils/fn.run_relay_server.html index 7588afe3e1..3bb9643cf0 100644 --- a/pr/3028/docs/iroh/test_utils/fn.run_relay_server.html +++ b/pr/3028/docs/iroh/test_utils/fn.run_relay_server.html @@ -1,4 +1,4 @@ -run_relay_server in iroh::test_utils - Rust

Function iroh::test_utils::run_relay_server

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

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

+run_relay_server in iroh::test_utils - Rust

Function iroh::test_utils::run_relay_server

source ·
pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server)>
Available on test or crate feature test-utils only.
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/3028/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3028/docs/iroh/test_utils/fn.run_relay_server_with.html index 1dc1294387..5feacf2e7f 100644 --- a/pr/3028/docs/iroh/test_utils/fn.run_relay_server_with.html +++ b/pr/3028/docs/iroh/test_utils/fn.run_relay_server_with.html @@ -1,9 +1,9 @@ run_relay_server_with in iroh::test_utils - Rust

Function iroh::test_utils::run_relay_server_with

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

Runs a relay server.

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

Runs a relay server.

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

-

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

+

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

The return value is similar to run_relay_server.

\ No newline at end of file diff --git a/pr/3028/docs/iroh/test_utils/fn.run_relay_server_with_stun.html b/pr/3028/docs/iroh/test_utils/fn.run_relay_server_with_stun.html index 9242266b9c..03e1e776b6 100644 --- a/pr/3028/docs/iroh/test_utils/fn.run_relay_server_with_stun.html +++ b/pr/3028/docs/iroh/test_utils/fn.run_relay_server_with_stun.html @@ -1,5 +1,5 @@ run_relay_server_with_stun in iroh::test_utils - Rust

Function iroh::test_utils::run_relay_server_with_stun

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

Runs a relay server with STUN enabled suitable for tests.

+) -> Result<(RelayMap, RelayUrl, Server)>
Available on test or crate feature test-utils only.
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/3028/docs/iroh/ticket/enum.Error.html b/pr/3028/docs/iroh/ticket/enum.Error.html index e26b87f1a6..112bcb43bf 100644 --- a/pr/3028/docs/iroh/ticket/enum.Error.html +++ b/pr/3028/docs/iroh/ticket/enum.Error.html @@ -1,4 +1,4 @@ -Error in iroh::ticket - Rust

Enum iroh::ticket::Error

pub enum Error {
+Error in iroh::ticket - Rust

Enum iroh::ticket::Error

source ·
pub enum Error {
     Kind {
         expected: &'static str,
     },
@@ -10,7 +10,7 @@
 

Fields

§expected: &'static str
§

Postcard(Error)

This looks like a ticket, but postcard deserialization failed.

§

Encoding(DecodeError)

This looks like a ticket, but base32 decoding failed.

§

Verify(&'static str)

Verification of the deserialized bytes failed.

-

Trait Implementations§

§

impl Debug for Error

§

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

Formats the value using the given formatter. Read more
§

impl Display for Error

§

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

Formats the value using the given formatter. Read more
§

impl Error for Error

§

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

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 Error

§

fn from(source: DecodeError) -> Error

Converts to this type from the input type.
§

impl From<Error> for Error

§

fn from(source: Error) -> Error

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Debug for Error

source§

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

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

impl Display for Error

source§

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

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

impl Error for Error

source§

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

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 Error

source§

fn from(source: DecodeError) -> Error

Converts to this type from the input type.
source§

impl From<Error> for Error

source§

fn from(source: Error) -> Error

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

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/3028/docs/iroh/ticket/index.html b/pr/3028/docs/iroh/ticket/index.html index 6742b89342..288da1d108 100644 --- a/pr/3028/docs/iroh/ticket/index.html +++ b/pr/3028/docs/iroh/ticket/index.html @@ -1 +1 @@ -iroh::ticket - Rust

Module iroh::ticket

Structs§

  • A token containing everything to get a file from the provider.
  • A token containing information for establishing a connection to a node.

Enums§

  • An error deserializing an iroh ticket.

Traits§

  • A ticket is a serializable object combining information required for an operation.
\ No newline at end of file +iroh::ticket - Rust

Module iroh::ticket

source ·

Structs§

  • A token containing everything to get a file from the provider.
  • A token containing information for establishing a connection to a node.

Enums§

  • An error deserializing an iroh ticket.

Traits§

  • A ticket is a serializable object combining information required for an operation.
\ No newline at end of file diff --git a/pr/3028/docs/iroh/ticket/struct.BlobTicket.html b/pr/3028/docs/iroh/ticket/struct.BlobTicket.html index 0fc4b041d6..c154fc13b7 100644 --- a/pr/3028/docs/iroh/ticket/struct.BlobTicket.html +++ b/pr/3028/docs/iroh/ticket/struct.BlobTicket.html @@ -1,25 +1,25 @@ -BlobTicket in iroh::ticket - Rust

Struct iroh::ticket::BlobTicket

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

A token containing everything to get a file from the provider.

+BlobTicket in iroh::ticket - Rust

Struct iroh::ticket::BlobTicket

source ·
pub struct BlobTicket { /* private fields */ }
Expand description

A token containing everything to get a file from the provider.

It is a single item which can be easily serialized and deserialized.

-

Implementations§

§

impl BlobTicket

pub fn new( +

Implementations§

source§

impl BlobTicket

source

pub fn new( node: NodeAddr, hash: Hash, format: BlobFormat ) -> Result<BlobTicket, Error>

Creates a new ticket.

-

pub fn hash(&self) -> Hash

The hash of the item this ticket can retrieve.

-

pub fn node_addr(&self) -> &NodeAddr

The NodeAddr of the provider for this ticket.

-

pub fn format(&self) -> BlobFormat

The BlobFormat for this ticket.

-

pub fn recursive(&self) -> bool

True if the ticket is for a collection and should retrieve all blobs in it.

-

pub fn into_parts(self) -> (NodeAddr, Hash, BlobFormat)

Get the contents of the ticket, consuming it.

-

Trait Implementations§

§

impl Clone for BlobTicket

§

fn clone(&self) -> BlobTicket

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

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

Performs copy-assignment from source. Read more
§

impl Debug for BlobTicket

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for BlobTicket

§

fn deserialize<D>( +

source

pub fn hash(&self) -> Hash

The hash of the item this ticket can retrieve.

+
source

pub fn node_addr(&self) -> &NodeAddr

The NodeAddr of the provider for this ticket.

+
source

pub fn format(&self) -> BlobFormat

The BlobFormat for this ticket.

+
source

pub fn recursive(&self) -> bool

True if the ticket is for a collection and should retrieve all blobs in it.

+
source

pub fn into_parts(self) -> (NodeAddr, Hash, BlobFormat)

Get the contents of the ticket, consuming it.

+

Trait Implementations§

source§

impl Clone for BlobTicket

source§

fn clone(&self) -> BlobTicket

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for BlobTicket

source§

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

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

impl<'de> Deserialize<'de> for BlobTicket

source§

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

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

impl Display for BlobTicket

§

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

Formats the value using the given formatter. Read more
§

impl FromStr for BlobTicket

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl PartialEq for BlobTicket

§

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

This method tests for self and other values to be equal, and is used + D: Deserializer<'de>,

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

impl Display for BlobTicket

source§

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

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

impl FromStr for BlobTicket

§

type Err = Error

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

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

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

impl PartialEq for BlobTicket

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl Serialize for BlobTicket

§

fn serialize<S>( +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for BlobTicket

source§

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

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

impl Ticket for BlobTicket

§

const KIND: &'static str = "blob"

String prefix describing the kind of iroh ticket. Read more
§

fn to_bytes(&self) -> Vec<u8> ⓘ

Serialize to bytes used in the base32 string representation.
§

fn from_bytes(bytes: &[u8]) -> Result<BlobTicket, Error>

Deserialize from the base32 string representation bytes.
§

fn serialize(&self) -> String

Serialize to string.
§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
§

impl Eq for BlobTicket

§

impl StructuralPartialEq for BlobTicket

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Ticket for BlobTicket

source§

const KIND: &'static str = "blob"

String prefix describing the kind of iroh ticket. Read more
source§

fn to_bytes(&self) -> Vec<u8> ⓘ

Serialize to bytes used in the base32 string representation.
source§

fn from_bytes(bytes: &[u8]) -> Result<BlobTicket, Error>

Deserialize from the base32 string representation bytes.
source§

fn serialize(&self) -> String

Serialize to string.
source§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
source§

impl Eq for BlobTicket

source§

impl StructuralPartialEq for BlobTicket

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/3028/docs/iroh/ticket/struct.NodeTicket.html b/pr/3028/docs/iroh/ticket/struct.NodeTicket.html index 2d24fbeac4..759f0ef737 100644 --- a/pr/3028/docs/iroh/ticket/struct.NodeTicket.html +++ b/pr/3028/docs/iroh/ticket/struct.NodeTicket.html @@ -1,4 +1,4 @@ -NodeTicket in iroh::ticket - Rust

Struct iroh::ticket::NodeTicket

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

A token containing information for establishing a connection to a node.

+NodeTicket in iroh::ticket - Rust

Struct iroh::ticket::NodeTicket

source ·
pub struct NodeTicket { /* private fields */ }
Expand description

A token containing information for establishing a connection to a node.

Contains

  • The NodeId of the node to connect to (a 32-byte ed25519 public key).
  • @@ -10,20 +10,20 @@ possible to do so.

    This NodeTicket is a single item which can be easily serialized and deserialized and implements the Ticket trait. The Display and FromStr traits can also be used to round-trip the ticket to string.

    -

Implementations§

§

impl NodeTicket

pub fn new(node: NodeAddr) -> NodeTicket

Creates a new ticket.

-

pub fn node_addr(&self) -> &NodeAddr

The NodeAddr of the provider for this ticket.

-

Trait Implementations§

§

impl Clone for NodeTicket

§

fn clone(&self) -> NodeTicket

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 NodeTicket

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for NodeTicket

§

fn deserialize<D>( +

Implementations§

source§

impl NodeTicket

source

pub fn new(node: NodeAddr) -> NodeTicket

Creates a new ticket.

+
source

pub fn node_addr(&self) -> &NodeAddr

The NodeAddr of the provider for this ticket.

+

Trait Implementations§

source§

impl Clone for NodeTicket

source§

fn clone(&self) -> NodeTicket

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 NodeTicket

source§

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

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

impl<'de> Deserialize<'de> for NodeTicket

source§

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

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

impl Display for NodeTicket

§

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

Formats the value using the given formatter. Read more
§

impl From<NodeAddr> for NodeTicket

§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

-
§

impl From<NodeTicket> for NodeAddr

§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

-
§

impl FromStr for NodeTicket

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl PartialEq for NodeTicket

§

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

This method tests for self and other values to be equal, and is used + D: Deserializer<'de>,

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

impl Display for NodeTicket

source§

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

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

impl From<NodeAddr> for NodeTicket

source§

fn from(addr: NodeAddr) -> NodeTicket

Creates a ticket from given addressing info.

+
source§

impl From<NodeTicket> for NodeAddr

source§

fn from(ticket: NodeTicket) -> NodeAddr

Returns the addressing info from given ticket.

+
source§

impl FromStr for NodeTicket

§

type Err = Error

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

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

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

impl PartialEq for NodeTicket

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl Serialize for NodeTicket

§

fn serialize<S>( +sufficient, and should not be overridden without very good reason.

source§

impl Serialize for NodeTicket

source§

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

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

impl Ticket for NodeTicket

§

const KIND: &'static str = "node"

String prefix describing the kind of iroh ticket. Read more
§

fn to_bytes(&self) -> Vec<u8> ⓘ

Serialize to bytes used in the base32 string representation.
§

fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>

Deserialize from the base32 string representation bytes.
§

fn serialize(&self) -> String

Serialize to string.
§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
§

impl Eq for NodeTicket

§

impl StructuralPartialEq for NodeTicket

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Ticket for NodeTicket

source§

const KIND: &'static str = "node"

String prefix describing the kind of iroh ticket. Read more
source§

fn to_bytes(&self) -> Vec<u8> ⓘ

Serialize to bytes used in the base32 string representation.
source§

fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>

Deserialize from the base32 string representation bytes.
source§

fn serialize(&self) -> String

Serialize to string.
source§

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.
source§

impl Eq for NodeTicket

source§

impl StructuralPartialEq for NodeTicket

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/3028/docs/iroh/ticket/trait.Ticket.html b/pr/3028/docs/iroh/ticket/trait.Ticket.html index 29a6b228c7..5e8769cc9e 100644 --- a/pr/3028/docs/iroh/ticket/trait.Ticket.html +++ b/pr/3028/docs/iroh/ticket/trait.Ticket.html @@ -1,4 +1,4 @@ -Ticket in iroh::ticket - Rust

Trait iroh::ticket::Ticket

pub trait Ticket: Sized {
+Ticket in iroh::ticket - Rust

Trait iroh::ticket::Ticket

source ·
pub trait Ticket: Sized {
     const KIND: &'static str;
 
     // Required methods
@@ -18,10 +18,10 @@ ticket will be prepended to the string to make it somewhat self describing.

versioning, others might not.

The serialization format for converting the ticket from and to bytes is left to the implementer. We recommend using postcard for serialization.

-

Required Associated Constants§

const KIND: &'static str

String prefix describing the kind of iroh ticket.

+

Required Associated Constants§

source

const KIND: &'static str

String prefix describing the kind of iroh ticket.

This should be lower case ascii characters.

-

Required Methods§

fn to_bytes(&self) -> Vec<u8> ⓘ

Serialize to bytes used in the base32 string representation.

-

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

Deserialize from the base32 string representation bytes.

-

Provided Methods§

fn serialize(&self) -> String

Serialize to string.

-

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.

-

Object Safety§

This trait is not object safe.

Implementors§

§

impl Ticket for BlobTicket

§

const KIND: &'static str = "blob"

§

impl Ticket for NodeTicket

§

const KIND: &'static str = "node"

\ No newline at end of file +

Required Methods§

source

fn to_bytes(&self) -> Vec<u8> ⓘ

Serialize to bytes used in the base32 string representation.

+
source

fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

Deserialize from the base32 string representation bytes.

+

Provided Methods§

source

fn serialize(&self) -> String

Serialize to string.

+
source

fn deserialize(str: &str) -> Result<Self, Error>

Deserialize from a string.

+

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Ticket for BlobTicket

source§

const KIND: &'static str = "blob"

source§

impl Ticket for NodeTicket

source§

const KIND: &'static str = "node"

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

Type Alias iroh::NodeId

pub type NodeId = PublicKey;
Expand description

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

+NodeId in iroh - Rust

Type Alias iroh::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/3028/docs/iroh_net_report/struct.Client.html b/pr/3028/docs/iroh_net_report/struct.Client.html index a38c9c1ff9..cae4815aae 100644 --- a/pr/3028/docs/iroh_net_report/struct.Client.html +++ b/pr/3028/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, - dm: RelayMap, + dm: RelayMap, stun_conn4: Option<Arc<UdpSocket>>, stun_conn6: Option<Arc<UdpSocket>>, quic_config: Option<QuicConfig> @@ -32,7 +32,7 @@ responses and function correctly.

may not be as reliable.

source

pub async fn get_report_channel( &mut self, - dm: RelayMap, + dm: RelayMap, stun_conn4: Option<Arc<UdpSocket>>, stun_conn6: Option<Arc<UdpSocket>>, quic_config: Option<QuicConfig> diff --git a/pr/3028/docs/iroh_net_report/struct.QuicConfig.html b/pr/3028/docs/iroh_net_report/struct.QuicConfig.html index b50ddbe24a..b1ee7bc176 100644 --- a/pr/3028/docs/iroh_net_report/struct.QuicConfig.html +++ b/pr/3028/docs/iroh_net_report/struct.QuicConfig.html @@ -1,10 +1,10 @@ -QuicConfig in iroh_net_report - Rust

Struct iroh_net_report::QuicConfig

source ·
pub struct QuicConfig {
+QuicConfig in iroh_net_report - Rust

Struct iroh_net_report::QuicConfig

source ·
pub struct QuicConfig {
     pub ep: Endpoint,
     pub client_config: ClientConfig,
 }
Expand description

Pieces needed to do QUIC address discovery.

Fields§

§ep: Endpoint

A QUIC Endpoint

§client_config: ClientConfig

A client config.

-

Trait Implementations§

source§

impl Clone for QuicConfig

source§

fn clone(&self) -> QuicConfig

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 QuicConfig

source§

fn fmt(&self, 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 +

Trait Implementations§

source§

impl Clone for QuicConfig

source§

fn clone(&self) -> QuicConfig

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 QuicConfig

source§

fn fmt(&self, 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 T: 'a,

§

fn implicit( diff --git a/pr/3028/docs/iroh_net_report/struct.RelayLatencies.html b/pr/3028/docs/iroh_net_report/struct.RelayLatencies.html index ddb55df920..9bad939f51 100644 --- a/pr/3028/docs/iroh_net_report/struct.RelayLatencies.html +++ b/pr/3028/docs/iroh_net_report/struct.RelayLatencies.html @@ -1,5 +1,5 @@ RelayLatencies in iroh_net_report - Rust

Struct iroh_net_report::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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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 diff --git a/pr/3028/docs/iroh_net_report/struct.Report.html b/pr/3028/docs/iroh_net_report/struct.Report.html index 5965312462..d8336c9cab 100644 --- a/pr/3028/docs/iroh_net_report/struct.Report.html +++ b/pr/3028/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/3028/docs/iroh_relay/server/testing/fn.quic_config.html b/pr/3028/docs/iroh_relay/server/testing/fn.quic_config.html index 0cb5b9f176..2dfdb042ac 100644 --- a/pr/3028/docs/iroh_relay/server/testing/fn.quic_config.html +++ b/pr/3028/docs/iroh_relay/server/testing/fn.quic_config.html @@ -1,6 +1,6 @@ quic_config in iroh_relay::server::testing - Rust

Function iroh_relay::server::testing::quic_config

source ·
pub fn quic_config() -> QuicConfig
Available on crate features server and test-utils only.
Expand description

Creates a QuicConfig suitable for testing.

    -
  • Binds to an OS assigned port on ipv6 and ipv4, if dual stack is enabled.
  • +
  • Binds to an OS assigned port on ipv4
  • Uses self_signed_tls_certs_and_config to create tls certificates
\ No newline at end of file diff --git a/pr/3028/docs/src/iroh_net_report/reportgen.rs.html b/pr/3028/docs/src/iroh_net_report/reportgen.rs.html index 7bb1f719e0..c9a0c58a4b 100644 --- a/pr/3028/docs/src/iroh_net_report/reportgen.rs.html +++ b/pr/3028/docs/src/iroh_net_report/reportgen.rs.html @@ -1595,6 +1595,7 @@ 1595 1596 1597 +1598

//! The reportgen actor is responsible for generating a single net_report report.
 //!
 //! It is implemented as an actor with [`Client`] as handle.
@@ -1669,7 +1670,8 @@
 }
 
 impl Client {
-    /// Creates a new actor generating a single report.
+    #[allow(clippy::too_many_arguments)]
+    /// Creates a new actor generating a single report.
     ///
     /// The actor starts running immediately and only generates a single report, after which
     /// it shuts down.  Dropping this handle will abort the actor.
@@ -2497,11 +2499,11 @@
     // TODO(ramfox): what to put here if no host is given?
     let host = url.host_str().unwrap_or("localhost");
     let quic_client = iroh_relay::quic::QuicClient::new(quic_config.ep, quic_config.client_config)
-        .map_err(|e| ProbeError::Error(e.into(), probe.clone()))?;
+        .map_err(|e| ProbeError::Error(e, probe.clone()))?;
     let (addr, latency) = quic_client
         .get_addr_and_latency(relay_addr, host)
         .await
-        .map_err(|e| ProbeError::Error(e.into(), probe.clone()))?;
+        .map_err(|e| ProbeError::Error(e, probe.clone()))?;
     let mut result = ProbeReport::new(probe.clone());
     if matches!(probe, Probe::QuicIpv4 { .. }) {
         result.ipv4_can_send = true;
diff --git a/pr/3028/docs/src/iroh_net_report/reportgen/probes.rs.html b/pr/3028/docs/src/iroh_net_report/reportgen/probes.rs.html
index 5b45f41a8f..8c10444546 100644
--- a/pr/3028/docs/src/iroh_net_report/reportgen/probes.rs.html
+++ b/pr/3028/docs/src/iroh_net_report/reportgen/probes.rs.html
@@ -875,6 +875,62 @@
 875
 876
 877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
 

//! The relay probes.
 //!
 //! All the probes try and establish the latency to the relay servers.  Preferably the STUN
@@ -1447,6 +1503,20 @@
                          Duration::from_millis(100),
                          Duration::from_millis(200)],
             },
+            probeset! {
+                proto: ProbeProto::QuicIpv4,
+                relay: relay_node_1.clone(),
+                delays: [Duration::ZERO,
+                         Duration::from_millis(100),
+                         Duration::from_millis(200)],
+            },
+            probeset! {
+                proto: ProbeProto::QuicIpv6,
+                relay: relay_node_1.clone(),
+                delays: [Duration::ZERO,
+                         Duration::from_millis(100),
+                         Duration::from_millis(200)],
+            },
             probeset! {
                 proto: ProbeProto::Https,
                 relay: relay_node_1.clone(),
@@ -1482,6 +1552,20 @@
                          Duration::from_millis(100),
                          Duration::from_millis(200)],
             },
+            probeset! {
+                proto: ProbeProto::QuicIpv4,
+                relay: relay_node_2.clone(),
+                delays: [Duration::ZERO,
+                         Duration::from_millis(100),
+                         Duration::from_millis(200)],
+            },
+            probeset! {
+                proto: ProbeProto::QuicIpv6,
+                relay: relay_node_2.clone(),
+                delays: [Duration::ZERO,
+                         Duration::from_millis(100),
+                         Duration::from_millis(200)],
+            },
             probeset! {
                 proto: ProbeProto::Https,
                 relay: relay_node_2.clone(),
@@ -1569,6 +1653,22 @@
                              Duration::from_micros(104_800),
                              Duration::from_micros(157_200)],
                 },
+                probeset! {
+                    proto: ProbeProto::QuicIpv4,
+                    relay: relay_node_1.clone(),
+                    delays: [Duration::ZERO,
+                             Duration::from_micros(52_400),
+                             Duration::from_micros(104_800),
+                             Duration::from_micros(157_200)],
+                },
+                probeset! {
+                    proto: ProbeProto::QuicIpv6,
+                    relay: relay_node_1.clone(),
+                    delays: [Duration::ZERO,
+                             Duration::from_micros(52_400),
+                             Duration::from_micros(104_800),
+                             Duration::from_micros(157_200)],
+                },
                 probeset! {
                     proto: ProbeProto::Https,
                     relay: relay_node_1.clone(),
@@ -1605,6 +1705,18 @@
                     delays: [Duration::ZERO,
                              Duration::from_micros(52_400)],
                 },
+                probeset! {
+                    proto: ProbeProto::QuicIpv4,
+                    relay: relay_node_2.clone(),
+                    delays: [Duration::ZERO,
+                             Duration::from_micros(52_400)],
+                },
+                probeset! {
+                    proto: ProbeProto::QuicIpv6,
+                    relay: relay_node_2.clone(),
+                    delays: [Duration::ZERO,
+                             Duration::from_micros(52_400)],
+                },
                 probeset! {
                     proto: ProbeProto::Https,
                     relay: relay_node_2.clone(),
diff --git a/pr/3028/docs/src/iroh_relay/server/testing.rs.html b/pr/3028/docs/src/iroh_relay/server/testing.rs.html
index 8203577361..eb4dc0d1c1 100644
--- a/pr/3028/docs/src/iroh_relay/server/testing.rs.html
+++ b/pr/3028/docs/src/iroh_relay/server/testing.rs.html
@@ -97,7 +97,7 @@
 97
 98
 
//! Exposes functions to quickly configure a server suitable for testing.
-use std::net::{Ipv4Addr, Ipv6Addr};
+use std::net::Ipv4Addr;
 
 use super::{CertConfig, QuicConfig, RelayConfig, ServerConfig, StunConfig, TlsConfig};
 
@@ -169,12 +169,12 @@
 
 /// Creates a [`QuicConfig`] suitable for testing.
 ///
-/// - Binds to an OS assigned port on ipv6 and ipv4, if dual stack is enabled.
+/// - Binds to an OS assigned port on ipv4
 /// - Uses [`self_signed_tls_certs_and_config`] to create tls certificates
 pub fn quic_config() -> QuicConfig {
     let (_, server_config) = self_signed_tls_certs_and_config();
     QuicConfig {
-        bind_addr: (Ipv6Addr::UNSPECIFIED, 0).into(),
+        bind_addr: (Ipv4Addr::UNSPECIFIED, 0).into(),
         server_config,
     }
 }
diff --git a/pr/3028/docs/type.impl/iroh/key/struct.PublicKey.js b/pr/3028/docs/type.impl/iroh/key/struct.PublicKey.js
index ae2d2685fa..8a75a65cbf 100644
--- a/pr/3028/docs/type.impl/iroh/key/struct.PublicKey.js
+++ b/pr/3028/docs/type.impl/iroh/key/struct.PublicKey.js
@@ -1,3 +1,3 @@
 (function() {var type_impls = {
-"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 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 + PartialOrd,

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

impl PartialEq for PublicKey

§

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

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always\nsufficient, and 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

This method 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

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","iroh::NodeId"],["
§

impl PublicKey

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

Get this public key as a byte array.

\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 base32 string limited to the first 10 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"]] +"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 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
§

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

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

impl PartialEq for PublicKey

source§

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

This method tests for self and other values to be equal, and is used\nby ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always\nsufficient, and 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

This method 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

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","iroh::NodeId"],["
source§

impl PublicKey

source

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

Get this public key as a byte array.

\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 base32 string limited to the first 10 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

§

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

§

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;}})() \ No newline at end of file