address-lookup-pkarr-dht only.Expand description
Pkarr based address lookup for iroh, supporting both relay servers and the DHT.
+Module dht
address-lookup-pkarr-dht only.Expand description
Pkarr based address lookup for iroh, supporting both relay servers and the DHT.
This module contains pkarr-based address lookup for iroh which can use both pkarr relay servers as well as the Mainline DHT directly. See the pkarr module for an overview of pkarr.
diff --git a/pr/4130/docs/iroh/address_lookup/pkarr/dht/struct.Builder.html b/pr/4130/docs/iroh/address_lookup/pkarr/dht/struct.Builder.html index 9115fe276e..25b36119ae 100644 --- a/pr/4130/docs/iroh/address_lookup/pkarr/dht/struct.Builder.html +++ b/pr/4130/docs/iroh/address_lookup/pkarr/dht/struct.Builder.html @@ -1,12 +1,12 @@ -Builder
pub struct Builder { /* private fields */ }address-lookup-pkarr-dht only.Expand description
Builder for DhtAddressLookup.
Builder
pub struct Builder { /* private fields */ }address-lookup-pkarr-dht only.Expand description
Builder for DhtAddressLookup.
By default, publishing to the DHT is enabled, and relay publishing is disabled.
-Implementations§
Source§impl Builder
impl Builder
Sourcepub fn dht_builder(self, builder: DhtBuilder) -> Self
pub fn dht_builder(self, builder: DhtBuilder) -> Self
Explicitly sets the DHT builder to use.
-Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
pub fn secret_key(self, secret_key: SecretKey) -> Self
Sets the secret key to use for signing the DNS packets.
+Implementations§
Source§impl Builder
impl Builder
Sourcepub fn dht_builder(self, builder: DhtBuilder) -> Self
pub fn dht_builder(self, builder: DhtBuilder) -> Self
Explicitly sets the DHT builder to use.
+Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
pub fn secret_key(self, secret_key: SecretKey) -> Self
Sets the secret key to use for signing the DNS packets.
Without a secret key, the endpoint will not publish its address to the DHT.
-Sourcepub fn republish_delay(self, republish_delay: Duration) -> Self
pub fn republish_delay(self, republish_delay: Duration) -> Self
Sets the republish delay for the DHT.
-Sourcepub fn no_publish(self) -> Self
pub fn no_publish(self) -> Self
Disables publishing even if a secret key is set.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
pub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the DHT.
+Sourcepub fn republish_delay(self, republish_delay: Duration) -> Self
pub fn republish_delay(self, republish_delay: Duration) -> Self
Sets the republish delay for the DHT.
+Sourcepub fn no_publish(self) -> Self
pub fn no_publish(self) -> Self
Disables publishing even if a secret key is set.
+Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
pub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the DHT.
By default AddrFilter::relay_only is used. This avoids leaking IP addresses
to the public DHT.
It can be useful to override this with AddrFilter::unfiltered, if this is
@@ -14,11 +14,11 @@ not a concern, e.g. when this endpoint runs on a machine with public IP
addresses and without a firewall. In such cases connecting to this endpoint
with just an EndpointId and DHT lookup can become faster and potentially
even bypass a relay connection entirely.
Sourcepub fn build(self) -> Result<DhtAddressLookup, AddressLookupBuilderError>
pub fn build(self) -> Result<DhtAddressLookup, AddressLookupBuilderError>
Builds the address lookup mechanism.
-Trait Implementations§
Source§impl AddressLookupBuilder for Builder
impl AddressLookupBuilder for Builder
Sourcepub fn build(self) -> Result<DhtAddressLookup, AddressLookupBuilderError>
pub fn build(self) -> Result<DhtAddressLookup, AddressLookupBuilderError>
Builds the address lookup mechanism.
+Trait Implementations§
Source§impl AddressLookupBuilder for Builder
impl AddressLookupBuilder for Builder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
fn into_address_lookup( self, endpoint: &Endpoint, -) -> Result<impl AddressLookup, AddressLookupBuilderError>
AddressLookup. Read moreAuto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
AddressLookup. Read moreAuto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/pkarr/dht/struct.DhtAddressLookup.html b/pr/4130/docs/iroh/address_lookup/pkarr/dht/struct.DhtAddressLookup.html
index e1fdb2e39f..0e8045b609 100644
--- a/pr/4130/docs/iroh/address_lookup/pkarr/dht/struct.DhtAddressLookup.html
+++ b/pr/4130/docs/iroh/address_lookup/pkarr/dht/struct.DhtAddressLookup.html
@@ -1,4 +1,4 @@
-DhtAddressLookup in iroh::address_lookup::pkarr::dht - Rust DhtAddressLookup
pub struct DhtAddressLookup(/* private fields */);
Available on crate feature address-lookup-pkarr-dht only.Expand description
Pkarr Mainline DHT and relay server address lookup.
+DhtAddressLookup in iroh::address_lookup::pkarr::dht - Rust DhtAddressLookup
pub struct DhtAddressLookup(/* private fields */);
Available on crate feature address-lookup-pkarr-dht only.Expand description
Pkarr Mainline DHT and relay server address lookup.
It stores endpoint addresses in DNS records, signed by the endpoint’s private key, and publishes
them to the BitTorrent Mainline DHT. See the pkarr module for more details.
This implements the AddressLookup trait to be used as an address lookup service which can
@@ -8,11 +8,11 @@ a background task that periodically publishes the endpoint address.
To change this behavior, use Builder::addr_filter and set it to e.g. AddrFilter::unfiltered.
This can be useful to enable publishing IP addresses if the iroh endpoint is reachable via public
IP addresses.
-Implementations§
Source§impl DhtAddressLookup
Sourcepub fn builder() -> Builder
Creates a new builder for DhtAddressLookup.
-Trait Implementations§
Source§impl AddressLookup for DhtAddressLookup
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreImplementations§
Source§impl DhtAddressLookup
Sourcepub fn builder() -> Builder
Creates a new builder for DhtAddressLookup.
+Trait Implementations§
Source§impl AddressLookup for DhtAddressLookup
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§impl Clone for DhtAddressLookup
Source§fn clone(&self) -> DhtAddressLookup
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for DhtAddressLookup
§impl !RefUnwindSafe for DhtAddressLookup
§impl Send for DhtAddressLookup
§impl Sync for DhtAddressLookup
§impl Unpin for DhtAddressLookup
§impl !UnwindSafe for DhtAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
Source§impl Clone for DhtAddressLookup
Source§fn clone(&self) -> DhtAddressLookup
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for DhtAddressLookup
§impl !RefUnwindSafe for DhtAddressLookup
§impl Send for DhtAddressLookup
§impl Sync for DhtAddressLookup
§impl Unpin for DhtAddressLookup
§impl !UnwindSafe for DhtAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html b/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
index 127130b388..ef47f73ff6 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::address_lookup - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::address_lookup - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
index e1efffe9a1..c16dd4e4dc 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::address_lookup - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::address_lookup - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
index 5a6fd98d5b..f35b6d4c7a 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.Item.html b/pr/4130/docs/iroh/address_lookup/struct.Item.html
index 565b81a5bf..d89f07267d 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.Item.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.Item.html
@@ -19,14 +19,14 @@ this item.
Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl From<Item> for EndpointInfo
Source§impl Eq for Item
Source§impl StructuralPartialEq for Item
Auto Trait Implementations§
§impl Freeze for Item
§impl RefUnwindSafe for Item
§impl Send for Item
§impl Sync for Item
§impl Unpin for Item
§impl UnwindSafe for Item
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/address_lookup/struct.UserData.html b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
index a81260d87c..c0c95fdc7e 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.UserData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
index ddef7032ea..0d853d8d69 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index f6b49a084f..9f0b54a832 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup.
If an error is returned, building the endpoint will fail with this error.
-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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
+ 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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/all.html b/pr/4130/docs/iroh/all.html
index 177b975241..578204bf54 100644
--- a/pr/4130/docs/iroh/all.html
+++ b/pr/4130/docs/iroh/all.html
@@ -1 +1 @@
-List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- endpoint_info::EndpointIdExt
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
+List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/index.html b/pr/4130/docs/iroh/endpoint_info/index.html
index 65f5734b45..5839b3e3b6 100644
--- a/pr/4130/docs/iroh/endpoint_info/index.html
+++ b/pr/4130/docs/iroh/endpoint_info/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
+iroh::endpoint_info - Rust Module endpoint_info
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:
@@ -31,5 +31,4 @@ Each address is an IPv4 or IPv6 address with a port.
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
\ No newline at end of file
+typically used by AddressLookup services in iroh before publishing.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§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
index faf46b0afe..14f0d3325a 100644
--- a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
+++ b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"],"trait":["EndpointIdExt"]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"]};
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
index 7ecacbf149..99c04d010e 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
index 02ec43ac7e..5265f71918 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::endpoint_info - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
index 9fdbdf1dc3..cd2cb0fdf7 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
DhtAddressLookup
pub struct DhtAddressLookup(/* private fields */);address-lookup-pkarr-dht only.Expand description
Pkarr Mainline DHT and relay server address lookup.
+DhtAddressLookup
pub struct DhtAddressLookup(/* private fields */);address-lookup-pkarr-dht only.Expand description
Pkarr Mainline DHT and relay server address lookup.
It stores endpoint addresses in DNS records, signed by the endpoint’s private key, and publishes them to the BitTorrent Mainline DHT. See the pkarr module for more details.
This implements the AddressLookup trait to be used as an address lookup service which can
@@ -8,11 +8,11 @@ a background task that periodically publishes the endpoint address.
Builder::addr_filter and set it to e.g. AddrFilter::unfiltered.
This can be useful to enable publishing IP addresses if the iroh endpoint is reachable via public
IP addresses.
-Implementations§
Source§impl DhtAddressLookup
impl DhtAddressLookup
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder for DhtAddressLookup.
Trait Implementations§
Source§impl AddressLookup for DhtAddressLookup
impl AddressLookup for DhtAddressLookup
Source§fn publish(&self, data: &EndpointData)
fn publish(&self, data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreImplementations§
Source§impl DhtAddressLookup
impl DhtAddressLookup
Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder for DhtAddressLookup.
Trait Implementations§
Source§impl AddressLookup for DhtAddressLookup
impl AddressLookup for DhtAddressLookup
Source§fn publish(&self, data: &EndpointData)
fn publish(&self, data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreSource§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
fn resolve( &self, endpoint_id: EndpointId, -) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§impl Clone for DhtAddressLookup
impl Clone for DhtAddressLookup
Source§fn clone(&self) -> DhtAddressLookup
fn clone(&self) -> DhtAddressLookup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DhtAddressLookup
impl !RefUnwindSafe for DhtAddressLookup
impl Send for DhtAddressLookup
impl Sync for DhtAddressLookup
impl Unpin for DhtAddressLookup
impl !UnwindSafe for DhtAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
impl<T> AddressLookupBuilder for T
Source§impl Clone for DhtAddressLookup
impl Clone for DhtAddressLookup
Source§fn clone(&self) -> DhtAddressLookup
fn clone(&self) -> DhtAddressLookup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DhtAddressLookup
impl !RefUnwindSafe for DhtAddressLookup
impl Send for DhtAddressLookup
impl Sync for DhtAddressLookup
impl Unpin for DhtAddressLookup
impl !UnwindSafe for DhtAddressLookup
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html b/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
index 127130b388..ef47f73ff6 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::address_lookup - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::address_lookup - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
index e1efffe9a1..c16dd4e4dc 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::address_lookup - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::address_lookup - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
index 5a6fd98d5b..f35b6d4c7a 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.Item.html b/pr/4130/docs/iroh/address_lookup/struct.Item.html
index 565b81a5bf..d89f07267d 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.Item.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.Item.html
@@ -19,14 +19,14 @@ this item.
Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl From<Item> for EndpointInfo
Source§impl Eq for Item
Source§impl StructuralPartialEq for Item
Auto Trait Implementations§
§impl Freeze for Item
§impl RefUnwindSafe for Item
§impl Send for Item
§impl Sync for Item
§impl Unpin for Item
§impl UnwindSafe for Item
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/address_lookup/struct.UserData.html b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
index a81260d87c..c0c95fdc7e 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.UserData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
index ddef7032ea..0d853d8d69 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index f6b49a084f..9f0b54a832 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup.
If an error is returned, building the endpoint will fail with this error.
-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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
+ 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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/all.html b/pr/4130/docs/iroh/all.html
index 177b975241..578204bf54 100644
--- a/pr/4130/docs/iroh/all.html
+++ b/pr/4130/docs/iroh/all.html
@@ -1 +1 @@
-List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- endpoint_info::EndpointIdExt
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
+List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/index.html b/pr/4130/docs/iroh/endpoint_info/index.html
index 65f5734b45..5839b3e3b6 100644
--- a/pr/4130/docs/iroh/endpoint_info/index.html
+++ b/pr/4130/docs/iroh/endpoint_info/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
+iroh::endpoint_info - Rust Module endpoint_info
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:
@@ -31,5 +31,4 @@ Each address is an IPv4 or IPv6 address with a port.
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
\ No newline at end of file
+typically used by AddressLookup services in iroh before publishing.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§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
index faf46b0afe..14f0d3325a 100644
--- a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
+++ b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"],"trait":["EndpointIdExt"]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"]};
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
index 7ecacbf149..99c04d010e 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
index 02ec43ac7e..5265f71918 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::endpoint_info - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
index 9fdbdf1dc3..cd2cb0fdf7 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html b/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
index 127130b388..ef47f73ff6 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::address_lookup - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::address_lookup - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
index e1efffe9a1..c16dd4e4dc 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::address_lookup - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::address_lookup - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
index 5a6fd98d5b..f35b6d4c7a 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.Item.html b/pr/4130/docs/iroh/address_lookup/struct.Item.html
index 565b81a5bf..d89f07267d 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.Item.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.Item.html
@@ -19,14 +19,14 @@ this item.
Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl From<Item> for EndpointInfo
Source§impl Eq for Item
Source§impl StructuralPartialEq for Item
Auto Trait Implementations§
§impl Freeze for Item
§impl RefUnwindSafe for Item
§impl Send for Item
§impl Sync for Item
§impl Unpin for Item
§impl UnwindSafe for Item
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/address_lookup/struct.UserData.html b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
index a81260d87c..c0c95fdc7e 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.UserData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
index ddef7032ea..0d853d8d69 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index f6b49a084f..9f0b54a832 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup.
If an error is returned, building the endpoint will fail with this error.
-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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
+ 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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/all.html b/pr/4130/docs/iroh/all.html
index 177b975241..578204bf54 100644
--- a/pr/4130/docs/iroh/all.html
+++ b/pr/4130/docs/iroh/all.html
@@ -1 +1 @@
-List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- endpoint_info::EndpointIdExt
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
+List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/index.html b/pr/4130/docs/iroh/endpoint_info/index.html
index 65f5734b45..5839b3e3b6 100644
--- a/pr/4130/docs/iroh/endpoint_info/index.html
+++ b/pr/4130/docs/iroh/endpoint_info/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
+iroh::endpoint_info - Rust Module endpoint_info
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:
@@ -31,5 +31,4 @@ Each address is an IPv4 or IPv6 address with a port.
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
\ No newline at end of file
+typically used by AddressLookup services in iroh before publishing.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§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
index faf46b0afe..14f0d3325a 100644
--- a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
+++ b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"],"trait":["EndpointIdExt"]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"]};
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
index 7ecacbf149..99c04d010e 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
index 02ec43ac7e..5265f71918 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::endpoint_info - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
index 9fdbdf1dc3..cd2cb0fdf7 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
AddrFilter
pub struct AddrFilter(/* private fields */);Expand description
A filter and/or reordering function applied to transport addresses, +
AddrFilter
pub struct AddrFilter(/* private fields */);Expand description
A filter and/or reordering function applied to transport addresses, typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
impl AddrFilter
Implementations§
Source§impl AddrFilter
impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
pub fn new( f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static, ) -> AddrFilter
Create a new AddrFilter
Sourcepub fn unfiltered() -> AddrFilter
pub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
pub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
pub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
pub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
pub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
pub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
pub fn apply<'a>( &self, addrs: &'a Vec<TransportAddr>, ) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
fn clone(&self) -> AddrFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AddrFilter
impl Debug for AddrFilter
Source§impl Default for AddrFilter
impl Default for AddrFilter
Source§fn default() -> AddrFilter
fn default() -> AddrFilter
Auto Trait Implementations§
impl Freeze for AddrFilter
impl !RefUnwindSafe for AddrFilter
impl Send for AddrFilter
impl Sync for AddrFilter
impl Unpin for AddrFilter
impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
fn clone(&self) -> AddrFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AddrFilter
impl Debug for AddrFilter
Source§impl Default for AddrFilter
impl Default for AddrFilter
Source§fn default() -> AddrFilter
fn default() -> AddrFilter
Auto Trait Implementations§
impl Freeze for AddrFilter
impl !RefUnwindSafe for AddrFilter
impl Send for AddrFilter
impl Sync for AddrFilter
impl Unpin for AddrFilter
impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
index e1efffe9a1..c16dd4e4dc 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::address_lookup - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::address_lookup - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
index 5a6fd98d5b..f35b6d4c7a 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.Item.html b/pr/4130/docs/iroh/address_lookup/struct.Item.html
index 565b81a5bf..d89f07267d 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.Item.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.Item.html
@@ -19,14 +19,14 @@ this item.
Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl From<Item> for EndpointInfo
Source§impl Eq for Item
Source§impl StructuralPartialEq for Item
Auto Trait Implementations§
§impl Freeze for Item
§impl RefUnwindSafe for Item
§impl Send for Item
§impl Sync for Item
§impl Unpin for Item
§impl UnwindSafe for Item
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/address_lookup/struct.UserData.html b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
index a81260d87c..c0c95fdc7e 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.UserData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
index ddef7032ea..0d853d8d69 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index f6b49a084f..9f0b54a832 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup.
If an error is returned, building the endpoint will fail with this error.
-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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
+ 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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/all.html b/pr/4130/docs/iroh/all.html
index 177b975241..578204bf54 100644
--- a/pr/4130/docs/iroh/all.html
+++ b/pr/4130/docs/iroh/all.html
@@ -1 +1 @@
-List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- endpoint_info::EndpointIdExt
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
+List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/index.html b/pr/4130/docs/iroh/endpoint_info/index.html
index 65f5734b45..5839b3e3b6 100644
--- a/pr/4130/docs/iroh/endpoint_info/index.html
+++ b/pr/4130/docs/iroh/endpoint_info/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
+iroh::endpoint_info - Rust Module endpoint_info
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:
@@ -31,5 +31,4 @@ Each address is an IPv4 or IPv6 address with a port.
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
\ No newline at end of file
+typically used by AddressLookup services in iroh before publishing.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§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
index faf46b0afe..14f0d3325a 100644
--- a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
+++ b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"],"trait":["EndpointIdExt"]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"]};
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
index 7ecacbf149..99c04d010e 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
index 02ec43ac7e..5265f71918 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::endpoint_info - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
index 9fdbdf1dc3..cd2cb0fdf7 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
EndpointData
pub struct EndpointData { /* private fields */ }Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData
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
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
impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
pub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
Implementations§
Source§impl EndpointData
impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
pub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
pub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
pub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
pub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
pub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
pub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
pub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
pub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
pub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
pub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
pub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
pub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
pub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
pub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
pub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
pub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
pub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
pub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
pub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
pub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
pub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
pub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl Clone for EndpointData
impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
fn clone(&self) -> EndpointData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EndpointData
impl Debug for EndpointData
Source§impl Default for EndpointData
impl Default for EndpointData
Source§fn default() -> EndpointData
fn default() -> EndpointData
Source§impl From<BTreeSet<SocketAddr>> for EndpointData
impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Source§impl From<BTreeSet<TransportAddr>> for EndpointData
impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Source§impl From<EndpointAddr> for EndpointData
impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
fn from(endpoint_addr: EndpointAddr) -> EndpointData
Source§impl FromIterator<TransportAddr> for EndpointData
impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Source§impl PartialEq for EndpointData
impl PartialEq for EndpointData
impl Eq for EndpointData
impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
impl Freeze for EndpointData
impl RefUnwindSafe for EndpointData
impl Send for EndpointData
impl Sync for EndpointData
impl Unpin for EndpointData
impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
pub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl Clone for EndpointData
impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
fn clone(&self) -> EndpointData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EndpointData
impl Debug for EndpointData
Source§impl Default for EndpointData
impl Default for EndpointData
Source§fn default() -> EndpointData
fn default() -> EndpointData
Source§impl From<BTreeSet<SocketAddr>> for EndpointData
impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Source§impl From<BTreeSet<TransportAddr>> for EndpointData
impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Source§impl From<EndpointAddr> for EndpointData
impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
fn from(endpoint_addr: EndpointAddr) -> EndpointData
Source§impl FromIterator<TransportAddr> for EndpointData
impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Source§impl PartialEq for EndpointData
impl PartialEq for EndpointData
impl Eq for EndpointData
impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
impl Freeze for EndpointData
impl RefUnwindSafe for EndpointData
impl Send for EndpointData
impl Sync for EndpointData
impl Unpin for EndpointData
impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
index 5a6fd98d5b..f35b6d4c7a 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/struct.Item.html b/pr/4130/docs/iroh/address_lookup/struct.Item.html
index 565b81a5bf..d89f07267d 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.Item.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.Item.html
@@ -19,14 +19,14 @@ this item.
Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::address_lookup - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
fn clone(&self) -> EndpointInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EndpointInfo
impl Debug for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> EndpointInfo
fn from(addr: EndpointAddr) -> EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> EndpointAddr
fn from(value: EndpointInfo) -> EndpointAddr
Source§impl From<Item> for EndpointInfo
impl From<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
impl PartialEq for EndpointInfo
impl Eq for EndpointInfo
impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
impl Freeze for EndpointInfo
impl RefUnwindSafe for EndpointInfo
impl Send for EndpointInfo
impl Sync for EndpointInfo
impl Unpin for EndpointInfo
impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit( diff --git a/pr/4130/docs/iroh/address_lookup/struct.Item.html b/pr/4130/docs/iroh/address_lookup/struct.Item.html index 565b81a5bf..d89f07267d 100644 --- a/pr/4130/docs/iroh/address_lookup/struct.Item.html +++ b/pr/4130/docs/iroh/address_lookup/struct.Item.html @@ -19,14 +19,14 @@ this item.
Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
pub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
pub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
pub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
pub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
pub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
pub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Methods from Deref<Target = EndpointData>§
Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
pub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
pub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
pub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
pub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
pub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
pub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl From<Item> for EndpointInfo
impl From<Item> for EndpointInfo
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/address_lookup/struct.UserData.html b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
index a81260d87c..c0c95fdc7e 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.UserData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
index ddef7032ea..0d853d8d69 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index f6b49a084f..9f0b54a832 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup.
If an error is returned, building the endpoint will fail with this error.
-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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
+ 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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/all.html b/pr/4130/docs/iroh/all.html
index 177b975241..578204bf54 100644
--- a/pr/4130/docs/iroh/all.html
+++ b/pr/4130/docs/iroh/all.html
@@ -1 +1 @@
-List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- endpoint_info::EndpointIdExt
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
+List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/index.html b/pr/4130/docs/iroh/endpoint_info/index.html
index 65f5734b45..5839b3e3b6 100644
--- a/pr/4130/docs/iroh/endpoint_info/index.html
+++ b/pr/4130/docs/iroh/endpoint_info/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
+iroh::endpoint_info - Rust Module endpoint_info
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:
@@ -31,5 +31,4 @@ Each address is an IPv4 or IPv6 address with a port.
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
\ No newline at end of file
+typically used by AddressLookup services in iroh before publishing.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§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
index faf46b0afe..14f0d3325a 100644
--- a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
+++ b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"],"trait":["EndpointIdExt"]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"]};
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
index 7ecacbf149..99c04d010e 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
index 02ec43ac7e..5265f71918 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::endpoint_info - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
index 9fdbdf1dc3..cd2cb0fdf7 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/address_lookup/struct.UserData.html b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
index a81260d87c..c0c95fdc7e 100644
--- a/pr/4130/docs/iroh/address_lookup/struct.UserData.html
+++ b/pr/4130/docs/iroh/address_lookup/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::address_lookup - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
index ddef7032ea..0d853d8d69 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html
@@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
+) -> Option<BoxStream<Result<Item, Error>>>Implementors§
Source§impl AddressLookup for DnsAddressLookup
Available on non-wasm_browser only. Source§impl AddressLookup for MdnsAddressLookup
Available on crate feature address-lookup-mdns only. Source§impl AddressLookup for MemoryLookup
Source§impl AddressLookup for DhtAddressLookup
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookup for PkarrPublisher
Source§impl AddressLookup for PkarrResolver
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index f6b49a084f..9f0b54a832 100644
--- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
@@ -20,5 +20,5 @@ endpoint to Endpoint,
) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup.
If an error is returned, building the endpoint will fail with this error.
-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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
+ 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.
Implementors§
Source§impl AddressLookupBuilder for DnsAddressLookupBuilder
Available on non-wasm_browser only. Source§impl AddressLookupBuilder for MdnsAddressLookupBuilder
Available on crate feature address-lookup-mdns only. Source§impl AddressLookupBuilder for Builder
Available on crate feature address-lookup-pkarr-dht only. Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/all.html b/pr/4130/docs/iroh/all.html
index 177b975241..578204bf54 100644
--- a/pr/4130/docs/iroh/all.html
+++ b/pr/4130/docs/iroh/all.html
@@ -1 +1 @@
-List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- endpoint_info::EndpointIdExt
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
+List of all items in this crate All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/index.html b/pr/4130/docs/iroh/endpoint_info/index.html
index 65f5734b45..5839b3e3b6 100644
--- a/pr/4130/docs/iroh/endpoint_info/index.html
+++ b/pr/4130/docs/iroh/endpoint_info/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint_info - Rust Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
+iroh::endpoint_info - Rust Module endpoint_info
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:
@@ -31,5 +31,4 @@ Each address is an IPv4 or IPv6 address with a port.
Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses,
-typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
ExceededError - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTH bytes.
Enums§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
\ No newline at end of file
+typically used by AddressLookup services in iroh before publishing.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§
Constants§
- IROH_
TXT_NAME - The DNS name for the iroh TXT record.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
index faf46b0afe..14f0d3325a 100644
--- a/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
+++ b/pr/4130/docs/iroh/endpoint_info/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"],"trait":["EndpointIdExt"]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["EncodingError","ParseError"],"struct":["AddrFilter","EndpointData","EndpointInfo","MaxLengthExceededError","UserData"]};
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
index 7ecacbf149..99c04d010e 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.AddrFilter.html
@@ -1,4 +1,4 @@
-AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
+
AddrFilter in iroh::endpoint_info - Rust AddrFilter
pub struct AddrFilter(/* private fields */);
Expand description
A filter and/or reordering function applied to transport addresses,
typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on
what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
Implementations§
Source§impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
Create a new AddrFilter
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for AddrFilter
Source§impl Default for AddrFilter
Source§fn default() -> AddrFilter
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for AddrFilter
§impl !RefUnwindSafe for AddrFilter
§impl Send for AddrFilter
§impl Sync for AddrFilter
§impl Unpin for AddrFilter
§impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
index 02ec43ac7e..5265f71918 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::endpoint_info - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
index 9fdbdf1dc3..cd2cb0fdf7 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
UserData
pub struct UserData(/* private fields */);Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
UserData
pub struct UserData(/* private fields */);Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
Implementations§
Source§impl UserData
impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
pub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
pub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
impl Ord for UserData
Source§impl PartialOrd for UserData
impl PartialOrd for UserData
impl Eq for UserData
impl StructuralPartialEq for UserData
Auto Trait Implementations§
impl Freeze for UserData
impl RefUnwindSafe for UserData
impl Send for UserData
impl Sync for UserData
impl Unpin for UserData
impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
impl Freeze for UserData
impl RefUnwindSafe for UserData
impl Send for UserData
impl Sync for UserData
impl Unpin for UserData
impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit( diff --git a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html index ddef7032ea..0d853d8d69 100644 --- a/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html +++ b/pr/4130/docs/iroh/address_lookup/trait.AddressLookup.html @@ -34,4 +34,4 @@ work.
Implementations on Foreign Types§
Source§impl<T: AddressLookup> AddressLookup for Arc<T>
impl<T: AddressLookup> AddressLookup for Arc<T>
Implementors§
impl AddressLookup for DnsAddressLookup
wasm_browser only.impl AddressLookup for MdnsAddressLookup
address-lookup-mdns only.impl AddressLookup for MemoryLookup
impl AddressLookup for DhtAddressLookup
address-lookup-pkarr-dht only.impl AddressLookup for PkarrPublisher
impl AddressLookup for PkarrResolver
impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
Implementors§
impl AddressLookup for DnsAddressLookup
wasm_browser only.impl AddressLookup for MdnsAddressLookup
address-lookup-mdns only.impl AddressLookup for MemoryLookup
impl AddressLookup for DhtAddressLookup
address-lookup-pkarr-dht only.impl AddressLookup for PkarrPublisher
impl AddressLookup for PkarrResolver
impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
Turns this builder into a ready-to-use AddressLookup.
If an error is returned, building the endpoint will fail with this error.
-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.
Implementors§
impl AddressLookupBuilder for DnsAddressLookupBuilder
wasm_browser only.impl AddressLookupBuilder for MdnsAddressLookupBuilder
address-lookup-mdns only.impl AddressLookupBuilder for Builder
address-lookup-pkarr-dht only.impl AddressLookupBuilder for PkarrPublisherBuilder
impl AddressLookupBuilder for PkarrResolverBuilder
impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
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.
Implementors§
impl AddressLookupBuilder for DnsAddressLookupBuilder
wasm_browser only.impl AddressLookupBuilder for MdnsAddressLookupBuilder
address-lookup-mdns only.impl AddressLookupBuilder for Builder
address-lookup-pkarr-dht only.impl AddressLookupBuilder for PkarrPublisherBuilder
impl AddressLookupBuilder for PkarrResolverBuilder
impl<T: AddressLookup> AddressLookupBuilder for T
Blanket no-op impl of AddressLookupBuilder for T: AddressLookup.
All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- endpoint_info::EndpointIdExt
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
All
List of all items
Structs
- EndpointAddr
- NetReport
- PublicKey
- RelayConfig
- RelayMap
- RelayUrl
- RelayUrlParseError
- SecretKey
- Signature
- SignatureError
- address_lookup::AddrFilter
- address_lookup::AddressLookupServices
- address_lookup::EndpointData
- address_lookup::EndpointInfo
- address_lookup::Error
- address_lookup::FilteredAddressLookup
- address_lookup::Item
- address_lookup::UserData
- address_lookup::dns::DnsAddressLookup
- address_lookup::dns::DnsAddressLookupBuilder
- address_lookup::mdns::MdnsAddressLookup
- address_lookup::mdns::MdnsAddressLookupBuilder
- address_lookup::memory::MemoryLookup
- address_lookup::pkarr::PkarrPublisher
- address_lookup::pkarr::PkarrPublisherBuilder
- address_lookup::pkarr::PkarrRelayClient
- address_lookup::pkarr::PkarrRelayClientBuilder
- address_lookup::pkarr::PkarrResolver
- address_lookup::pkarr::PkarrResolverBuilder
- address_lookup::pkarr::dht::Builder
- address_lookup::pkarr::dht::DhtAddressLookup
- dns::Builder
- dns::DnsResolver
- dns::StaggeredError
- dns::TxtRecordData
- endpoint::Accept
- endpoint::AcceptBi
- endpoint::AcceptUni
- endpoint::Accepting
- endpoint::AckFrequencyConfig
- endpoint::ApplicationClose
- endpoint::BindOpts
- endpoint::Builder
- endpoint::Chunk
- endpoint::ClosedStream
- endpoint::ConnectOptions
- endpoint::Connecting
- endpoint::Connection
- endpoint::ConnectionClose
- endpoint::ConnectionInfo
- endpoint::ConnectionStats
- endpoint::ControllerMetrics
- endpoint::CryptoError
- endpoint::DecryptedInitial
- endpoint::DirectAddr
- endpoint::Endpoint
- endpoint::EndpointClosed
- endpoint::ExportKeyingMaterialError
- endpoint::FrameStats
- endpoint::HandshakeCompleted
- endpoint::IdleTimeout
- endpoint::Incoming
- endpoint::IncomingAlpns
- endpoint::IncomingZeroRtt
- endpoint::Keys
- endpoint::MtuDiscoveryConfig
- endpoint::OpenBi
- endpoint::OpenUni
- endpoint::OutgoingZeroRtt
- endpoint::PathId
- endpoint::PathInfo
- endpoint::PathInfoList
- endpoint::PathInfoListIter
- endpoint::PathStats
- endpoint::PathWatcher
- endpoint::QlogConfig
- endpoint::QlogFileFactory
- endpoint::QuicTransportConfig
- endpoint::QuicTransportConfigBuilder
- endpoint::ReadDatagram
- endpoint::RecvStream
- endpoint::RemoteEndpointIdError
- endpoint::RemoteInfo
- endpoint::RetryError
- endpoint::RttEstimator
- endpoint::SendDatagram
- endpoint::SendStream
- endpoint::ServerConfig
- endpoint::ServerConfigBuilder
- endpoint::StreamId
- endpoint::TokenReuseError
- endpoint::TransportAddrInfo
- endpoint::TransportError
- endpoint::TransportErrorCode
- endpoint::TransportParameters
- endpoint::UdpStats
- endpoint::UnorderedRecvStream
- endpoint::UnsupportedVersion
- endpoint::ValidationTokenConfig
- endpoint::VarInt
- endpoint::VarIntBoundsExceeded
- endpoint::Written
- endpoint::presets::Empty
- endpoint::presets::Minimal
- endpoint::presets::N0
- endpoint::presets::N0DisableRelay
- endpoint::transports::Transmit
- endpoint::transports::TransportBias
- endpoint_info::AddrFilter
- endpoint_info::EndpointData
- endpoint_info::EndpointInfo
- endpoint_info::MaxLengthExceededError
- endpoint_info::UserData
- metrics::EndpointMetrics
- metrics::NetReportMetrics
- metrics::PortmapMetrics
- metrics::RelayMetrics
- metrics::SocketMetrics
- protocol::AccessLimit
- protocol::Router
- protocol::RouterBuilder
- test_utils::CleanupDropGuard
- test_utils::DnsPkarrServer
- test_utils::QlogFileGroup
- test_utils::test_transport::TestNetwork
- test_utils::test_transport::TestTransport
- tls::CaRootsConfig
Enums
- KeyParsingError
- TransportAddr
- address_lookup::AddressLookupBuilderError
- address_lookup::AddressLookupFailed
- address_lookup::ParseError
- address_lookup::mdns::DiscoveryEvent
- address_lookup::pkarr::PkarrError
- dns::DnsError
- dns::DnsProtocol
- dns::LookupError
- endpoint::AfterHandshakeOutcome
- endpoint::AlpnError
- endpoint::AuthenticationError
- endpoint::BeforeConnectOutcome
- endpoint::BindError
- endpoint::ConnectError
- endpoint::ConnectWithOptsError
- endpoint::ConnectingError
- endpoint::ConnectionError
- endpoint::Dir
- endpoint::DirectAddrType
- endpoint::EndpointError
- endpoint::FrameType
- endpoint::IncomingAddr
- endpoint::InvalidSocketAddr
- endpoint::PortmapperConfig
- endpoint::QuicConnectError
- endpoint::ReadError
- endpoint::ReadExactError
- endpoint::ReadToEndError
- endpoint::RelayMode
- endpoint::ResetError
- endpoint::SendDatagramError
- endpoint::Side
- endpoint::Source
- endpoint::StoppedError
- endpoint::TransportAddrUsage
- endpoint::WriteError
- endpoint::ZeroRttStatus
- endpoint::transports::Addr
- endpoint::transports::AddrKind
- endpoint_info::EncodingError
- endpoint_info::ParseError
- protocol::AcceptError
- protocol::IncomingFilterOutcome
- tls::TlsConfigError
Traits
- Watcher
- address_lookup::AddressLookup
- address_lookup::AddressLookupBuilder
- dns::Resolver
- endpoint::ConnectionState
- endpoint::Controller
- endpoint::ControllerFactory
- endpoint::EndpointHooks
- endpoint::HandshakeTokenKey
- endpoint::HeaderKey
- endpoint::PacketKey
- endpoint::QlogFactory
- endpoint::TimeSource
- endpoint::ToSocketAddr
- endpoint::TokenLog
- endpoint::presets::Preset
- endpoint::transports::CustomEndpoint
- endpoint::transports::CustomSender
- endpoint::transports::CustomTransport
- protocol::DynProtocolHandler
- protocol::ProtocolHandler
Functions
- defaults::prod::default_ap_relay
- defaults::prod::default_eu_relay
- defaults::prod::default_na_east_relay
- defaults::prod::default_na_west_relay
- defaults::prod::default_relay_map
- defaults::staging::default_eu_relay
- defaults::staging::default_na_east_relay
- defaults::staging::default_relay_map
- endpoint::default_relay_mode
- endpoint::force_staging_infra
- test_utils::run_relay_server
- test_utils::run_relay_server_with
- test_utils::test_transport::to_custom_addr
- tls::default_provider
Type Aliases
- EndpointId
- dns::BoxIter
- endpoint::IncomingZeroRttConnection
- endpoint::OutgoingZeroRttConnection
- protocol::IncomingFilter
Constants
- NET_REPORT_TIMEOUT
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- address_lookup::dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- address_lookup::mdns::NAME
- address_lookup::pkarr::DEFAULT_PKARR_TTL
- address_lookup::pkarr::DEFAULT_REPUBLISH_INTERVAL
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_PROD
- address_lookup::pkarr::N0_DNS_PKARR_RELAY_STAGING
- defaults::DEFAULT_HTTPS_PORT
- defaults::DEFAULT_HTTP_PORT
- defaults::DEFAULT_METRICS_PORT
- defaults::DEFAULT_RELAY_QUIC_PORT
- defaults::prod::AP_RELAY_HOSTNAME
- defaults::prod::EU_RELAY_HOSTNAME
- defaults::prod::NA_EAST_RELAY_HOSTNAME
- defaults::prod::NA_WEST_RELAY_HOSTNAME
- defaults::staging::EU_RELAY_HOSTNAME
- defaults::staging::NA_EAST_RELAY_HOSTNAME
- dns::N0_DNS_ENDPOINT_ORIGIN_PROD
- dns::N0_DNS_ENDPOINT_ORIGIN_STAGING
- endpoint::ENV_FORCE_STAGING_RELAYS
- endpoint_info::IROH_TXT_NAME
- test_utils::test_transport::TEST_TRANSPORT_ID
Module endpoint_info
Expand description
Support for handling DNS resource records for dialing by EndpointId.
Module endpoint_info
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:
@@ -31,5 +31,4 @@ Each address is an IPv4 or IPv6 address with a port.Structs§
- Addr
Filter - A filter and/or reordering function applied to transport addresses, -typically used by AddressLookup services in iroh before publishing.
- Endpoint
Data - Data about an endpoint that may be published to and resolved from discovery services.
- Endpoint
Info - Information about an endpoint that may be published to and resolved from discovery services.
- MaxLength
Exceeded Error - Error returned when an input value is too long for
UserData. - User
Data - Under the hood this is a UTF-8 String is no longer than
UserData::MAX_LENGTHbytes.
Enums§
Constants§
- IROH_
TXT_ NAME - The DNS name for the iroh TXT record.
Traits§
- Endpoint
IdExt - Extension methods for
EndpointIdto encode to and decode from z-base-32, -which is the encoding used by pkarr domain names.
UserData.UserData::MAX_LENGTH bytes.Enums§
Constants§
- IROH_
TXT_ NAME - The DNS name for the iroh TXT record.
AddrFilter
pub struct AddrFilter(/* private fields */);Expand description
A filter and/or reordering function applied to transport addresses, +
AddrFilter
pub struct AddrFilter(/* private fields */);Expand description
A filter and/or reordering function applied to transport addresses, typically used by AddressLookup services in iroh before publishing.
Takes the full set of transport addresses and returns them as an ordered Vec,
allowing both filtering (by omitting addresses) and reordering (by controlling
@@ -6,17 +6,17 @@ the output order). A BTreeSet cannot preserve a custom order, so th
type is Vec to make reordering possible.
See the documentation for each address lookup implementation for details on what additional filtering the implementation may perform on top.
-Implementations§
Source§impl AddrFilter
impl AddrFilter
Implementations§
Source§impl AddrFilter
impl AddrFilter
Sourcepub fn new(
f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static,
) -> AddrFilter
pub fn new( f: impl Fn(&Vec<TransportAddr>) -> Cow<'_, Vec<TransportAddr>> + Send + Sync + 'static, ) -> AddrFilter
Create a new AddrFilter
Sourcepub fn unfiltered() -> AddrFilter
pub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
-Sourcepub fn relay_only() -> AddrFilter
pub fn relay_only() -> AddrFilter
Only keep relay addresses.
-Sourcepub fn ip_only() -> AddrFilter
pub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
-Sourcepub fn unfiltered() -> AddrFilter
pub fn unfiltered() -> AddrFilter
Constructs a filter that doesn’t filter addresses and passes all through.
+Sourcepub fn relay_only() -> AddrFilter
pub fn relay_only() -> AddrFilter
Only keep relay addresses.
+Sourcepub fn ip_only() -> AddrFilter
pub fn ip_only() -> AddrFilter
Only keep direct IP addresses.
+Sourcepub fn apply<'a>(
&self,
addrs: &'a Vec<TransportAddr>,
) -> Cow<'a, Vec<TransportAddr>>
pub fn apply<'a>( &self, addrs: &'a Vec<TransportAddr>, ) -> Cow<'a, Vec<TransportAddr>>
Apply the address filter function to a set of addresses.
-Trait Implementations§
Source§impl Clone for AddrFilter
impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
fn clone(&self) -> AddrFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AddrFilter
impl Debug for AddrFilter
Source§impl Default for AddrFilter
impl Default for AddrFilter
Source§fn default() -> AddrFilter
fn default() -> AddrFilter
Auto Trait Implementations§
impl Freeze for AddrFilter
impl !RefUnwindSafe for AddrFilter
impl Send for AddrFilter
impl Sync for AddrFilter
impl Unpin for AddrFilter
impl !UnwindSafe for AddrFilter
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AddrFilter
impl Clone for AddrFilter
Source§fn clone(&self) -> AddrFilter
fn clone(&self) -> AddrFilter
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AddrFilter
impl Debug for AddrFilter
Source§impl Default for AddrFilter
impl Default for AddrFilter
Source§fn default() -> AddrFilter
fn default() -> AddrFilter
Auto Trait Implementations§
impl Freeze for AddrFilter
impl !RefUnwindSafe for AddrFilter
impl Send for AddrFilter
impl Sync for AddrFilter
impl Unpin for AddrFilter
impl !UnwindSafe for AddrFilter
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
index 02ec43ac7e..5265f71918 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointData.html
@@ -1,33 +1,33 @@
-EndpointData in iroh::endpoint_info - Rust EndpointData
pub struct EndpointData { /* private fields */ }
Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData in iroh::endpoint_info - Rust EndpointData
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
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
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
+Implementations§
Source§impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup
services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
-Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
-Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
+Trait Implementations§
Source§impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointData
Source§impl Default for EndpointData
Source§fn default() -> EndpointData
Returns the “default value” for a type. Read moreSource§impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Converts to this type from the input type.Source§impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl PartialEq for EndpointData
Source§impl Eq for EndpointData
Source§impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
§impl Freeze for EndpointData
§impl RefUnwindSafe for EndpointData
§impl Send for EndpointData
§impl Sync for EndpointData
§impl Unpin for EndpointData
§impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
index 9fdbdf1dc3..cd2cb0fdf7 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
EndpointData
pub struct EndpointData { /* private fields */ }Expand description
Data about an endpoint that may be published to and resolved from discovery services.
+EndpointData
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
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
impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
pub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
Implementations§
Source§impl EndpointData
impl EndpointData
Sourcepub fn new(addrs: Vec<TransportAddr>) -> EndpointData
pub fn new(addrs: Vec<TransportAddr>) -> EndpointData
Creates a new EndpointData with given list of transport addresses.
The address order is preserved, so it can encode priority for address lookup services, should they not fit into e.g. a single DNS packet otherwise.
If the addresses contain duplicate entries, those entries are removed.
-Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
pub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: UserData) -> EndpointData
pub fn with_user_data(self, user_data: UserData) -> EndpointData
Sets the user-defined data and returns the updated endpoint info.
Useful for calling on construction after EndpointData::new or EndpointData::from_iter.
See also Self::set_user_data.
Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
pub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
-Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
pub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
-Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
-Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
pub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
-Sourcepub fn clear_ip_addrs(&mut self)
pub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn clear_relay_urls(&mut self)
pub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
pub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn user_data(&self) -> Option<&UserData>
pub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
pub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
pub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
+Sourcepub fn add_relay_url(&mut self, relay_url: RelayUrl)
pub fn add_relay_url(&mut self, relay_url: RelayUrl)
Adds the relay URL to the end of the endpoint data, unless it already existed.
+Sourcepub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
pub fn add_ip_addrs(&mut self, addresses: Vec<SocketAddr>)
Adds addresses in order with duplicates or already existing addresses filtered out.
+Sourcepub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Adds addresses to the endpoint data in the given ordered, but with duplicates filtered.
+Sourcepub fn set_user_data(&mut self, user_data: Option<UserData>)
pub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data and returns the updated endpoint data.
+Sourcepub fn clear_ip_addrs(&mut self)
pub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn clear_relay_urls(&mut self)
pub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
pub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn user_data(&self) -> Option<&UserData>
pub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
pub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
+Sourcepub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
pub fn filtered_addrs(&self, filter: &AddrFilter) -> Cow<'_, Vec<TransportAddr>>
Apply the given filter to the current addresses.
Returns a vec to allow re-ordering of addresses.
-Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
pub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl Clone for EndpointData
impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
fn clone(&self) -> EndpointData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EndpointData
impl Debug for EndpointData
Source§impl Default for EndpointData
impl Default for EndpointData
Source§fn default() -> EndpointData
fn default() -> EndpointData
Source§impl From<BTreeSet<SocketAddr>> for EndpointData
impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Source§impl From<BTreeSet<TransportAddr>> for EndpointData
impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Source§impl From<EndpointAddr> for EndpointData
impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
fn from(endpoint_addr: EndpointAddr) -> EndpointData
Source§impl FromIterator<TransportAddr> for EndpointData
impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
fn from_iter<T>(iter: T) -> EndpointDatawhere
- T: IntoIterator<Item = TransportAddr>,
Source§impl PartialEq for EndpointData
impl PartialEq for EndpointData
impl Eq for EndpointData
impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
impl Freeze for EndpointData
impl RefUnwindSafe for EndpointData
impl Send for EndpointData
impl Sync for EndpointData
impl Unpin for EndpointData
impl UnwindSafe for EndpointData
Blanket Implementations§
Sourcepub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
pub fn apply_filter(&self, filter: &AddrFilter) -> Cow<'_, EndpointData>
Returns the EndpointData with given filter applied.
Trait Implementations§
Source§impl Clone for EndpointData
impl Clone for EndpointData
Source§fn clone(&self) -> EndpointData
fn clone(&self) -> EndpointData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EndpointData
impl Debug for EndpointData
Source§impl Default for EndpointData
impl Default for EndpointData
Source§fn default() -> EndpointData
fn default() -> EndpointData
Source§impl From<BTreeSet<SocketAddr>> for EndpointData
impl From<BTreeSet<SocketAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
fn from(addrs: BTreeSet<SocketAddr>) -> EndpointData
Source§impl From<BTreeSet<TransportAddr>> for EndpointData
impl From<BTreeSet<TransportAddr>> for EndpointData
Source§fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
fn from(addrs: BTreeSet<TransportAddr>) -> EndpointData
Source§impl From<EndpointAddr> for EndpointData
impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
fn from(endpoint_addr: EndpointAddr) -> EndpointData
Source§impl FromIterator<TransportAddr> for EndpointData
impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
fn from_iter<T>(iter: T) -> EndpointDatawhere
+ T: IntoIterator<Item = TransportAddr>,
Source§impl PartialEq for EndpointData
impl PartialEq for EndpointData
impl Eq for EndpointData
impl StructuralPartialEq for EndpointData
Auto Trait Implementations§
impl Freeze for EndpointData
impl RefUnwindSafe for EndpointData
impl Send for EndpointData
impl Sync for EndpointData
impl Unpin for EndpointData
impl UnwindSafe for EndpointData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
index 9fdbdf1dc3..cd2cb0fdf7 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.EndpointInfo.html
@@ -1,39 +1,39 @@
-EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
EndpointInfo
pub struct EndpointInfo {
+EndpointInfo in iroh::endpoint_info - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
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: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
-Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
-Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
-Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-Sourcepub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: RelayUrl) -> EndpointInfo
Adds the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: Vec<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr.
+Sourcepub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the transport addr information.
+Sourcepub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
+Sourcepub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
+Sourcepub fn from_txt_lookup(
domain_name: String,
lookup: impl Iterator<Item = impl Display>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup results.
The domain_name is the queried DNS name (e.g. _iroh.<z32>.<origin>).
The lookup iterator yields TXT record values that implement Display.
-Sourcepub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a pkarr::SignedPacket.
-Sourcepub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a pkarr::SignedPacket.
This constructs a DNS packet and signs it with a SecretKey.
-Sourcepub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Trait Implementations§
Source§impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointInfo
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<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
Source§impl Eq for EndpointInfo
Source§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for EndpointInfo
impl Clone for EndpointInfo
Source§fn clone(&self) -> EndpointInfo
fn clone(&self) -> EndpointInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EndpointInfo
impl Debug for EndpointInfo
Source§impl From<EndpointAddr> for EndpointInfo
impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> EndpointInfo
fn from(addr: EndpointAddr) -> EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> EndpointAddr
fn from(value: EndpointInfo) -> EndpointAddr
Source§impl From<Item> for EndpointInfo
impl From<Item> for EndpointInfo
Source§impl PartialEq for EndpointInfo
impl PartialEq for EndpointInfo
impl Eq for EndpointInfo
impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
impl Freeze for EndpointInfo
impl RefUnwindSafe for EndpointInfo
impl Send for EndpointInfo
impl Sync for EndpointInfo
impl Unpin for EndpointInfo
impl UnwindSafe for EndpointInfo
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
index e4208d49bc..5ffdaa1521 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.MaxLengthExceededError.html
@@ -1,6 +1,6 @@
-MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
-Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
-Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }Expand description
Error returned when an input value is too long for UserData.
Implementations§
Source§impl MaxLengthExceededError
impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
pub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
Trait Implementations§
Source§impl Debug for MaxLengthExceededError
impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl StackError for MaxLengthExceededError
impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Auto Trait Implementations§
impl Freeze for MaxLengthExceededError
impl RefUnwindSafe for MaxLengthExceededError
impl Send for MaxLengthExceededError
impl Sync for MaxLengthExceededError
impl Unpin for MaxLengthExceededError
impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
Source§impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
impl<T> Any for Twhere
+MaxLengthExceededError in iroh::endpoint_info - Rust MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }
Expand description
Error returned when an input value is too long for UserData.
+Implementations§
Source§impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
+Trait Implementations§
Source§impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Returns this error as a std error reference.Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for MaxLengthExceededError
§impl RefUnwindSafe for MaxLengthExceededError
§impl Send for MaxLengthExceededError
§impl Sync for MaxLengthExceededError
§impl Unpin for MaxLengthExceededError
§impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
MaxLengthExceededError
pub struct MaxLengthExceededError { /* private fields */ }Expand description
Error returned when an input value is too long for UserData.
Implementations§
Source§impl MaxLengthExceededError
impl MaxLengthExceededError
Sourcepub fn new() -> MaxLengthExceededError
pub fn new() -> MaxLengthExceededError
Creates a new MaxLengthExceededError error.
Trait Implementations§
Source§impl Debug for MaxLengthExceededError
impl Debug for MaxLengthExceededError
Source§impl Display for MaxLengthExceededError
impl Display for MaxLengthExceededError
Source§impl Error for MaxLengthExceededError
impl Error for MaxLengthExceededError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl StackError for MaxLengthExceededError
impl StackError for MaxLengthExceededError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<MaxLengthExceededError>) -> Box<dyn Error + Send + Sync>
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Auto Trait Implementations§
impl Freeze for MaxLengthExceededError
impl RefUnwindSafe for MaxLengthExceededError
impl Send for MaxLengthExceededError
impl Sync for MaxLengthExceededError
impl Unpin for MaxLengthExceededError
impl UnwindSafe for MaxLengthExceededError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
index 88dd0e1880..ec17906145 100644
--- a/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
+++ b/pr/4130/docs/iroh/endpoint_info/struct.UserData.html
@@ -1,24 +1,24 @@
-UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
+UserData in iroh::endpoint_info - Rust UserData
pub struct UserData(/* private fields */);
Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
-Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
-Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
Source§impl PartialOrd for UserData
Source§impl Eq for UserData
Source§impl StructuralPartialEq for UserData
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for UserData
§impl RefUnwindSafe for UserData
§impl Send for UserData
§impl Sync for UserData
§impl Unpin for UserData
§impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for TransportAddr
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 moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
Converts to this type from the input type.Source§impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
Converts to this type from the input type.Source§impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Creates a value from an iterator. Read moreSource§impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreSource§impl Debug for EndpointAddr
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 moreSource§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§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§impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
UserData
pub struct UserData(/* private fields */);Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
UserData
pub struct UserData(/* private fields */);Expand description
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
Implementations§
Source§impl UserData
impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
pub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
+Implementations§
Source§impl UserData
impl UserData
Sourcepub const MAX_LENGTH: usize = 245usize
pub const MAX_LENGTH: usize = 245usize
The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
Trait Implementations§
Trait Implementations§
Source§impl Ord for UserData
impl Ord for UserData
Source§impl PartialOrd for UserData
impl PartialOrd for UserData
impl Eq for UserData
impl StructuralPartialEq for UserData
Auto Trait Implementations§
impl Freeze for UserData
impl RefUnwindSafe for UserData
impl Send for UserData
impl Sync for UserData
impl Unpin for UserData
impl UnwindSafe for UserData
Blanket Implementations§
Auto Trait Implementations§
impl Freeze for UserData
impl RefUnwindSafe for UserData
impl Send for UserData
impl Sync for UserData
impl Unpin for UserData
impl UnwindSafe for UserData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html b/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
deleted file mode 100644
index 55d4773f7d..0000000000
--- a/pr/4130/docs/iroh/endpoint_info/trait.EndpointIdExt.html
+++ /dev/null
@@ -1,9 +0,0 @@
-EndpointIdExt in iroh::endpoint_info - Rust EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}
Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
-Required Methods§
Sourcefn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
-Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
Source§impl EndpointIdExt for PublicKey
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/enum.KeyParsingError.html b/pr/4130/docs/iroh/enum.KeyParsingError.html
index fdbf78056b..c99583fd98 100644
--- a/pr/4130/docs/iroh/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
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 fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
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.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§
EndpointIdExt
pub trait EndpointIdExt {
- // Required methods
- fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>;
-}Expand description
Extension methods for EndpointId to encode to and decode from z-base-32,
-which is the encoding used by pkarr domain names.
Required Methods§
Sourcefn to_z32(&self) -> String
fn to_z32(&self) -> String
Encodes a EndpointId in z-base-32 encoding.
Sourcefn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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.
Implementors§
impl EndpointIdExt for PublicKey
KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Debug for KeyParsingError
impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
impl Display for KeyParsingError
Source§impl Error for KeyParsingError
impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<KeyParsingError> for ParseError
impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
fn from(source: KeyParsingError) -> ParseError
Source§impl StackError for KeyParsingError
impl StackError for KeyParsingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<KeyParsingError>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<KeyParsingError>) -> Box<dyn Error + Send + Sync>
Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Auto Trait Implementations§
impl Freeze for KeyParsingError
impl RefUnwindSafe for KeyParsingError
impl Send for KeyParsingError
impl Sync for KeyParsingError
impl Unpin for KeyParsingError
impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
impl Display for KeyParsingError
Source§impl Error for KeyParsingError
impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<KeyParsingError> for ParseError
impl From<KeyParsingError> for ParseError
Source§fn from(source: KeyParsingError) -> ParseError
fn from(source: KeyParsingError) -> ParseError
Source§impl StackError for KeyParsingError
impl StackError for KeyParsingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<KeyParsingError>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<KeyParsingError>) -> Box<dyn Error + Send + Sync>
Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Auto Trait Implementations§
impl Freeze for KeyParsingError
impl RefUnwindSafe for KeyParsingError
impl Send for KeyParsingError
impl Sync for KeyParsingError
impl Unpin for KeyParsingError
impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for TransportAddr
impl Clone for TransportAddr
Source§fn clone(&self) -> TransportAddr
fn clone(&self) -> TransportAddr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransportAddr
impl Debug for TransportAddr
Source§impl<'de> Deserialize<'de> for TransportAddr
impl<'de> Deserialize<'de> for TransportAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransportAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TransportAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Source§impl Display for TransportAddr
impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
fn from(addr: IncomingAddr) -> Self
Source§impl From<TransportAddrInfo> for TransportAddr
impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
fn from(value: TransportAddrInfo) -> Self
Source§impl FromIterator<TransportAddr> for EndpointData
impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
fn from_iter<T>(iter: T) -> EndpointDatawhere
+ __D: Deserializer<'de>,
Source§impl Display for TransportAddr
impl Display for TransportAddr
Source§impl From<Addr> for TransportAddr
impl From<Addr> for TransportAddr
Source§impl From<IncomingAddr> for TransportAddr
impl From<IncomingAddr> for TransportAddr
Source§fn from(addr: IncomingAddr) -> Self
fn from(addr: IncomingAddr) -> Self
Source§impl From<TransportAddrInfo> for TransportAddr
impl From<TransportAddrInfo> for TransportAddr
Source§fn from(value: TransportAddrInfo) -> Self
fn from(value: TransportAddrInfo) -> Self
Source§impl FromIterator<TransportAddr> for EndpointData
impl FromIterator<TransportAddr> for EndpointData
Source§fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
fn from_iter<T>(iter: T) -> EndpointDatawhere
T: IntoIterator<Item = TransportAddr>,
Source§impl Hash for TransportAddr
impl Hash for TransportAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
fn hash_slice<H>(data: &[Self], state: &mut H)where
H: Hasher,
diff --git a/pr/4130/docs/iroh/struct.EndpointAddr.html b/pr/4130/docs/iroh/struct.EndpointAddr.html
index 27d3afffe7..18962acebd 100644
--- a/pr/4130/docs/iroh/struct.EndpointAddr.html
+++ b/pr/4130/docs/iroh/struct.EndpointAddr.html
@@ -45,7 +45,7 @@ depending on the situation.
Trait Implementations§
Source§impl Clone for EndpointAddr
impl Clone for EndpointAddr
Source§fn clone(&self) -> EndpointAddr
fn clone(&self) -> EndpointAddr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EndpointAddr
impl Debug for EndpointAddr
Source§impl<'de> Deserialize<'de> for EndpointAddr
impl<'de> Deserialize<'de> for EndpointAddr
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EndpointAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EndpointAddr, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Source§impl From<EndpointAddr> for EndpointData
impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
fn from(endpoint_addr: EndpointAddr) -> EndpointData
Source§impl From<EndpointAddr> for EndpointInfo
impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> EndpointInfo
fn from(addr: EndpointAddr) -> EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> EndpointAddr
fn from(value: EndpointInfo) -> EndpointAddr
Source§impl From<PublicKey> for EndpointAddr
impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: PublicKey) -> EndpointAddr
fn from(endpoint_id: PublicKey) -> EndpointAddr
Source§impl Hash for EndpointAddr
impl Hash for EndpointAddr
Source§impl From<EndpointAddr> for EndpointData
impl From<EndpointAddr> for EndpointData
Source§fn from(endpoint_addr: EndpointAddr) -> EndpointData
fn from(endpoint_addr: EndpointAddr) -> EndpointData
Source§impl From<EndpointAddr> for EndpointInfo
impl From<EndpointAddr> for EndpointInfo
Source§fn from(addr: EndpointAddr) -> EndpointInfo
fn from(addr: EndpointAddr) -> EndpointInfo
Source§impl From<EndpointInfo> for EndpointAddr
impl From<EndpointInfo> for EndpointAddr
Source§fn from(value: EndpointInfo) -> EndpointAddr
fn from(value: EndpointInfo) -> EndpointAddr
Source§impl From<PublicKey> for EndpointAddr
impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: PublicKey) -> EndpointAddr
fn from(endpoint_id: PublicKey) -> EndpointAddr
Source§impl Hash for EndpointAddr
impl Hash for EndpointAddr
Source§impl Ord for EndpointAddr
impl Ord for EndpointAddr
Source§fn cmp(&self, other: &EndpointAddr) -> Ordering
fn cmp(&self, other: &EndpointAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
fn max(self, other: Self) -> Selfwhere
diff --git a/pr/4130/docs/iroh/struct.PublicKey.html b/pr/4130/docs/iroh/struct.PublicKey.html
index 26a05e66c8..f8fcea28de 100644
--- a/pr/4130/docs/iroh/struct.PublicKey.html
+++ b/pr/4130/docs/iroh/struct.PublicKey.html
@@ -1,46 +1,49 @@
-PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
+PublicKey in iroh - Rust PublicKey
pub struct PublicKey(/* private fields */);
Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub 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.
-Sourcepub 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.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
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 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.
-Source§impl Hash for PublicKey
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
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 Serialize this value into the given Serde serializer. Read moreSource§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 Copy for PublicKey
Source§impl Eq for PublicKey
Source§impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
§impl Freeze for PublicKey
§impl RefUnwindSafe for PublicKey
§impl Send for PublicKey
§impl Sync for PublicKey
§impl Unpin for PublicKey
§impl UnwindSafe for PublicKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
PublicKey
pub struct PublicKey(/* private fields */);Expand description
A public key.
+PublicKey
pub struct PublicKey(/* private fields */);Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
Construct a PublicKey from a slice of bytes.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, KeyParsingError>
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.
Sourcepub fn verify(
&self,
message: &[u8],
signature: &Signature,
) -> Result<(), SignatureError>
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.
Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<PublicKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Source§impl EndpointIdExt for PublicKey
impl EndpointIdExt for PublicKey
Source§fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
fn from_z32(s: &str) -> Result<PublicKey, KeyParsingError>
EndpointId from z-base-32 encoding.Source§impl From<PublicKey> for EndpointAddr
impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: PublicKey) -> EndpointAddr
fn from(endpoint_id: PublicKey) -> EndpointAddr
Source§impl From<PublicKey> for EndpointAddr
impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: PublicKey) -> EndpointAddr
fn from(endpoint_id: PublicKey) -> EndpointAddr
Source§impl FromStr for PublicKey
Deserialises the PublicKey from it’s base32 encoding.
impl FromStr for PublicKey
Deserialises the PublicKey from it’s base32 encoding.
Display is capable of serialising this format.
Source§impl Hash for PublicKey
impl Hash for PublicKey
Source§impl Ord for PublicKey
impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
Source§impl Serialize for PublicKey
impl Serialize for PublicKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
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§
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SecretKey.html b/pr/4130/docs/iroh/struct.SecretKey.html
index 876bff77fa..76a4d87b4e 100644
--- a/pr/4130/docs/iroh/struct.SecretKey.html
+++ b/pr/4130/docs/iroh/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh - Rust SecretKey
pub struct SecretKey(/* private fields */);
Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,18 +8,18 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
SecretKey
pub struct SecretKey(/* private fields */);Expand description
A secret key.
-Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn generate() -> SecretKey
pub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
SecretKey
pub struct SecretKey(/* private fields */);Expand description
A secret key.
+Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn generate() -> SecretKey
pub fn generate() -> SecretKey
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());Sourcepub fn sign(&self, msg: &[u8]) -> Signature
pub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
pub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part. The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey
Create a secret key from its byte representation.
-Trait Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SecretKey, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Source§impl Serialize for SecretKey
impl Serialize for SecretKey
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4130/docs/iroh/struct.Signature.html b/pr/4130/docs/iroh/struct.Signature.html
index 5fd688bb89..48f9f390c0 100644
--- a/pr/4130/docs/iroh/struct.Signature.html
+++ b/pr/4130/docs/iroh/struct.Signature.html
@@ -1,18 +1,18 @@
-Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 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 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
Signature
pub struct Signature(/* private fields */);Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 Serialize this value into the given Serde serializer. Read more
fn deserialize<D>(
+Signature in iroh - Rust Signature
pub struct Signature(/* private fields */);
Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
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 moreSource§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 Serialize this value into the given Serde serializer. Read more
Signature
pub struct Signature(/* private fields */);Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Signature, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Signature, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Source§impl Serialize for Signature
impl Serialize for Signature
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/struct.SignatureError.html b/pr/4130/docs/iroh/struct.SignatureError.html
index 5cba2f1ba6..d5edc86d9f 100644
--- a/pr/4130/docs/iroh/struct.SignatureError.html
+++ b/pr/4130/docs/iroh/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
SignatureError
pub struct SignatureError { /* private fields */ }Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
impl SignatureError
Sourcepub fn new() -> SignatureError
pub fn new() -> SignatureError
Creates a new SignatureError error.
Trait Implementations§
Source§impl Debug for SignatureError
impl Debug for SignatureError
Source§impl Display for SignatureError
impl Display for SignatureError
Source§impl Error for SignatureError
impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl StackError for SignatureError
impl StackError for SignatureError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<SignatureError>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<SignatureError>) -> Box<dyn Error + Send + Sync>
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Auto Trait Implementations§
impl Freeze for SignatureError
impl RefUnwindSafe for SignatureError
impl Send for SignatureError
impl Sync for SignatureError
impl Unpin for SignatureError
impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
impl<T> Any for Twhere
+SignatureError in iroh - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
Sourcepub fn new() -> SignatureError
Creates a new SignatureError error.
+Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl 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 is_transparent(&self) -> bool
Returns whether this error is transparent and should be skipped in reports.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
SignatureError
pub struct SignatureError { /* private fields */ }Expand description
Verification of a signature failed.
+Implementations§
Source§impl SignatureError
impl SignatureError
Sourcepub fn new() -> SignatureError
pub fn new() -> SignatureError
Creates a new SignatureError error.
Trait Implementations§
Source§impl Debug for SignatureError
impl Debug for SignatureError
Source§impl Display for SignatureError
impl Display for SignatureError
Source§impl Error for SignatureError
impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl StackError for SignatureError
impl StackError for SignatureError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<SignatureError>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<SignatureError>) -> Box<dyn Error + Send + Sync>
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Auto Trait Implementations§
impl Freeze for SignatureError
impl RefUnwindSafe for SignatureError
impl Send for SignatureError
impl Sync for SignatureError
impl Unpin for SignatureError
impl UnwindSafe for SignatureError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
fn implicit(
diff --git a/pr/4130/docs/iroh/test_utils/index.html b/pr/4130/docs/iroh/test_utils/index.html
index d04cb65fe9..d548c69126 100644
--- a/pr/4130/docs/iroh/test_utils/index.html
+++ b/pr/4130/docs/iroh/test_utils/index.html
@@ -1,2 +1,2 @@
-iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
+iroh::test_utils - Rust Module test_utils
Available on crate features test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
DropGuard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
FileGroup - Builder to create one or more related qlog configs.
Functions§
- run_
relay_server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_server_with - Runs a relay server.
\ No newline at end of file
diff --git a/pr/4130/docs/iroh/type.EndpointId.html b/pr/4130/docs/iroh/type.EndpointId.html
index e370f23895..ac16754c20 100644
--- a/pr/4130/docs/iroh/type.EndpointId.html
+++ b/pr/4130/docs/iroh/type.EndpointId.html
@@ -1,4 +1,4 @@
-EndpointId in iroh - Rust EndpointId
pub type EndpointId = PublicKey;
Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId in iroh - Rust EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
index 3d9575d63e..149808b9d6 100644
--- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html
+++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html
@@ -1,4 +1,4 @@
-KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.Auto Trait Implementations§
§impl Freeze for KeyParsingError
§impl RefUnwindSafe for KeyParsingError
§impl Send for KeyParsingError
§impl Sync for KeyParsingError
§impl Unpin for KeyParsingError
§impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
Source§impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
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.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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> From<T> for T
Source§fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html
index 7fea15c5c1..d7c01a2912 100644
--- a/pr/4130/docs/iroh_base/struct.PublicKey.html
+++ b/pr/4130/docs/iroh_base/struct.PublicKey.html
@@ -1,36 +1,39 @@
-PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
+PublicKey in iroh_base - Rust PublicKey
pub struct PublicKey(/* private fields */);
Available on crate feature key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
-Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
+Implementations§
Source§impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
-Sourcepub 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.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
Converts to this type from the input type.Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreSource§impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
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.
-Source§impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
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 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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
Module test_utils
test-utils only.Expand description
Internal utilities to support testing.
+Module test_utils
test-utils only.Expand description
Internal utilities to support testing.
Modules§
- test_
transport unstable-custom-transports - In-memory test transport for testing.
Structs§
- Cleanup
Drop Guard - A drop guard to clean up test infrastructure.
- DnsPkarr
Server - Handle and drop guard for test DNS and Pkarr servers.
- Qlog
File Group - Builder to create one or more related qlog configs.
Functions§
- run_
relay_ server - Runs a relay server with QUIC enabled suitable for tests.
- run_
relay_ server_ with - Runs a relay server.
EndpointId
pub type EndpointId = PublicKey;Expand description
The identifier for an endpoint in the (iroh) network.
+EndpointId
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/4130/docs/iroh_base/enum.KeyParsingError.html b/pr/4130/docs/iroh_base/enum.KeyParsingError.html index 3d9575d63e..149808b9d6 100644 --- a/pr/4130/docs/iroh_base/enum.KeyParsingError.html +++ b/pr/4130/docs/iroh_base/enum.KeyParsingError.html @@ -1,4 +1,4 @@ -KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
+KeyParsingError in iroh_base - Rust KeyParsingError
#[non_exhaustive]pub enum KeyParsingError {
FailedToDecodeHex {
meta: Meta,
},
@@ -20,7 +20,7 @@
Fields
§meta: MetaCaptured call-site metadata
§InvalidKeyData
The decoded data is not a valid Ed25591 public key.
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Debug for KeyParsingError
impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
impl Display for KeyParsingError
Source§impl Error for KeyParsingError
impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<KeyParsingError> for AnyError
impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
fn from(value: KeyParsingError) -> AnyError
Source§impl StackError for KeyParsingError
impl StackError for KeyParsingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
Auto Trait Implementations§
impl Freeze for KeyParsingError
impl RefUnwindSafe for KeyParsingError
impl Send for KeyParsingError
impl Sync for KeyParsingError
impl Unpin for KeyParsingError
impl UnwindSafe for KeyParsingError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for KeyParsingError
impl Debug for KeyParsingError
Source§impl Display for KeyParsingError
impl Display for KeyParsingError
Source§impl Error for KeyParsingError
impl Error for KeyParsingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<KeyParsingError> for AnyError
impl From<KeyParsingError> for AnyError
Source§fn from(value: KeyParsingError) -> AnyError
fn from(value: KeyParsingError) -> AnyError
Source§impl StackError for KeyParsingError
impl StackError for KeyParsingError
Source§fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
fn as_std(&self) -> &(dyn Error + Send + Sync + 'static)
Source§fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
fn into_std(self: Box<Self>) -> Box<dyn Error + Send + Sync>
Source§fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
fn fmt_message(&self, f: &mut Formatter<'_>) -> Result
Source§fn is_transparent(&self) -> bool
fn is_transparent(&self) -> bool
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§fn from(t: T) -> T
fn from(t: T) -> T
Returns the argument unchanged.
diff --git a/pr/4130/docs/iroh_base/struct.PublicKey.html b/pr/4130/docs/iroh_base/struct.PublicKey.html index 7fea15c5c1..d7c01a2912 100644 --- a/pr/4130/docs/iroh_base/struct.PublicKey.html +++ b/pr/4130/docs/iroh_base/struct.PublicKey.html @@ -1,36 +1,39 @@ -PublicKey
pub struct PublicKey(/* private fields */);key only.Expand description
A public key.
+PublicKey
pub struct PublicKey(/* private fields */);key only.Expand description
A public key.
The key itself is stored as the CompressedEdwards y coordinate of the public key
It is verified to decompress into a valid key when created.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
Construct a PublicKey from a slice of bytes.
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, KeyParsingError>
pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, 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.
Sourcepub fn verify(
&self,
message: &[u8],
signature: &Signature,
) -> Result<(), SignatureError>
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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Source§impl From<PublicKey> for EndpointAddr
impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
fn from(endpoint_id: EndpointId) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PublicKey
impl<'de> Deserialize<'de> for PublicKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Source§impl From<PublicKey> for EndpointAddr
impl From<PublicKey> for EndpointAddr
Source§fn from(endpoint_id: EndpointId) -> Self
fn from(endpoint_id: EndpointId) -> Self
Source§impl FromStr for PublicKey
Deserialises the PublicKey from it’s base32 encoding.
impl FromStr for PublicKey
Deserialises the PublicKey from it’s base32 encoding.
Display is capable of serialising this format.
Source§impl Hash for PublicKey
impl Hash for PublicKey
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+
fn hash_slice<H>(data: &[Self], state: &mut H)where
+
Source§impl Ord for PublicKey
impl Ord for PublicKey
Source§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
Source§impl PartialOrd for PublicKey
impl PartialOrd for PublicKey
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§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SecretKey.html b/pr/4130/docs/iroh_base/struct.SecretKey.html
index 478c861dee..2343373d41 100644
--- a/pr/4130/docs/iroh_base/struct.SecretKey.html
+++ b/pr/4130/docs/iroh_base/struct.SecretKey.html
@@ -1,6 +1,6 @@
-SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
+SecretKey in iroh_base - Rust SecretKey
pub struct SecretKey(/* private fields */);
Available on crate feature key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
Sourcepub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
@@ -8,13 +8,13 @@ If you want to customize how the randomness is generated, use
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());
Sourcepub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part.
The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for SecretKey
§impl RefUnwindSafe for SecretKey
§impl Send for SecretKey
§impl Sync for SecretKey
§impl Unpin for SecretKey
§impl UnwindSafe for SecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
SecretKey
pub struct SecretKey(/* private fields */);key only.Expand description
A secret key.
-Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn generate() -> Self
pub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
SecretKey
pub struct SecretKey(/* private fields */);key only.Expand description
A secret key.
+Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn generate() -> Self
pub fn generate() -> Self
Generate a new SecretKey with a randomness generator.
This uses the default random number generator from the rand crate.
If you want to customize how the randomness is generated, use
Self::from_bytes instead and generate the 32 bytes yourself:
// Create a random number generator.
let mut rng = rand::rng();
// Use it to generate the 32 bytes that make up a secret key.
-let secret_key = SecretKey::from_bytes(&rng.random());Sourcepub fn sign(&self, msg: &[u8]) -> Signature
pub fn sign(&self, msg: &[u8]) -> Signature
Sign the given message and return a digital signature
+Sourcepub fn to_bytes(&self) -> [u8; 32]
pub fn to_bytes(&self) -> [u8; 32]
Convert this to the bytes representing the secret part. The public part can always be recovered.
-Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
pub fn from_bytes(bytes: &[u8; 32]) -> Self
Create a secret key from its byte representation.
-Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
- D: Deserializer<'de>,
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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretKey
impl<'de> Deserialize<'de> for SecretKey
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
+ D: Deserializer<'de>,
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.Signature.html b/pr/4130/docs/iroh_base/struct.Signature.html
index 683999aa0f..0d30793f38 100644
--- a/pr/4130/docs/iroh_base/struct.Signature.html
+++ b/pr/4130/docs/iroh_base/struct.Signature.html
@@ -1,9 +1,9 @@
-Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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 Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
Signature
pub struct Signature(/* private fields */);key only.Expand description
Ed25519 signature.
-Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
Source§impl<T> Any for Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
impl<T> Any for Twhere
+Signature in iroh_base - Rust Signature
pub struct Signature(/* private fields */);
Available on crate feature key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read moreSource§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> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
Signature
pub struct Signature(/* private fields */);key only.Expand description
Ed25519 signature.
+Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
impl<T> CloneToUninit for Twhere
diff --git a/pr/4130/docs/iroh_base/struct.SignatureError.html b/pr/4130/docs/iroh_base/struct.SignatureError.html
index 757848c7b8..d1b1480a87 100644
--- a/pr/4130/docs/iroh_base/struct.SignatureError.html
+++ b/pr/4130/docs/iroh_base/struct.SignatureError.html
@@ -1,6 +1,6 @@
-SignatureError in iroh_base - Rust SignatureError
pub struct SignatureError { /* private fields */ }
Available on crate feature key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
Sourcepub fn new() -> Self
Creates a new SignatureError error.
-Trait Implementations§
Source§impl Debug for SignatureError
Source§impl Display for SignatureError
Source§impl Error for SignatureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§impl From<SignatureError> for AnyError
Source§fn from(value: SignatureError) -> AnyError
Converts to this type from the input type.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<Self>) -> Box<dyn Error + Send + Sync>
Returns this error as a std error.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
Returns the next source in the chain, if any.Auto Trait Implementations§
§impl Freeze for SignatureError
§impl RefUnwindSafe for SignatureError
§impl Send for SignatureError
§impl Sync for SignatureError
§impl Unpin for SignatureError
§impl UnwindSafe for SignatureError
Blanket Implementations§
Source§impl<T> Any for Twhere
+SignatureError in iroh_base - Rust SignatureError
SignatureError
pub struct SignatureError { /* private fields */ }key only.Expand description
Verification of a signature failed.
-Implementations§
Source§impl SignatureError
impl SignatureError
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SignatureError error.