diff --git a/pr/3907/docs/iroh/enum.KeyParsingError.html b/pr/3907/docs/iroh/enum.KeyParsingError.html index 3e5febe3ff..81d5e2c0d2 100644 --- a/pr/3907/docs/iroh/enum.KeyParsingError.html +++ b/pr/3907/docs/iroh/enum.KeyParsingError.html @@ -1,4 +1,4 @@ -KeyParsingError in iroh - Rust

KeyParsingError

Enum KeyParsingError 

pub enum KeyParsingError {
+KeyParsingError in iroh - Rust

KeyParsingError

Enum KeyParsingError 

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

Tuple Fields

§0: Error
§1: Meta

Captured call-site metadata

§

DecodeInvalidLength

The encoded information had the wrong length.

Fields

§meta: Meta

Captured call-site metadata

-

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

Formats the value using the given formatter. Read more
§

impl Error for KeyParsingError

§

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

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

fn description(&self) -> &str

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

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

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

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

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

impl From<DecodeError> for KeyParsingError

§

fn from(source: DecodeError) -> KeyParsingError

Converts to this type from the input type.
§

impl From<Error> for KeyParsingError

§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.
§

impl StackError for KeyParsingError

§

fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

Returns this error as a std error reference.
§

fn into_std(self: Box<KeyParsingError>) -> Box<dyn Error + Send + Sync>

Returns this error as a std error.
§

fn as_dyn(&self) -> &dyn StackError

Returns this error as a dyn StackError.
§

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

Returns the next source in the chain, if any.
§

fn meta(&self) -> Option<&Meta>

Returns metadata captured at creation time, if available.
§

fn source(&self) -> Option<ErrorRef<'_>>

Returns the next source in the chain, if any.
§

fn is_transparent(&self) -> bool

Returns whether this error is transparent and should be skipped in reports.
§

fn as_ref(&self) -> ErrorRef<'_>

Returns this error as an [ErrorRef]. Read more
§

fn stack(&self) -> Chain<'_>

Returns an iterator over this error followed by its sources.
§

fn sources(&self) -> Chain<'_>

Returns an iterator over sources of this error (skipping self).
§

fn report(&self) -> Report<'_>

Returns a [Report] to output the error with configurable formatting.

Auto Trait Implementations§

§

impl Freeze for KeyParsingError

§

impl !RefUnwindSafe for KeyParsingError

§

impl Send for KeyParsingError

§

impl Sync for KeyParsingError

§

impl Unpin for KeyParsingError

§

impl !UnwindSafe for KeyParsingError

Blanket Implementations§

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

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

impl Error for KeyParsingError

Source§

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

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

fn description(&self) -> &str

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

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

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

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

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

impl From<DecodeError> for KeyParsingError

Source§

fn from(source: DecodeError) -> KeyParsingError

Converts to this type from the input type.
Source§

impl From<Error> for KeyParsingError

Source§

fn from(source: Error) -> KeyParsingError

Converts to this type from the input type.
Source§

impl StackError for KeyParsingError

Source§

fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

Returns this error as a std error reference.
Source§

fn into_std(self: Box<KeyParsingError>) -> Box<dyn Error + Send + Sync>

Returns this error as a std error.
Source§

fn as_dyn(&self) -> &dyn StackError

Returns this error as a dyn StackError.
Source§

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

Returns the next source in the chain, if any.
Source§

fn meta(&self) -> Option<&Meta>

Returns metadata captured at creation time, if available.
Source§

fn source(&self) -> Option<ErrorRef<'_>>

Returns the next source in the chain, if any.
Source§

fn is_transparent(&self) -> bool

Returns whether this error is transparent and should be skipped in reports.
§

fn as_ref(&self) -> ErrorRef<'_>

Returns this error as an [ErrorRef]. Read more
§

fn stack(&self) -> Chain<'_>

Returns an iterator over this error followed by its sources.
§

fn sources(&self) -> Chain<'_>

Returns an iterator over sources of this error (skipping self).
§

fn report(&self) -> Report<'_>

Returns a [Report] to output the error with configurable formatting.

Auto Trait Implementations§

§

impl Freeze for KeyParsingError

§

impl !RefUnwindSafe for KeyParsingError

§

impl Send for KeyParsingError

§

impl Sync for KeyParsingError

§

impl Unpin for KeyParsingError

§

impl !UnwindSafe for KeyParsingError

Blanket Implementations§

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/3907/docs/iroh/enum.TransportAddr.html b/pr/3907/docs/iroh/enum.TransportAddr.html index ad2984e1d0..13a6552154 100644 --- a/pr/3907/docs/iroh/enum.TransportAddr.html +++ b/pr/3907/docs/iroh/enum.TransportAddr.html @@ -1,29 +1,29 @@ -TransportAddr in iroh - Rust

TransportAddr

Enum TransportAddr 

#[non_exhaustive]
pub enum TransportAddr { +TransportAddr in iroh - Rust

TransportAddr

Enum TransportAddr 

Source
#[non_exhaustive]
pub enum TransportAddr { Relay(RelayUrl), Ip(SocketAddr), }
Expand description

Available address types.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Relay(RelayUrl)

Relays

§

Ip(SocketAddr)

IP based addresses

-

Implementations§

§

impl TransportAddr

pub fn is_relay(&self) -> bool

Whether this is a transport address via a relay server.

-

pub fn is_ip(&self) -> bool

Whether this is an IP transport address.

-

Trait Implementations§

§

impl Clone for TransportAddr

§

fn clone(&self) -> TransportAddr

Returns a duplicate 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 TransportAddr

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for TransportAddr

§

fn deserialize<__D>( +

Implementations§

Source§

impl TransportAddr

Source

pub fn is_relay(&self) -> bool

Whether this is a transport address via a relay server.

+
Source

pub fn is_ip(&self) -> bool

Whether this is an IP transport address.

+

Trait Implementations§

Source§

impl Clone for TransportAddr

Source§

fn clone(&self) -> TransportAddr

Returns a duplicate 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 TransportAddr

Source§

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

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

impl<'de> Deserialize<'de> for TransportAddr

Source§

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

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

impl From<TransportAddrInfo> for TransportAddr

Source§

fn from(value: TransportAddrInfo) -> Self

Converts to this type from the input type.
§

impl Hash for TransportAddr

§

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

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

impl From<TransportAddrInfo> for TransportAddr

Source§

fn from(value: TransportAddrInfo) -> Self

Converts to this type from the input type.
Source§

impl Hash for TransportAddr

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 TransportAddr

§

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

Source§

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

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

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

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

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

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

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for TransportAddr

§

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

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

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

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

impl PartialOrd for TransportAddr

§

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

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

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

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

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

Tests less than or equal to (for self and other) and is used by the + Self: Sized,

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

impl PartialEq for TransportAddr

Source§

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

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

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

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

impl PartialOrd for TransportAddr

Source§

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

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

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

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

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

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

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

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

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

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

impl Serialize for TransportAddr

§

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

Source§

impl Serialize for TransportAddr

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 TransportAddr

§

impl StructuralPartialEq for TransportAddr

Auto Trait Implementations§

§

impl Freeze for TransportAddr

§

impl RefUnwindSafe for TransportAddr

§

impl Send for TransportAddr

§

impl Sync for TransportAddr

§

impl Unpin for TransportAddr

§

impl UnwindSafe for TransportAddr

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 TransportAddr

Source§

impl StructuralPartialEq for TransportAddr

Auto Trait Implementations§

§

impl Freeze for TransportAddr

§

impl RefUnwindSafe for TransportAddr

§

impl Send for TransportAddr

§

impl Sync for TransportAddr

§

impl Unpin for TransportAddr

§

impl UnwindSafe for TransportAddr

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/3907/docs/iroh/struct.EndpointAddr.html b/pr/3907/docs/iroh/struct.EndpointAddr.html index 712061106d..2f215c8c68 100644 --- a/pr/3907/docs/iroh/struct.EndpointAddr.html +++ b/pr/3907/docs/iroh/struct.EndpointAddr.html @@ -1,4 +1,4 @@ -EndpointAddr in iroh - Rust

EndpointAddr

Struct EndpointAddr 

pub struct EndpointAddr {
+EndpointAddr in iroh - Rust

EndpointAddr

Struct EndpointAddr 

Source
pub struct EndpointAddr {
     pub id: PublicKey,
     pub addrs: BTreeSet<TransportAddr>,
 }
Expand description

Network-level addressing information for an iroh endpoint.

@@ -25,41 +25,41 @@ number of other addressing information. It is a generic addressing type used wh to other endpoints needs to be established.

Fields§

§id: PublicKey

The endpoint’s identifier.

§addrs: BTreeSet<TransportAddr>

The endpoint’s addresses

-

Implementations§

§

impl EndpointAddr

pub fn new(id: PublicKey) -> EndpointAddr

Creates a new EndpointAddr with no network level addresses.

+

Implementations§

Source§

impl EndpointAddr

Source

pub fn new(id: PublicKey) -> EndpointAddr

Creates a new EndpointAddr with no network level addresses.

This still is usable with e.g. an address lookup service to establish a connection, depending on the situation.

-

pub fn from_parts( +

Source

pub fn from_parts( id: PublicKey, addrs: impl IntoIterator<Item = TransportAddr>, ) -> EndpointAddr

Creates a new EndpointAddr from its parts.

-

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

Adds a RelayUrl address.

-

pub fn with_ip_addr(self, addr: SocketAddr) -> EndpointAddr

Adds an IP based address.

-

pub fn with_addrs( +

Source

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

Adds a RelayUrl address.

+
Source

pub fn with_ip_addr(self, addr: SocketAddr) -> EndpointAddr

Adds an IP based address.

+
Source

pub fn with_addrs( self, addrs: impl IntoIterator<Item = TransportAddr>, ) -> EndpointAddr

Adds a list of addresses.

-

pub fn is_empty(&self) -> bool

Returns true, if only a EndpointId is present.

-

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

Returns a list of IP addresses of this peer.

-

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

Returns a list of relay urls of this peer.

+
Source

pub fn is_empty(&self) -> bool

Returns true, if only a EndpointId is present.

+
Source

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

Returns a list of IP addresses of this peer.

+
Source

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

Returns a list of relay urls of this peer.

In practice this is expected to be zero or one home relay for all known cases currently.

-

Trait Implementations§

§

impl Clone for EndpointAddr

§

fn clone(&self) -> EndpointAddr

Returns a duplicate 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 EndpointAddr

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for EndpointAddr

§

fn deserialize<__D>( +

Trait Implementations§

Source§

impl Clone for EndpointAddr

Source§

fn clone(&self) -> EndpointAddr

Returns a duplicate 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 EndpointAddr

Source§

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

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

impl<'de> Deserialize<'de> for EndpointAddr

Source§

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

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

impl From<EndpointAddr> for EndpointData

Source§

fn from(endpoint_addr: EndpointAddr) -> EndpointData

Converts to this type from the input type.
Source§

impl From<EndpointAddr> for EndpointInfo

Source§

fn from(addr: EndpointAddr) -> EndpointInfo

Converts to this type from the input type.
Source§

impl From<EndpointInfo> for EndpointAddr

Source§

fn from(value: EndpointInfo) -> EndpointAddr

Converts to this type from the input type.
§

impl From<PublicKey> for EndpointAddr

§

fn from(endpoint_id: PublicKey) -> EndpointAddr

Converts to this type from the input type.
§

impl Hash for EndpointAddr

§

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

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

impl From<EndpointAddr> for EndpointData

Source§

fn from(endpoint_addr: EndpointAddr) -> EndpointData

Converts to this type from the input type.
Source§

impl From<EndpointAddr> for EndpointInfo

Source§

fn from(addr: EndpointAddr) -> EndpointInfo

Converts to this type from the input type.
Source§

impl From<EndpointInfo> for EndpointAddr

Source§

fn from(value: EndpointInfo) -> EndpointAddr

Converts to this type from the input type.
Source§

impl From<PublicKey> for EndpointAddr

Source§

fn from(endpoint_id: PublicKey) -> EndpointAddr

Converts to this type from the input type.
Source§

impl Hash for EndpointAddr

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 EndpointAddr

§

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

Source§

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

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

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

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

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

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

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for EndpointAddr

§

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

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

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

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

impl PartialOrd for EndpointAddr

§

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

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

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

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

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

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

impl PartialEq for EndpointAddr

Source§

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

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

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

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

impl PartialOrd for EndpointAddr

Source§

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

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

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

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

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

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

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

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

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

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

impl Serialize for EndpointAddr

§

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

Source§

impl Serialize for EndpointAddr

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 EndpointAddr

§

impl StructuralPartialEq for EndpointAddr

Auto Trait Implementations§

§

impl Freeze for EndpointAddr

§

impl RefUnwindSafe for EndpointAddr

§

impl Send for EndpointAddr

§

impl Sync for EndpointAddr

§

impl Unpin for EndpointAddr

§

impl UnwindSafe for EndpointAddr

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 EndpointAddr

Source§

impl StructuralPartialEq for EndpointAddr

Auto Trait Implementations§

§

impl Freeze for EndpointAddr

§

impl RefUnwindSafe for EndpointAddr

§

impl Send for EndpointAddr

§

impl Sync for EndpointAddr

§

impl Unpin for EndpointAddr

§

impl UnwindSafe for EndpointAddr

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/3907/docs/iroh/struct.PublicKey.html b/pr/3907/docs/iroh/struct.PublicKey.html index cac8921c25..5cc6a4597a 100644 --- a/pr/3907/docs/iroh/struct.PublicKey.html +++ b/pr/3907/docs/iroh/struct.PublicKey.html @@ -1,46 +1,46 @@ -PublicKey in iroh - Rust

PublicKey

Struct PublicKey 

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

A public key.

+PublicKey in iroh - Rust

PublicKey

Struct PublicKey 

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

A public key.

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

-

Implementations§

§

impl PublicKey

pub const LENGTH: usize = 32usize

The length of an ed25519 PublicKey, in bytes.

-

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

Get this public key as a byte array.

-

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

Construct a PublicKey from a slice of bytes.

+

Implementations§

Source§

impl PublicKey

Source

pub const LENGTH: usize = 32usize

The length of an ed25519 PublicKey, in bytes.

+
Source

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

Get this public key as a byte array.

+
Source

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

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

Source

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

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

§Return

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

-

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

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

Source

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

Convert to a hex string limited to the first 5 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 Borrow<[u8; 32]> for PublicKey

§

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

Immutably borrows from an owned value. Read more
§

impl Clone for PublicKey

§

fn clone(&self) -> PublicKey

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

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

Performs copy-assignment from source. Read more
§

impl Debug for PublicKey

§

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

Formats the value using the given formatter. Read more
§

impl Deref for PublicKey

§

type Target = [u8; 32]

The resulting type after dereferencing.
§

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

Dereferences the value.
§

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

§

fn deserialize<D>( +

Trait Implementations§

Source§

impl AsRef<[u8]> for PublicKey

Source§

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

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

impl Borrow<[u8; 32]> for PublicKey

Source§

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

Immutably borrows from an owned value. Read more
Source§

impl Clone for PublicKey

Source§

fn clone(&self) -> PublicKey

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PublicKey

Source§

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

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

impl Deref for PublicKey

Source§

type Target = [u8; 32]

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

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

Source§

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

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

impl Display for PublicKey

§

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

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

impl EndpointIdExt for PublicKey

Source§

fn to_z32(&self) -> String

Encodes a EndpointId in z-base-32 encoding.
Source§

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

Parses a EndpointId from z-base-32 encoding.
§

impl From<PublicKey> for EndpointAddr

§

fn from(endpoint_id: PublicKey) -> EndpointAddr

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 EndpointIdExt for PublicKey

Source§

fn to_z32(&self) -> String

Encodes a EndpointId in z-base-32 encoding.
Source§

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

Parses a EndpointId from z-base-32 encoding.
Source§

impl From<PublicKey> for EndpointAddr

Source§

fn from(endpoint_id: PublicKey) -> EndpointAddr

Converts to this type from the input type.
Source§

impl FromStr for PublicKey

Deserialises the PublicKey from it’s base32 encoding.

Display is capable of serialising this format.

-
§

type Err = KeyParsingError

The associated error which can be returned from parsing.
§

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

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

impl Hash for PublicKey

§

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

type Err = KeyParsingError

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

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

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

Source§

impl Hash for PublicKey

Source§

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

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

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

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

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,

Restrict a value to a certain interval. Read more
§

impl PartialEq for PublicKey

§

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

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

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

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

impl PartialOrd for PublicKey

§

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

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

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

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

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

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

impl PartialEq for PublicKey

Source§

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

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

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

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

impl PartialOrd for PublicKey

Source§

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

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

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

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

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

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

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

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

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

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

impl Serialize for PublicKey

§

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

Source§

impl Serialize for PublicKey

Source§

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

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

impl TryFrom<&[u8]> for PublicKey

§

type Error = KeyParsingError

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

fn try_from( + S: Serializer,

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

impl TryFrom<&[u8]> for PublicKey

Source§

type Error = KeyParsingError

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

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

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

Performs the conversion.
Source§

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

Source§

type Error = KeyParsingError

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

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

Performs the conversion.
§

impl Copy for PublicKey

§

impl Eq for PublicKey

§

impl StructuralPartialEq for PublicKey

Auto Trait Implementations§

§

impl Freeze for PublicKey

§

impl RefUnwindSafe for PublicKey

§

impl Send for PublicKey

§

impl Sync for PublicKey

§

impl Unpin for PublicKey

§

impl UnwindSafe for PublicKey

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

Performs the conversion.
Source§

impl Copy for PublicKey

Source§

impl Eq for PublicKey

Source§

impl StructuralPartialEq for PublicKey

Auto Trait Implementations§

§

impl Freeze for PublicKey

§

impl RefUnwindSafe for PublicKey

§

impl Send for PublicKey

§

impl Sync for PublicKey

§

impl Unpin for PublicKey

§

impl UnwindSafe for PublicKey

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

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

§

fn implicit( diff --git a/pr/3907/docs/iroh/struct.RelayUrl.html b/pr/3907/docs/iroh/struct.RelayUrl.html index 5a790242d2..e0e385e668 100644 --- a/pr/3907/docs/iroh/struct.RelayUrl.html +++ b/pr/3907/docs/iroh/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh - Rust

RelayUrl

Struct RelayUrl 

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

A URL identifying a relay server.

+RelayUrl in iroh - Rust

RelayUrl

Struct RelayUrl 

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

A URL identifying a relay server.

It is cheaply clonable, as the underlying type is wrapped into an Arc. The main type under the hood though is Url.

To create a RelayUrl use the From<Url> implementation.

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

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

-

Trait Implementations§

§

impl Clone for RelayUrl

§

fn clone(&self) -> RelayUrl

Returns a duplicate 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 duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for RelayUrl

Source§

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

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

impl Deref for RelayUrl

Dereferences to the wrapped Url.

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

-
§

type Target = Url

The resulting type after dereferencing.
§

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

Dereferences the value.
§

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

§

fn deserialize<__D>( +

Source§

type Target = Url

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

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

Source§

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

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

impl Display for RelayUrl

§

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

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

impl From<RelayUrl> for RelayConfig

Source§

fn from(value: RelayUrl) -> RelayConfig

Converts to this type from the input type.
Source§

impl From<RelayUrl> for RelayMap

Source§

fn from(value: RelayUrl) -> RelayMap

Creates a RelayMap from a RelayUrl.

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

impl Display for RelayUrl

Source§

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

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

impl From<RelayUrl> for RelayConfig

Source§

fn from(value: RelayUrl) -> RelayConfig

Converts to this type from the input type.
Source§

impl From<RelayUrl> for RelayMap

Source§

fn from(value: RelayUrl) -> RelayMap

Creates a RelayMap from a RelayUrl.

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

-
§

impl From<RelayUrl> for Url

§

fn from(value: RelayUrl) -> Url

Converts to this type from the input type.
§

impl From<Url> for RelayUrl

§

fn from(url: Url) -> RelayUrl

Converts to this type from the input type.
Source§

impl FromIterator<RelayUrl> for RelayMap

Source§

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

Source§

impl From<RelayUrl> for Url

Source§

fn from(value: RelayUrl) -> Url

Converts to this type from the input type.
Source§

impl From<Url> for RelayUrl

Source§

fn from(url: Url) -> RelayUrl

Converts to this type from the input type.
Source§

impl FromIterator<RelayUrl> for RelayMap

Source§

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

Creates a RelayMap from an iterator of RelayUrl.

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

-
§

impl FromStr for RelayUrl

Support for parsing strings directly.

+
Source§

impl FromStr for RelayUrl

Support for parsing strings directly.

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

-
§

type Err = RelayUrlParseError

The associated error which can be returned from parsing.
§

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

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

impl Hash for RelayUrl

§

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

type Err = RelayUrlParseError

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

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

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

Source§

impl Hash for RelayUrl

Source§

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

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

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

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

impl Ord for RelayUrl

§

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

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

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

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

impl Ord for RelayUrl

Source§

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

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

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

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

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

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

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for RelayUrl

§

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

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

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

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

impl PartialOrd for RelayUrl

§

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

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

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

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

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

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

impl PartialEq for RelayUrl

Source§

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

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

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

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

impl PartialOrd for RelayUrl

Source§

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

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

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

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

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

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

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

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

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

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

impl Serialize for RelayUrl

§

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

Source§

impl Serialize for RelayUrl

Source§

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

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

impl Eq for RelayUrl

§

impl StructuralPartialEq for RelayUrl

Auto Trait Implementations§

§

impl Freeze for RelayUrl

§

impl RefUnwindSafe for RelayUrl

§

impl Send for RelayUrl

§

impl Sync for RelayUrl

§

impl Unpin for RelayUrl

§

impl UnwindSafe for RelayUrl

Blanket Implementations§

Source§

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

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

impl Eq for RelayUrl

Source§

impl StructuralPartialEq for RelayUrl

Auto Trait Implementations§

§

impl Freeze for RelayUrl

§

impl RefUnwindSafe for RelayUrl

§

impl Send for RelayUrl

§

impl Sync for RelayUrl

§

impl Unpin for RelayUrl

§

impl UnwindSafe for RelayUrl

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

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

§

fn implicit( diff --git a/pr/3907/docs/iroh/struct.RelayUrlParseError.html b/pr/3907/docs/iroh/struct.RelayUrlParseError.html index 32da43f432..8b6d5aacb6 100644 --- a/pr/3907/docs/iroh/struct.RelayUrlParseError.html +++ b/pr/3907/docs/iroh/struct.RelayUrlParseError.html @@ -1,6 +1,6 @@ -RelayUrlParseError in iroh - Rust

RelayUrlParseError

Struct RelayUrlParseError 

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

Can occur when parsing a string into a RelayUrl.

-

Implementations§

Trait Implementations§

§

impl Debug for RelayUrlParseError

§

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

Formats the value using the given formatter. Read more
§

impl Display for RelayUrlParseError

§

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

Formats the value using the given formatter. Read more
§

impl Error for RelayUrlParseError

§

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

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

fn description(&self) -> &str

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

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

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

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

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

impl StackError for RelayUrlParseError

§

fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

Returns this error as a std error reference.
§

fn into_std(self: Box<RelayUrlParseError>) -> Box<dyn Error + Send + Sync>

Returns this error as a std error.
§

fn as_dyn(&self) -> &dyn StackError

Returns this error as a dyn StackError.
§

fn meta(&self) -> Option<&Meta>

Returns metadata captured at creation time, if available.
§

fn source(&self) -> Option<ErrorRef<'_>>

Returns the next source in the chain, if any.
§

fn is_transparent(&self) -> bool

Returns whether this error is transparent and should be skipped in reports.
§

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

Returns the next source in the chain, if any.
§

fn as_ref(&self) -> ErrorRef<'_>

Returns this error as an [ErrorRef]. Read more
§

fn stack(&self) -> Chain<'_>

Returns an iterator over this error followed by its sources.
§

fn sources(&self) -> Chain<'_>

Returns an iterator over sources of this error (skipping self).
§

fn report(&self) -> Report<'_>

Returns a [Report] to output the error with configurable formatting.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

RelayUrlParseError

Struct RelayUrlParseError 

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

Can occur when parsing a string into a RelayUrl.

+

Implementations§

Trait Implementations§

Source§

impl Debug for RelayUrlParseError

Source§

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

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

impl Display for RelayUrlParseError

Source§

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

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

impl Error for RelayUrlParseError

Source§

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

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

fn description(&self) -> &str

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

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

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

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

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

impl StackError for RelayUrlParseError

Source§

fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

Returns this error as a std error reference.
Source§

fn into_std(self: Box<RelayUrlParseError>) -> Box<dyn Error + Send + Sync>

Returns this error as a std error.
Source§

fn as_dyn(&self) -> &dyn StackError

Returns this error as a dyn StackError.
Source§

fn meta(&self) -> Option<&Meta>

Returns metadata captured at creation time, if available.
Source§

fn source(&self) -> Option<ErrorRef<'_>>

Returns the next source in the chain, if any.
Source§

fn is_transparent(&self) -> bool

Returns whether this error is transparent and should be skipped in reports.
Source§

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

Returns the next source in the chain, if any.
§

fn as_ref(&self) -> ErrorRef<'_>

Returns this error as an [ErrorRef]. Read more
§

fn stack(&self) -> Chain<'_>

Returns an iterator over this error followed by its sources.
§

fn sources(&self) -> Chain<'_>

Returns an iterator over sources of this error (skipping self).
§

fn report(&self) -> Report<'_>

Returns a [Report] to output the error with configurable formatting.

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/3907/docs/iroh/struct.SecretKey.html b/pr/3907/docs/iroh/struct.SecretKey.html index 8f79d03ce7..1d1c1acb8e 100644 --- a/pr/3907/docs/iroh/struct.SecretKey.html +++ b/pr/3907/docs/iroh/struct.SecretKey.html @@ -1,21 +1,21 @@ -SecretKey in iroh - Rust

SecretKey

Struct SecretKey 

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

A secret key.

-

Implementations§

§

impl SecretKey

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

-

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

SecretKey

Struct SecretKey 

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

A secret key.

+

Implementations§

Source§

impl SecretKey

Source

pub fn public(&self) -> PublicKey

The public key of this SecretKey.

+
Source

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

Generate a new SecretKey with a randomness generator.

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

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

Sign the given message and return a digital signature

-

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

Convert this to the bytes representing the secret part. +let _key = iroh_base::SecretKey::generate(&mut rand::rng());

Source

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

Sign the given message and return a digital signature

+
Source

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

Convert this to the bytes representing the secret part. 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 duplicate 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 duplicate 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 Drop for SecretKey

§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

impl From<[u8; 32]> for SecretKey

§

fn from(value: [u8; 32]) -> 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 Drop for SecretKey

Source§

fn drop(&mut self)

Executes the destructor for this type. 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 FromStr for SecretKey

Source§

type Err = KeyParsingError

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

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

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

impl Serialize for SecretKey

Source§

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

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

impl TryFrom<&[u8]> for SecretKey

§

type Error = KeyParsingError

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

fn try_from( + S: Serializer,

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

impl TryFrom<&[u8]> for SecretKey

Source§

type Error = KeyParsingError

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

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

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for SecretKey

§

impl RefUnwindSafe for SecretKey

§

impl Send for SecretKey

§

impl Sync for SecretKey

§

impl Unpin for SecretKey

§

impl UnwindSafe for SecretKey

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where diff --git a/pr/3907/docs/iroh/struct.Signature.html b/pr/3907/docs/iroh/struct.Signature.html index 6053ce4001..f188e77d2b 100644 --- a/pr/3907/docs/iroh/struct.Signature.html +++ b/pr/3907/docs/iroh/struct.Signature.html @@ -1,16 +1,16 @@ -Signature in iroh - Rust

Signature

Struct Signature 

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

Ed25519 signature.

-

Implementations§

§

impl Signature

pub const LENGTH: usize = 64usize

The length of an ed25519 Signature, in bytes.

-

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

Return the inner byte array.

-

pub fn from_bytes(bytes: &[u8; 64]) -> Signature

Parse an Ed25519 signature from a byte slice.

-

Trait Implementations§

§

impl Clone for Signature

§

fn clone(&self) -> Signature

Returns a duplicate 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 Signature

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Signature

§

fn deserialize<D>( +Signature in iroh - Rust

Signature

Struct Signature 

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

Ed25519 signature.

+

Implementations§

Source§

impl Signature

Source

pub const LENGTH: usize = 64usize

The length of an ed25519 Signature, in bytes.

+
Source

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

Return the inner byte array.

+
Source

pub fn from_bytes(bytes: &[u8; 64]) -> Signature

Parse an Ed25519 signature from a byte slice.

+

Trait Implementations§

Source§

impl Clone for Signature

Source§

fn clone(&self) -> Signature

Returns a duplicate 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 Signature

Source§

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

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

impl<'de> Deserialize<'de> for Signature

Source§

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

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

impl Display for Signature

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for Signature

§

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

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

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

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

impl Serialize for Signature

§

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

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

impl Display for Signature

Source§

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

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

impl PartialEq for Signature

Source§

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

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

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

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

impl Serialize for Signature

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 Signature

§

impl Eq for Signature

§

impl StructuralPartialEq for Signature

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 Copy for Signature

Source§

impl Eq for Signature

Source§

impl StructuralPartialEq for Signature

Auto Trait Implementations§

§

impl Freeze for Signature

§

impl RefUnwindSafe for Signature

§

impl Send for Signature

§

impl Sync for Signature

§

impl Unpin for Signature

§

impl UnwindSafe for Signature

Blanket Implementations§

Source§

impl<T> Any for 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/3907/docs/iroh/struct.SignatureError.html b/pr/3907/docs/iroh/struct.SignatureError.html index a090b2a760..9063cd7f07 100644 --- a/pr/3907/docs/iroh/struct.SignatureError.html +++ b/pr/3907/docs/iroh/struct.SignatureError.html @@ -1,6 +1,6 @@ -SignatureError in iroh - Rust

SignatureError

Struct SignatureError 

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

Verification of a signature failed.

-

Implementations§

§

impl SignatureError

pub fn new() -> SignatureError

Creates a new SignatureError error.

-

Trait Implementations§

§

impl Debug for SignatureError

§

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

Formats the value using the given formatter. Read more
§

impl Display for SignatureError

§

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

Formats the value using the given formatter. Read more
§

impl Error for SignatureError

§

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

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

fn description(&self) -> &str

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

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

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

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

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

impl StackError for SignatureError

§

fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

Returns this error as a std error reference.
§

fn into_std(self: Box<SignatureError>) -> Box<dyn Error + Send + Sync>

Returns this error as a std error.
§

fn as_dyn(&self) -> &dyn StackError

Returns this error as a dyn StackError.
§

fn meta(&self) -> Option<&Meta>

Returns metadata captured at creation time, if available.
§

fn source(&self) -> Option<ErrorRef<'_>>

Returns the next source in the chain, if any.
§

fn is_transparent(&self) -> bool

Returns whether this error is transparent and should be skipped in reports.
§

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

Returns the next source in the chain, if any.
§

fn as_ref(&self) -> ErrorRef<'_>

Returns this error as an [ErrorRef]. Read more
§

fn stack(&self) -> Chain<'_>

Returns an iterator over this error followed by its sources.
§

fn sources(&self) -> Chain<'_>

Returns an iterator over sources of this error (skipping self).
§

fn report(&self) -> Report<'_>

Returns a [Report] to output the error with configurable formatting.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

SignatureError

Struct SignatureError 

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

Verification of a signature failed.

+

Implementations§

Source§

impl SignatureError

Source

pub fn new() -> SignatureError

Creates a new SignatureError error.

+

Trait Implementations§

Source§

impl Debug for SignatureError

Source§

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

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

impl Display for SignatureError

Source§

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

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

impl Error for SignatureError

Source§

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

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

fn description(&self) -> &str

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

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

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

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

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

impl StackError for SignatureError

Source§

fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

Returns this error as a std error reference.
Source§

fn into_std(self: Box<SignatureError>) -> Box<dyn Error + Send + Sync>

Returns this error as a std error.
Source§

fn as_dyn(&self) -> &dyn StackError

Returns this error as a dyn StackError.
Source§

fn meta(&self) -> Option<&Meta>

Returns metadata captured at creation time, if available.
Source§

fn source(&self) -> Option<ErrorRef<'_>>

Returns the next source in the chain, if any.
Source§

fn is_transparent(&self) -> bool

Returns whether this error is transparent and should be skipped in reports.
Source§

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

Returns the next source in the chain, if any.
§

fn as_ref(&self) -> ErrorRef<'_>

Returns this error as an [ErrorRef]. Read more
§

fn stack(&self) -> Chain<'_>

Returns an iterator over this error followed by its sources.
§

fn sources(&self) -> Chain<'_>

Returns an iterator over sources of this error (skipping self).
§

fn report(&self) -> Report<'_>

Returns a [Report] to output the error with configurable formatting.

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/3907/docs/iroh/type.EndpointId.html b/pr/3907/docs/iroh/type.EndpointId.html index 9eec7c5b1b..6e3cfea99a 100644 --- a/pr/3907/docs/iroh/type.EndpointId.html +++ b/pr/3907/docs/iroh/type.EndpointId.html @@ -1,4 +1,4 @@ -EndpointId in iroh - Rust

EndpointId

Type Alias EndpointId 

pub type EndpointId = PublicKey;
Expand description

The identifier for an endpoint in the (iroh) network.

+EndpointId in iroh - Rust

EndpointId

Type Alias EndpointId 

Source
pub type EndpointId = PublicKey;
Expand description

The identifier for an endpoint in the (iroh) network.

Each endpoint in iroh has a unique identifier created as a cryptographic key. This can be used to globally identify an endpoint. Since it is also a cryptographic key it is also the mechanism by which all traffic is always encrypted for a specific endpoint only.

diff --git a/pr/3907/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3907/docs/iroh_relay/client/struct.ClientBuilder.html index 92ed86dea2..a472113de0 100644 --- a/pr/3907/docs/iroh_relay/client/struct.ClientBuilder.html +++ b/pr/3907/docs/iroh_relay/client/struct.ClientBuilder.html @@ -1,7 +1,7 @@ ClientBuilder in iroh_relay::client - Rust

ClientBuilder

Struct ClientBuilder 

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

Build a Client.

Implementations§

Source§

impl ClientBuilder

Source

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

Create a new ClientBuilder

Source

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

Source

pub async fn lookup_endpoint_by_id( &self, - endpoint_id: &EndpointId, + endpoint_id: &EndpointId, origin: &str, -) -> Result<EndpointInfo, LookupError>

Looks up endpoint info by [EndpointId] and origin domain name.

+) -> Result<EndpointInfo, LookupError>

Looks up endpoint info by EndpointId and origin domain name.

To lookup endpoints that published their endpoint info to the DNS servers run by n0, pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.

Source

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

Source

pub async fn lookup_endpoint_by_id_staggered( &self, - endpoint_id: &EndpointId, + endpoint_id: &EndpointId, origin: &str, delays_ms: &[u64], -) -> Result<EndpointInfo, StaggeredError<LookupError>>

Looks up endpoint info by [EndpointId] and origin domain name.

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

Looks up endpoint info by EndpointId and origin domain name.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a diff --git a/pr/3907/docs/iroh_relay/endpoint_info/enum.DecodingError.html b/pr/3907/docs/iroh_relay/endpoint_info/enum.DecodingError.html index 99360d1bd4..2bf60777f4 100644 --- a/pr/3907/docs/iroh_relay/endpoint_info/enum.DecodingError.html +++ b/pr/3907/docs/iroh_relay/endpoint_info/enum.DecodingError.html @@ -8,12 +8,12 @@ meta: Meta, }, InvalidKey { - source: KeyParsingError, + source: KeyParsingError, meta: Meta, }, }

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

InvalidEncodingZ32

Fields

§source: Z32Error
§meta: Meta

Captured call-site metadata

§

InvalidLength

Fields

§len: usize
§meta: Meta

Captured call-site metadata

-
§

InvalidKey

Fields

§source: KeyParsingError
§meta: Meta

Captured call-site metadata

+
§

InvalidKey

Fields

§meta: Meta

Captured call-site metadata

Trait Implementations§

Source§

impl Debug for DecodingError

Source§

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

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

impl Display for DecodingError

Source§

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

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

impl Error for DecodingError

Source§

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

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

fn description(&self) -> &str

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

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

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

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

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

impl From<DecodingError> for AnyError

Source§

fn from(value: DecodingError) -> AnyError

Converts to this type from the input type.
Source§

impl From<DecodingError> for ParseError

Source§

fn from(source: DecodingError) -> Self

Converts to this type from the input type.
Source§

impl StackError for DecodingError

Source§

fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

Returns this error as a std error reference.
Source§

fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>

Returns this error as a std error.
Source§

fn as_dyn(&self) -> &dyn StackError

Returns this error as a dyn StackError.
Source§

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

Returns the next source in the chain, if any.
Source§

fn meta(&self) -> Option<&Meta>

Returns metadata captured at creation time, if available.
Source§

fn source(&self) -> Option<ErrorRef<'_>>

Returns the next source in the chain, if any.
Source§

fn is_transparent(&self) -> bool

Returns whether this error is transparent and should be skipped in reports.
§

fn as_ref(&self) -> ErrorRef<'_>

Returns this error as an [ErrorRef]. Read more
§

fn stack(&self) -> Chain<'_>

Returns an iterator over this error followed by its sources.
§

fn sources(&self) -> Chain<'_>

Returns an iterator over sources of this error (skipping self).
§

fn report(&self) -> Report<'_>

Returns a [Report] to output the error with configurable formatting.

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/3907/docs/iroh_relay/endpoint_info/index.html b/pr/3907/docs/iroh_relay/endpoint_info/index.html index 9c918805ae..0b86e9ed1c 100644 --- a/pr/3907/docs/iroh_relay/endpoint_info/index.html +++ b/pr/3907/docs/iroh_relay/endpoint_info/index.html @@ -1,5 +1,5 @@ -iroh_relay::endpoint_info - Rust

Module endpoint_info

Module endpoint_info 

Source
Expand description

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

-

Dialing by [EndpointId] is supported by iroh endpoints publishing Pkarr records to DNS +iroh_relay::endpoint_info - Rust

Module endpoint_info

Module endpoint_info 

Source
Expand description

Support for handling DNS resource records for dialing by EndpointId.

+

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

DNS records are published under the following names:

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

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

_iroh is the record name as defined by IROH_TXT_NAME.

  • -

    <z32-endpoint-id> is the z-base-32 encoding of the [EndpointId].

    +

    <z32-endpoint-id> is the z-base-32 encoding of the EndpointId.

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

    • -

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

      +

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

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

    -
  • Structs§

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

    Enums§

    DecodingError
    EncodingError
    ParseError

    Constants§

    IROH_TXT_NAME
    The DNS name for the iroh TXT record.

    Traits§

    EndpointIdExt
    Extension methods for [EndpointId] to encode to and decode from [z32], +

    Structs§

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

    Enums§

    DecodingError
    EncodingError
    ParseError

    Constants§

    IROH_TXT_NAME
    The DNS name for the iroh TXT record.

    Traits§

    EndpointIdExt
    Extension methods for EndpointId to encode to and decode from [z32], which is the encoding used in [pkarr] domain names.
    \ No newline at end of file diff --git a/pr/3907/docs/iroh_relay/endpoint_info/struct.EndpointData.html b/pr/3907/docs/iroh_relay/endpoint_info/struct.EndpointData.html index 3b07857116..c746b8ae82 100644 --- a/pr/3907/docs/iroh_relay/endpoint_info/struct.EndpointData.html +++ b/pr/3907/docs/iroh_relay/endpoint_info/struct.EndpointData.html @@ -1,23 +1,23 @@ EndpointData in iroh_relay::endpoint_info - Rust

    EndpointData

    Struct EndpointData 

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

    Data about an endpoint that may be published to and resolved from discovery services.

    -

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

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

    -

    This struct does not include the endpoint’s [EndpointId], only the data about a certain -endpoint. See EndpointInfo for a struct that contains a [EndpointId] with associated EndpointData.

    -

    Implementations§

    Source§

    impl EndpointData

    Source

    pub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self

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

    -
    Source

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

    Sets the relay URL and returns the updated endpoint data.

    +

    This struct does not include the endpoint’s EndpointId, only the data about a certain +endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.

    +

    Implementations§

    Source§

    impl EndpointData

    Source

    pub fn new(addrs: impl IntoIterator<Item = TransportAddr>) -> Self

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

    +
    Source

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

    Sets the relay URL and returns the updated endpoint data.

    Source

    pub fn with_ip_addrs(self, addresses: BTreeSet<SocketAddr>) -> Self

    Sets the direct addresses and returns the updated endpoint data.

    Source

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

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

    -
    Source

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

    Returns the relay URL of the endpoint.

    +
    Source

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

    Returns the relay URL of the endpoint.

    Source

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

    Returns the optional user-defined data of the endpoint.

    Source

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

    Returns the direct addresses of the endpoint.

    Source

    pub fn clear_ip_addrs(&mut self)

    Removes all direct addresses from the endpoint data.

    Source

    pub fn clear_relay_urls(&mut self)

    Removes all direct addresses from the endpoint data.

    -
    Source

    pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)

    Add addresses to the endpoint data.

    +
    Source

    pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)

    Add addresses to the endpoint data.

    Source

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

    Sets the user-defined data of the endpoint data.

    -
    Source

    pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>

    Returns the full list of all known addresses

    +
    Source

    pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>

    Returns the full list of all known addresses

    Source

    pub fn has_addrs(&self) -> bool

    Does this have any addresses?

    -

    Trait Implementations§

    Source§

    impl Clone for EndpointData

    Source§

    fn clone(&self) -> EndpointData

    Returns a duplicate 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 EndpointData

    Source§

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

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

    impl Default for EndpointData

    Source§

    fn default() -> EndpointData

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

    impl From<EndpointAddr> for EndpointData

    Source§

    fn from(endpoint_addr: EndpointAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for EndpointData

    Source§

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

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

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

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

    Trait Implementations§

    Source§

    impl Clone for EndpointData

    Source§

    fn clone(&self) -> EndpointData

    Returns a duplicate 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 EndpointData

    Source§

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

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

    impl Default for EndpointData

    Source§

    fn default() -> EndpointData

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

    impl From<EndpointAddr> for EndpointData

    Source§

    fn from(endpoint_addr: EndpointAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for EndpointData

    Source§

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

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

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

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

    impl Eq for EndpointData

    Source§

    impl StructuralPartialEq for EndpointData

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

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

    Source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

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

    §

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

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/3907/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html b/pr/3907/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html index b0e4b494db..e84029ca1f 100644 --- a/pr/3907/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html +++ b/pr/3907/docs/iroh_relay/endpoint_info/struct.EndpointInfo.html @@ -1,17 +1,17 @@ EndpointInfo in iroh_relay::endpoint_info - Rust

    EndpointInfo

    Struct EndpointInfo 

    Source
    pub struct EndpointInfo {
    -    pub endpoint_id: EndpointId,
    +    pub endpoint_id: EndpointId,
         pub data: EndpointData,
     }
    Expand description

    Information about an endpoint that may be published to and resolved from discovery services.

    -

    This struct couples a [EndpointId] with its associated EndpointData.

    -

    Fields§

    §endpoint_id: EndpointId

    The [EndpointId] of the endpoint this is about.

    +

    This struct couples a EndpointId with its associated EndpointData.

    +

    Fields§

    §endpoint_id: EndpointId

    The EndpointId of the endpoint this is about.

    §data: EndpointData

    The information published about the endpoint.

    -

    Implementations§

    Source§

    impl EndpointInfo

    Source

    pub fn new(endpoint_id: EndpointId) -> Self

    Creates a new EndpointInfo with an empty EndpointData.

    -
    Source

    pub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self

    Creates a new EndpointInfo from its parts.

    -
    Source

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

    Sets the relay URL and returns the updated endpoint info.

    +

    Implementations§

    Source§

    impl EndpointInfo

    Source

    pub fn new(endpoint_id: EndpointId) -> Self

    Creates a new EndpointInfo with an empty EndpointData.

    +
    Source

    pub fn from_parts(endpoint_id: EndpointId, data: EndpointData) -> Self

    Creates a new EndpointInfo from its parts.

    +
    Source

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

    Sets the relay URL and returns the updated endpoint info.

    Source

    pub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> Self

    Sets the IP based addresses and returns the updated endpoint info.

    Source

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

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

    -
    Source

    pub fn to_endpoint_addr(&self) -> EndpointAddr

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

    -
    Source

    pub fn into_endpoint_addr(self) -> EndpointAddr

    Converts into a [EndpointAddr] without cloning.

    +
    Source

    pub fn to_endpoint_addr(&self) -> EndpointAddr

    Converts into a EndpointAddr by cloning the needed fields.

    +
    Source

    pub fn into_endpoint_addr(self) -> EndpointAddr

    Converts into a EndpointAddr without cloning.

    Source

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

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

    Source

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

    Creates a [pkarr::SignedPacket].

    -

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

    +

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

    Source

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

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

    -

    Methods from Deref<Target = EndpointData>§

    Source

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

    Returns the relay URL of the endpoint.

    +

    Methods from Deref<Target = EndpointData>§

    Source

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

    Returns the relay URL of the endpoint.

    Source

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

    Returns the optional user-defined data of the endpoint.

    Source

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

    Returns the direct addresses of the endpoint.

    Source

    pub fn clear_ip_addrs(&mut self)

    Removes all direct addresses from the endpoint data.

    Source

    pub fn clear_relay_urls(&mut self)

    Removes all direct addresses from the endpoint data.

    -
    Source

    pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)

    Add addresses to the endpoint data.

    +
    Source

    pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)

    Add addresses to the endpoint data.

    Source

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

    Sets the user-defined data of the endpoint data.

    -
    Source

    pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>

    Returns the full list of all known addresses

    +
    Source

    pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>

    Returns the full list of all known addresses

    Source

    pub fn has_addrs(&self) -> bool

    Does this have any addresses?

    -

    Trait Implementations§

    Source§

    impl Clone for EndpointInfo

    Source§

    fn clone(&self) -> EndpointInfo

    Returns a duplicate 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 EndpointInfo

    Source§

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

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

    impl Deref for EndpointInfo

    Source§

    type Target = EndpointData

    The resulting type after dereferencing.
    Source§

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

    Dereferences the value.
    Source§

    impl DerefMut for EndpointInfo

    Source§

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

    Mutably dereferences the value.
    Source§

    impl From<EndpointAddr> for EndpointInfo

    Source§

    fn from(addr: EndpointAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl From<EndpointInfo> for EndpointAddr

    Source§

    fn from(value: EndpointInfo) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for EndpointInfo

    Source§

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

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

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

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

    Trait Implementations§

    Source§

    impl Clone for EndpointInfo

    Source§

    fn clone(&self) -> EndpointInfo

    Returns a duplicate 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 EndpointInfo

    Source§

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

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

    impl Deref for EndpointInfo

    Source§

    type Target = EndpointData

    The resulting type after dereferencing.
    Source§

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

    Dereferences the value.
    Source§

    impl DerefMut for EndpointInfo

    Source§

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

    Mutably dereferences the value.
    Source§

    impl From<EndpointAddr> for EndpointInfo

    Source§

    fn from(addr: EndpointAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl From<EndpointInfo> for EndpointAddr

    Source§

    fn from(value: EndpointInfo) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for EndpointInfo

    Source§

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

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

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

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

    impl Eq for EndpointInfo

    Source§

    impl StructuralPartialEq for EndpointInfo

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

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

    Source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

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

    §

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

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where diff --git a/pr/3907/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html b/pr/3907/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html index 4635c1aa68..a1c3f066cd 100644 --- a/pr/3907/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html +++ b/pr/3907/docs/iroh_relay/endpoint_info/trait.EndpointIdExt.html @@ -1,9 +1,9 @@ EndpointIdExt in iroh_relay::endpoint_info - Rust

    EndpointIdExt

    Trait EndpointIdExt 

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

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

    Expand description

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

    -

    Required Methods§

    Source

    fn to_z32(&self) -> String

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

    -
    Source

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

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

    -

    Dyn Compatibility§

    This trait is not dyn compatible.

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

    Implementations on Foreign Types§

    Source§

    impl EndpointIdExt for EndpointId

    Source§

    fn to_z32(&self) -> String

    Source§

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

    Implementors§

    \ No newline at end of file +

    Required Methods§

    Source

    fn to_z32(&self) -> String

    Encodes a EndpointId in z-base-32 encoding.

    +
    Source

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

    Parses a EndpointId from z-base-32 encoding.

    +

    Dyn Compatibility§

    This trait is not dyn compatible.

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

    Implementations on Foreign Types§

    Source§

    impl EndpointIdExt for EndpointId

    Implementors§

    \ No newline at end of file diff --git a/pr/3907/docs/iroh_relay/index.html b/pr/3907/docs/iroh_relay/index.html index d96050a657..ce4ee4fa97 100644 --- a/pr/3907/docs/iroh_relay/index.html +++ b/pr/3907/docs/iroh_relay/index.html @@ -25,6 +25,6 @@ Tailscale.

    QAD support and expose metrics.

    -

    Re-exports§

    pub use protos::relay::MAX_PACKET_SIZE;

    Modules§

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

    Re-exports§

    pub use protos::relay::MAX_PACKET_SIZE;

    Modules§

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

    Structs§

    PingTracker
    Tracks pings on a single relay connection.
    RelayConfig
    Information on a specific relay server.
    RelayMap
    List of relay server configurations to be used in an iroh endpoint.
    RelayQuicConfig
    Configuration for speaking to the QUIC endpoint on the relay server to do QUIC address discovery.
    \ No newline at end of file diff --git a/pr/3907/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/3907/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html index 439b669f8d..a6e9de41c3 100644 --- a/pr/3907/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html +++ b/pr/3907/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html @@ -2,7 +2,7 @@ Ping([u8; 8]), Pong([u8; 8]), Datagrams { - dst_endpoint_id: EndpointId, + dst_endpoint_id: EndpointId, datagrams: Datagrams, }, }
    Expand description

    Messages that clients send to relays.

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

    Pong([u8; 8])

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

    §

    Datagrams

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

    -

    Fields

    §dst_endpoint_id: EndpointId

    The remote endpoint to relay to.

    +

    Fields

    §dst_endpoint_id: EndpointId

    The remote endpoint to relay to.

    §datagrams: Datagrams

    The datagrams and related metadata to relay.

    Trait Implementations§

    Source§

    impl Clone for ClientToRelayMsg

    Source§

    fn clone(&self) -> ClientToRelayMsg

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

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

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for ClientToRelayMsg

    Source§

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

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

    impl PartialEq for ClientToRelayMsg

    Source§

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

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

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

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

    impl Sink<ClientToRelayMsg> for Client

    Source§

    type Error = SendError

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

    fn poll_ready( diff --git a/pr/3907/docs/iroh_relay/protos/relay/enum.Error.html b/pr/3907/docs/iroh_relay/protos/relay/enum.Error.html index ce30310d53..89174b1966 100644 --- a/pr/3907/docs/iroh_relay/protos/relay/enum.Error.html +++ b/pr/3907/docs/iroh_relay/protos/relay/enum.Error.html @@ -17,7 +17,7 @@ meta: Meta, }, InvalidPublicKey { - source: KeyParsingError, + source: KeyParsingError, meta: Meta, }, InvalidFrame { @@ -39,12 +39,12 @@

    §

    FrameTooLarge

    Fields

    §frame_len: usize
    §meta: Meta

    Captured call-site metadata

    §

    SerDe

    Fields

    §source: Error
    §meta: Meta

    Captured call-site metadata

    §

    FrameTypeError

    Fields

    §meta: Meta

    Captured call-site metadata

    -
    §

    InvalidPublicKey

    Fields

    §source: KeyParsingError
    §meta: Meta

    Captured call-site metadata

    +
    §

    InvalidPublicKey

    Fields

    §meta: Meta

    Captured call-site metadata

    §

    InvalidFrame

    Fields

    §meta: Meta

    Captured call-site metadata

    §

    InvalidFrameType

    Fields

    §frame_type: FrameType
    §meta: Meta

    Captured call-site metadata

    §

    InvalidProtocolMessageEncoding

    Fields

    §source: Utf8Error
    §meta: Meta

    Captured call-site metadata

    §

    TooSmall

    Fields

    §meta: Meta

    Captured call-site metadata

    -

    Trait Implementations§

    Source§

    impl Debug for Error

    Source§

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

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

    impl Display for Error

    Source§

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

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

    impl Error for Error

    Source§

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

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

    fn description(&self) -> &str

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

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

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

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

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

    impl From<Error> for AnyError

    Source§

    fn from(value: Error) -> AnyError

    Converts to this type from the input type.
    Source§

    impl From<Error> for Error

    Source§

    fn from(source: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(source: ProtoError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<FrameTypeError> for Error

    Source§

    fn from(source: FrameTypeError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<KeyParsingError> for Error

    Source§

    fn from(source: KeyParsingError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Utf8Error> for Error

    Source§

    fn from(source: Utf8Error) -> Self

    Converts to this type from the input type.
    Source§

    impl StackError for Error

    Source§

    fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

    Returns this error as a std error reference.
    Source§

    fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>

    Returns this error as a std error.
    Source§

    fn as_dyn(&self) -> &dyn StackError

    Returns this error as a dyn StackError.
    Source§

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

    Returns the next source in the chain, if any.
    Source§

    fn meta(&self) -> Option<&Meta>

    Returns metadata captured at creation time, if available.
    Source§

    fn source(&self) -> Option<ErrorRef<'_>>

    Returns the next source in the chain, if any.
    Source§

    fn is_transparent(&self) -> bool

    Returns whether this error is transparent and should be skipped in reports.
    §

    fn as_ref(&self) -> ErrorRef<'_>

    Returns this error as an [ErrorRef]. Read more
    §

    fn stack(&self) -> Chain<'_>

    Returns an iterator over this error followed by its sources.
    §

    fn sources(&self) -> Chain<'_>

    Returns an iterator over sources of this error (skipping self).
    §

    fn report(&self) -> Report<'_>

    Returns a [Report] to output the error with configurable formatting.

    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

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

    impl Display for Error

    Source§

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

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

    impl Error for Error

    Source§

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

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

    fn description(&self) -> &str

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

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

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

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

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

    impl From<Error> for AnyError

    Source§

    fn from(value: Error) -> AnyError

    Converts to this type from the input type.
    Source§

    impl From<Error> for Error

    Source§

    fn from(source: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(source: ProtoError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<FrameTypeError> for Error

    Source§

    fn from(source: FrameTypeError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<KeyParsingError> for Error

    Source§

    fn from(source: KeyParsingError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Utf8Error> for Error

    Source§

    fn from(source: Utf8Error) -> Self

    Converts to this type from the input type.
    Source§

    impl StackError for Error

    Source§

    fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)

    Returns this error as a std error reference.
    Source§

    fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>

    Returns this error as a std error.
    Source§

    fn as_dyn(&self) -> &dyn StackError

    Returns this error as a dyn StackError.
    Source§

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

    Returns the next source in the chain, if any.
    Source§

    fn meta(&self) -> Option<&Meta>

    Returns metadata captured at creation time, if available.
    Source§

    fn source(&self) -> Option<ErrorRef<'_>>

    Returns the next source in the chain, if any.
    Source§

    fn is_transparent(&self) -> bool

    Returns whether this error is transparent and should be skipped in reports.
    §

    fn as_ref(&self) -> ErrorRef<'_>

    Returns this error as an [ErrorRef]. Read more
    §

    fn stack(&self) -> Chain<'_>

    Returns an iterator over this error followed by its sources.
    §

    fn sources(&self) -> Chain<'_>

    Returns an iterator over sources of this error (skipping self).
    §

    fn report(&self) -> Report<'_>

    Returns a [Report] to output the error with configurable formatting.

    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/3907/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/3907/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html index f1bd810532..717970c2e2 100644 --- a/pr/3907/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html +++ b/pr/3907/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html @@ -1,9 +1,9 @@ RelayToClientMsg in iroh_relay::protos::relay - Rust

    RelayToClientMsg

    Enum RelayToClientMsg 

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

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

    Variants§

    §

    Datagrams

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

    -

    Fields

    §remote_endpoint_id: EndpointId

    The [EndpointId] of the original sender.

    +

    Fields

    §remote_endpoint_id: EndpointId

    The EndpointId of the original sender.

    §datagrams: Datagrams

    The datagrams and related metadata.

    -
    §

    EndpointGone(EndpointId)

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

    §

    EndpointGone(EndpointId)

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

    §

    Health

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

    Fields

    §problem: String

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

    diff --git a/pr/3907/docs/iroh_relay/server/enum.AccessConfig.html b/pr/3907/docs/iroh_relay/server/enum.AccessConfig.html index b036cb5c1b..07ffd3cf09 100644 --- a/pr/3907/docs/iroh_relay/server/enum.AccessConfig.html +++ b/pr/3907/docs/iroh_relay/server/enum.AccessConfig.html @@ -1,10 +1,10 @@ AccessConfig in iroh_relay::server - Rust

    AccessConfig

    Enum AccessConfig 

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

    Controls which endpoints are allowed to use the relay.

    Variants§

    §

    Everyone

    Everyone

    -
    §

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

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

    -

    Implementations§

    Source§

    impl AccessConfig

    Source

    pub async fn is_allowed(&self, endpoint: EndpointId) -> bool

    Is this endpoint allowed?

    +
    §

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

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

    +

    Implementations§

    Source§

    impl AccessConfig

    Source

    pub async fn is_allowed(&self, endpoint: EndpointId) -> bool

    Is this endpoint allowed?

    Trait Implementations§

    Source§

    impl Debug for AccessConfig

    Source§

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

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

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

    Source§

    fn type_id(&self) -> TypeId

    Gets the TypeId of self. Read more
    §

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

    §

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

    §

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

    Source

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

    The socket address the HTTP server is listening on.

    Source

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

    The socket address the QUIC server is listening on.

    Source

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

    The certificates chain if configured with manual TLS certificates.

    -
    Source

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

    Available on crate feature test-utils only.

    Get the server’s https [RelayUrl].

    +
    Source

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

    Available on crate feature test-utils only.

    Get the server’s https RelayUrl.

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

    -
    Source

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

    Available on crate feature test-utils only.

    Get the server’s http [RelayUrl].

    +
    Source

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

    Available on crate feature test-utils only.

    Get the server’s http RelayUrl.

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

    Source

    pub fn metrics(&self) -> &RelayMetrics

    Returns the metrics collected in the relay server.

    Trait Implementations§

    Source§

    impl Debug for Server

    Source§

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

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Server

    §

    impl RefUnwindSafe for Server

    §

    impl Send for Server

    §

    impl Sync for Server

    §

    impl Unpin for Server

    §

    impl UnwindSafe for Server

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where diff --git a/pr/3907/docs/iroh_relay/struct.RelayConfig.html b/pr/3907/docs/iroh_relay/struct.RelayConfig.html index 858e9af02f..f96c2a8c3c 100644 --- a/pr/3907/docs/iroh_relay/struct.RelayConfig.html +++ b/pr/3907/docs/iroh_relay/struct.RelayConfig.html @@ -1,14 +1,14 @@ RelayConfig in iroh_relay - Rust

    RelayConfig

    Struct RelayConfig 

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

    Information on a specific relay server.

    Includes the Url where it can be dialed.

    -

    Fields§

    §url: RelayUrl

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

    +

    Fields§

    §url: RelayUrl

    The RelayUrl where this relay server can be dialed.

    §quic: Option<RelayQuicConfig>

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

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

    Trait Implementations§

    Source§

    impl Clone for RelayConfig

    Source§

    fn clone(&self) -> RelayConfig

    Returns a duplicate 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 RelayConfig

    Source§

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

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

    impl<'de> Deserialize<'de> for RelayConfig

    Source§

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

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

    impl Display for RelayConfig

    Source§

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

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

    impl From<RelayConfig> for RelayMap

    Source§

    fn from(value: RelayConfig) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayConfig

    Source§

    fn from(value: RelayUrl) -> Self

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayConfig> for RelayMap

    Source§

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

    Creates a value from an iterator. Read more
    Source§

    impl Ord for RelayConfig

    Source§

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

    Source§

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

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

    impl From<RelayConfig> for RelayMap

    Source§

    fn from(value: RelayConfig) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayConfig

    Source§

    fn from(value: RelayUrl) -> Self

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayConfig> for RelayMap

    Source§

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

    Creates a value from an iterator. Read more
    Source§

    impl Ord for RelayConfig

    Source§

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

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

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

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

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

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

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

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

    impl PartialEq for RelayConfig

    Source§

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

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

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

    Tests for !=. The default implementation is almost always sufficient, diff --git a/pr/3907/docs/iroh_relay/struct.RelayMap.html b/pr/3907/docs/iroh_relay/struct.RelayMap.html index 053d337bed..54400dc6a2 100644 --- a/pr/3907/docs/iroh_relay/struct.RelayMap.html +++ b/pr/3907/docs/iroh_relay/struct.RelayMap.html @@ -9,34 +9,34 @@ or by creating an empty relay map with let map = RelayMap::from_iter(vec![relay1, relay2]);

    Implementations§

    Source§

    impl RelayMap

    Source

    pub fn empty() -> Self

    Creates an empty relay map.

    Source

    pub fn try_from_iter<'a, T: IntoIterator<Item = &'a str>>( urls: T, -) -> Result<Self, RelayUrlParseError>

    Creates a RelayMap from an iterator.

    +) -> Result<Self, RelayUrlParseError>

    Creates a RelayMap from an iterator.

    The conversion from a URL to a RelayConfig is done the same as when parsing it directly, which means it is assumed to run QUIC on default settings as defined in RelayQuicConfig::default.

    §Example
    let map =
         RelayMap::try_from_iter(["https://relay_0.cool.com", "https://relay_1.cool.com"]).unwrap();
    Source

    pub fn urls<T>(&self) -> T
    where - T: FromIterator<RelayUrl>,

    Returns the URLs of all servers in this relay map.

    + T: FromIterator<RelayUrl>,

    Returns the URLs of all servers in this relay map.

    This function is generic over the container to collect into. If you simply want a list of URLs, call this with map.urls::<Vec<_>>() to get a Vec<RelayUrl>.

    Source

    pub fn relays<T>(&self) -> T

    Returns a list with the RelayConfig for each relay in this relay map.

    This function is generic over the container to collect into. If you simply want a list of URLs, call this with map.relays::<Vec<_>>() to get a Vec<RelayConfig>.

    -
    Source

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

    Returns true if a relay with url is contained in this this relay map.

    -
    Source

    pub fn get(&self, url: &RelayUrl) -> Option<Arc<RelayConfig>>

    Returns the config for a relay.

    +
    Source

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

    Returns true if a relay with url is contained in this this relay map.

    +
    Source

    pub fn get(&self, url: &RelayUrl) -> Option<Arc<RelayConfig>>

    Returns the config for a relay.

    Source

    pub fn len(&self) -> usize

    Returns the number of relays in this relay map.

    Source

    pub fn is_empty(&self) -> bool

    Returns true if this relay map is empty.

    Source

    pub fn insert( &self, - url: RelayUrl, + url: RelayUrl, endpoint: Arc<RelayConfig>, ) -> Option<Arc<RelayConfig>>

    Inserts a new relay into the relay map.

    -
    Source

    pub fn remove(&self, url: &RelayUrl) -> Option<Arc<RelayConfig>>

    Removes an existing relay by its URL.

    +
    Source

    pub fn remove(&self, url: &RelayUrl) -> Option<Arc<RelayConfig>>

    Removes an existing relay by its URL.

    Source

    pub fn extend(&self, other: &RelayMap)

    Extends this RelayMap with another one.

    -

    Trait Implementations§

    Source§

    impl Clone for RelayMap

    Source§

    fn clone(&self) -> RelayMap

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

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

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for RelayMap

    Source§

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

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

    impl Display for RelayMap

    Source§

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

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

    impl From<RelayConfig> for RelayMap

    Source§

    fn from(value: RelayConfig) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayMap

    Source§

    fn from(value: RelayUrl) -> Self

    Creates a RelayMap from a [RelayUrl].

    +

    Trait Implementations§

    Source§

    impl Clone for RelayMap

    Source§

    fn clone(&self) -> RelayMap

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

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

    Performs copy-assignment from source. Read more
    Source§

    impl Debug for RelayMap

    Source§

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

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

    impl Display for RelayMap

    Source§

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

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

    impl From<RelayConfig> for RelayMap

    Source§

    fn from(value: RelayConfig) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayMap

    Source§

    fn from(value: RelayUrl) -> Self

    Creates a RelayMap from a RelayUrl.

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

    -
    Source§

    impl FromIterator<Arc<RelayConfig>> for RelayMap

    Source§

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

    Creates a value from an iterator. Read more
    Source§

    impl FromIterator<RelayConfig> for RelayMap

    Source§

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

    Creates a value from an iterator. Read more
    Source§

    impl FromIterator<RelayUrl> for RelayMap

    Source§

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

    Creates a RelayMap from an iterator of [RelayUrl].

    +
    Source§

    impl FromIterator<Arc<RelayConfig>> for RelayMap

    Source§

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

    Creates a value from an iterator. Read more
    Source§

    impl FromIterator<RelayConfig> for RelayMap

    Source§

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

    Creates a value from an iterator. Read more
    Source§

    impl FromIterator<RelayUrl> for RelayMap

    Source§

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

    Creates a RelayMap from an iterator of RelayUrl.

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

    Source§

    impl PartialEq for RelayMap

    Source§

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

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

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

    Tests for !=. The default implementation is almost always sufficient, diff --git a/pr/3907/docs/trait.impl/core/convert/trait.From.js b/pr/3907/docs/trait.impl/core/convert/trait.From.js index 3702f1f384..ba6044099b 100644 --- a/pr/3907/docs/trait.impl/core/convert/trait.From.js +++ b/pr/3907/docs/trait.impl/core/convert/trait.From.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl From<Infallible> for InvalidSocketAddr"],["impl From<Error> for ConnectWithOptsError"],["impl From<Error> for AnyError"],["impl From<IntoAddressLookupError> for BindError"],["impl From<IntoAddressLookupError> for AnyError"],["impl From<PkarrError> for Error"],["impl From<PkarrError> for AnyError"],["impl From<AlpnError> for AnyError"],["impl From<AuthenticationError> for ConnectingError"],["impl From<AuthenticationError> for AnyError"],["impl From<BindError> for AnyError"],["impl From<ConnectError> for AnyError"],["impl From<ConnectWithOptsError> for ConnectError"],["impl From<ConnectWithOptsError> for AnyError"],["impl From<ConnectingError> for ConnectError"],["impl From<ConnectingError> for AcceptError"],["impl From<ConnectingError> for AnyError"],["impl From<ConnectionError> for AlpnError"],["impl From<ConnectionError> for ConnectError"],["impl From<ConnectionError> for ConnectingError"],["impl From<ConnectionError> for AcceptError"],["impl From<InvalidSocketAddr> for AnyError"],["impl From<ConnectError> for ConnectWithOptsError"],["impl From<RelayMode> for Option<TransportConfig>"],["impl From<AcceptError> for AnyError"],["impl From<AddrParseError> for InvalidSocketAddr"],["impl From<Error> for AcceptError"],["impl From<PrefixLenError> for InvalidSocketAddr"],["impl From<Item> for EndpointInfo"],["impl From<ClosedStream> for AcceptError"],["impl From<RemoteEndpointIdError> for AuthenticationError"],["impl From<RemoteEndpointIdError> for AcceptError"],["impl From<RemoteEndpointIdError> for AnyError"],["impl From<RetryError> for AnyError"],["impl From<TransportAddrInfo> for TransportAddr"],["impl From<AnyError> for AcceptError"],["impl<T> From<T> for ConcurrentAddressLookup
    where\n T: IntoIterator<Item = Box<dyn AddressLookup>>,
    "],["impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>"]]],["iroh_base",[["impl From<KeyParsingError> for AnyError"],["impl From<Url> for RelayUrl"],["impl From<PublicKey> for EndpointAddr"],["impl From<RelayUrl> for Url"],["impl From<RelayUrlParseError> for AnyError"],["impl From<SignatureError> for AnyError"],["impl From<DecodeError> for KeyParsingError"],["impl From<Error> for KeyParsingError"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<ConnectError> for AnyError"],["impl From<DialError> for ConnectError"],["impl From<DialError> for AnyError"],["impl From<RecvError> for AnyError"],["impl From<SendError> for AnyError"],["impl From<DnsError> for DialError"],["impl From<DnsError> for LookupError"],["impl From<DnsError> for AnyError"],["impl From<LookupError> for AnyError"],["impl From<DecodingError> for ParseError"],["impl From<DecodingError> for AnyError"],["impl From<EncodingError> for AnyError"],["impl From<ParseError> for LookupError"],["impl From<ParseError> for AnyError"],["impl From<FrameType> for u32"],["impl From<FrameType> for VarInt"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for AnyError"],["impl From<Error> for ConnectError"],["impl From<Error> for AnyError"],["impl From<Error> for RecvError"],["impl From<Error> for AnyError"],["impl From<Error> for AnyError"],["impl From<SpawnError> for AnyError"],["impl From<SupervisorError> for AnyError"],["impl From<Vec<Box<[u8]>>> for TxtRecordData"],["impl From<Utf8Error> for ParseError"],["impl From<Utf8Error> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for DialError"],["impl From<EndpointInfo> for EndpointAddr"],["impl From<MaxLengthExceededError> for AnyError"],["impl From<RelayConfig> for RelayMap"],["impl From<ConnectError> for Error"],["impl From<ConnectionError> for Error"],["impl From<Elapsed> for DialError"],["impl From<Elapsed> for DnsError"],["impl From<EndpointAddr> for EndpointData"],["impl From<EndpointAddr> for EndpointInfo"],["impl From<Error> for ConnectError"],["impl From<Error> for ConnectError"],["impl From<Error> for DialError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<JoinError> for SupervisorError"],["impl From<KeyParsingError> for Error"],["impl From<RecvError> for Error"],["impl From<RelayUrl> for RelayConfig"],["impl From<RelayUrl> for RelayMap"],["impl From<ResolveError> for DnsError"],["impl<E: StackError + 'static> From<StaggeredError<E>> for AnyError"],["impl<T: AsRef<[u8]>> From<T> for Datagrams"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl From<Infallible> for InvalidSocketAddr"],["impl From<Error> for ConnectWithOptsError"],["impl From<Error> for AnyError"],["impl From<IntoAddressLookupError> for BindError"],["impl From<IntoAddressLookupError> for AnyError"],["impl From<PkarrError> for Error"],["impl From<PkarrError> for AnyError"],["impl From<AlpnError> for AnyError"],["impl From<AuthenticationError> for ConnectingError"],["impl From<AuthenticationError> for AnyError"],["impl From<BindError> for AnyError"],["impl From<ConnectError> for AnyError"],["impl From<ConnectWithOptsError> for ConnectError"],["impl From<ConnectWithOptsError> for AnyError"],["impl From<ConnectingError> for ConnectError"],["impl From<ConnectingError> for AcceptError"],["impl From<ConnectingError> for AnyError"],["impl From<ConnectionError> for AlpnError"],["impl From<ConnectionError> for ConnectError"],["impl From<ConnectionError> for ConnectingError"],["impl From<ConnectionError> for AcceptError"],["impl From<InvalidSocketAddr> for AnyError"],["impl From<ConnectError> for ConnectWithOptsError"],["impl From<RelayMode> for Option<TransportConfig>"],["impl From<AcceptError> for AnyError"],["impl From<AddrParseError> for InvalidSocketAddr"],["impl From<Error> for AcceptError"],["impl From<PrefixLenError> for InvalidSocketAddr"],["impl From<Item> for EndpointInfo"],["impl From<ClosedStream> for AcceptError"],["impl From<RemoteEndpointIdError> for AuthenticationError"],["impl From<RemoteEndpointIdError> for AcceptError"],["impl From<RemoteEndpointIdError> for AnyError"],["impl From<RetryError> for AnyError"],["impl From<TransportAddrInfo> for TransportAddr"],["impl From<AnyError> for AcceptError"],["impl<T> From<T> for ConcurrentAddressLookup
    where\n T: IntoIterator<Item = Box<dyn AddressLookup>>,
    "],["impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>"]]],["iroh_base",[["impl From<KeyParsingError> for AnyError"],["impl From<Url> for RelayUrl"],["impl From<PublicKey> for EndpointAddr"],["impl From<RelayUrl> for Url"],["impl From<RelayUrlParseError> for AnyError"],["impl From<SignatureError> for AnyError"],["impl From<DecodeError> for KeyParsingError"],["impl From<Error> for KeyParsingError"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<KeyParsingError> for Error"],["impl From<ConnectError> for AnyError"],["impl From<DialError> for ConnectError"],["impl From<DialError> for AnyError"],["impl From<RecvError> for AnyError"],["impl From<SendError> for AnyError"],["impl From<DnsError> for DialError"],["impl From<DnsError> for LookupError"],["impl From<DnsError> for AnyError"],["impl From<LookupError> for AnyError"],["impl From<DecodingError> for ParseError"],["impl From<DecodingError> for AnyError"],["impl From<EncodingError> for AnyError"],["impl From<ParseError> for LookupError"],["impl From<ParseError> for AnyError"],["impl From<FrameType> for u32"],["impl From<FrameType> for VarInt"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for AnyError"],["impl From<Error> for ConnectError"],["impl From<Error> for AnyError"],["impl From<Error> for RecvError"],["impl From<Error> for AnyError"],["impl From<Error> for AnyError"],["impl From<SpawnError> for AnyError"],["impl From<SupervisorError> for AnyError"],["impl From<Vec<Box<[u8]>>> for TxtRecordData"],["impl From<Utf8Error> for ParseError"],["impl From<Utf8Error> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for DialError"],["impl From<EndpointAddr> for EndpointData"],["impl From<EndpointAddr> for EndpointInfo"],["impl From<RelayUrl> for RelayConfig"],["impl From<RelayUrl> for RelayMap"],["impl From<EndpointInfo> for EndpointAddr"],["impl From<MaxLengthExceededError> for AnyError"],["impl From<RelayConfig> for RelayMap"],["impl From<ConnectError> for Error"],["impl From<ConnectionError> for Error"],["impl From<Elapsed> for DialError"],["impl From<Elapsed> for DnsError"],["impl From<Error> for ConnectError"],["impl From<Error> for ConnectError"],["impl From<Error> for DialError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<JoinError> for SupervisorError"],["impl From<RecvError> for Error"],["impl From<ResolveError> for DnsError"],["impl<E: StackError + 'static> From<StaggeredError<E>> for AnyError"],["impl<T: AsRef<[u8]>> From<T> for Datagrams"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[15096,3090,18835]} \ No newline at end of file +//{"start":57,"fragment_lengths":[15096,3090,19611]} \ No newline at end of file diff --git a/pr/3907/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/pr/3907/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js index 53eb8f19b7..6823ee20ab 100644 --- a/pr/3907/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js +++ b/pr/3907/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh_relay",[["impl FromIterator<Box<[u8]>> for TxtRecordData"],["impl FromIterator<Arc<RelayConfig>> for RelayMap"],["impl FromIterator<RelayConfig> for RelayMap"],["impl FromIterator<RelayUrl> for RelayMap"]]]]); + var implementors = Object.fromEntries([["iroh_relay",[["impl FromIterator<Box<[u8]>> for TxtRecordData"],["impl FromIterator<Arc<RelayConfig>> for RelayMap"],["impl FromIterator<RelayUrl> for RelayMap"],["impl FromIterator<RelayConfig> for RelayMap"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[1940]} \ No newline at end of file +//{"start":57,"fragment_lengths":[2062]} \ No newline at end of file diff --git a/pr/3907/docs/type.impl/iroh/struct.PublicKey.js b/pr/3907/docs/type.impl/iroh/struct.PublicKey.js index b5d5c4b697..4794fb614c 100644 --- a/pr/3907/docs/type.impl/iroh/struct.PublicKey.js +++ b/pr/3907/docs/type.impl/iroh/struct.PublicKey.js @@ -1,9 +1,9 @@ (function() { - var type_impls = Object.fromEntries([["iroh",[["
    §

    impl AsRef<[u8]> for PublicKey

    §

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

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

    impl Borrow<[u8; 32]> for PublicKey

    §

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

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

    impl Clone for PublicKey

    §

    fn clone(&self) -> PublicKey

    Returns a duplicate 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::EndpointId"],["
    §

    impl Debug for PublicKey

    §

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

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

    impl Deref for PublicKey

    §

    type Target = [u8; 32]

    The resulting type after dereferencing.
    §

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

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

    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::EndpointId"],["
    §

    impl Display for PublicKey

    §

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

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

    impl EndpointIdExt for PublicKey

    Source§

    fn to_z32(&self) -> String

    Encodes a EndpointId in z-base-32 encoding.
    Source§

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

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

    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::EndpointId"],["
    §

    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::EndpointId"],["
    §

    impl Ord for PublicKey

    §

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

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

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

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

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

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

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

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

    impl PartialEq for PublicKey

    §

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

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

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

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

    impl PartialOrd for PublicKey

    §

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

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

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

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

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

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

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

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

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

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

    impl PublicKey

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    \n

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

    Get this public key as a byte array.

    \n

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

    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(\n &self,\n message: &[u8],\n signature: &Signature,\n) -> Result<(), SignatureError>

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

    \n
    §Return
    \n

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

    \n

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

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

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

    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::EndpointId"],["
    §

    impl TryFrom<&[u8]> for PublicKey

    §

    type Error = KeyParsingError

    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::EndpointId"],["
    §

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

    §

    type Error = KeyParsingError

    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::EndpointId"],["
    §

    impl Copy for PublicKey

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

    impl Eq for PublicKey

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

    impl StructuralPartialEq for PublicKey

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

    impl AsRef<[u8]> for PublicKey

    Source§

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

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

    impl Borrow<[u8; 32]> for PublicKey

    Source§

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

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

    impl Clone for PublicKey

    Source§

    fn clone(&self) -> PublicKey

    Returns a duplicate 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::EndpointId"],["
    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::EndpointId"],["
    Source§

    impl Deref for PublicKey

    Source§

    type Target = [u8; 32]

    The resulting type after dereferencing.
    Source§

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

    Dereferences the value.
    ","Deref","iroh::EndpointId"],["
    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::EndpointId"],["
    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::EndpointId"],["
    Source§

    impl EndpointIdExt for PublicKey

    Source§

    fn to_z32(&self) -> String

    Encodes a EndpointId in z-base-32 encoding.
    Source§

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

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

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    Source§

    type Err = KeyParsingError

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

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

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh::EndpointId"],["
    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::EndpointId"],["
    Source§

    impl Ord for PublicKey

    Source§

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

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

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

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

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

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

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

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

    impl PartialEq for PublicKey

    Source§

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

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

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

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

    impl PartialOrd for PublicKey

    Source§

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

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

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

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

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

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

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

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

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

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

    impl PublicKey

    Source

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    \n
    Source

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

    Get this public key as a byte array.

    \n
    Source

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

    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(\n &self,\n message: &[u8],\n signature: &Signature,\n) -> Result<(), SignatureError>

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

    \n
    §Return
    \n

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

    \n
    Source

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

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

    \n
    ",0,"iroh::EndpointId"],["
    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::EndpointId"],["
    Source§

    impl TryFrom<&[u8]> for PublicKey

    Source§

    type Error = KeyParsingError

    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::EndpointId"],["
    Source§

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

    Source§

    type Error = KeyParsingError

    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::EndpointId"],["
    Source§

    impl Copy for PublicKey

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

    impl Eq for PublicKey

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

    impl StructuralPartialEq for PublicKey

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