pub const DEFAULT_PKARR_TTL: u32 = 30;Expand description
Default TTL for the records in the pkarr signed packet.
+DEFAULT_PKARR_TTL
pub const DEFAULT_PKARR_TTL: u32 = 30;Expand description
Default TTL for the records in the pkarr signed packet.
The Time To Live (TTL) tells DNS caches how long to store a record. It is ignored by the
iroh-dns-server, e.g. as running on N0_DNS_PKARR_RELAY_PROD, as the home server
keeps the records for the domain. When using the pkarr relay no DNS is involved and the
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/constant.DEFAULT_REPUBLISH_INTERVAL.html b/pr/4012/docs/iroh/address_lookup/pkarr/constant.DEFAULT_REPUBLISH_INTERVAL.html
index a67570dcc6..2ba8a4627c 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/constant.DEFAULT_REPUBLISH_INTERVAL.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/constant.DEFAULT_REPUBLISH_INTERVAL.html
@@ -1,2 +1,2 @@
-
DEFAULT_REPUBLISH_INTERVAL
pub const DEFAULT_REPUBLISH_INTERVAL: Duration;Expand description
Interval in which to republish the endpoint info even if unchanged: 5 minutes.
+DEFAULT_REPUBLISH_INTERVAL
N0_DNS_PKARR_RELAY_PROD
pub const N0_DNS_PKARR_RELAY_PROD: &str = "https://dns.iroh.link/pkarr";Expand description
The production pkarr relay run by number 0.
+N0_DNS_PKARR_RELAY_PROD
pub const N0_DNS_PKARR_RELAY_PROD: &str = "https://dns.iroh.link/pkarr";Expand description
The production pkarr relay run by number 0.
This server is both a pkarr relay server as well as a DNS resolver, see the module documentation. However it does not interact with the Mainline DHT, so is a more central service. It is a reliable service to use for address lookup.
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html b/pr/4012/docs/iroh/address_lookup/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html index e0b17befde..9aaf80e832 100644 --- a/pr/4012/docs/iroh/address_lookup/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html +++ b/pr/4012/docs/iroh/address_lookup/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html @@ -1,4 +1,4 @@ -N0_DNS_PKARR_RELAY_STAGING
pub const N0_DNS_PKARR_RELAY_STAGING: &str = "https://staging-dns.iroh.link/pkarr";Expand description
The testing pkarr relay run by number 0.
+N0_DNS_PKARR_RELAY_STAGING
pub const N0_DNS_PKARR_RELAY_STAGING: &str = "https://staging-dns.iroh.link/pkarr";Expand description
The testing pkarr relay run by number 0.
This server operates similarly to N0_DNS_PKARR_RELAY_PROD but is not as reliable.
It is meant for more experimental use and testing purposes.
AddressLookup trait to be used as an address lookup service which can
be used as both a publisher and resolver. Calling DhtAddressLookup::publish will start
a background task that periodically publishes the endpoint address.
-DhtAddressLookup filters published addresses based on the endpoint’s relay
-configuration by default: when relays are enabled, only relay addresses are published
-(AddrFilter::relay_only); when relays are disabled, all addresses are published
-(AddrFilter::unfiltered). You can override this via Builder::addr_filter.
DhtAddressLookup filters published addresses: only relay addresses are published by default.
+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
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,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/enum.PkarrError.html b/pr/4012/docs/iroh/address_lookup/pkarr/enum.PkarrError.html
index 3850f29652..e942531d11 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/enum.PkarrError.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/enum.PkarrError.html
@@ -1,4 +1,4 @@
-PkarrError in iroh::address_lookup::pkarr - Rust PkarrError
#[non_exhaustive]pub enum PkarrError {
+PkarrError in iroh::address_lookup::pkarr - Rust PkarrError
#[non_exhaustive]pub enum PkarrError {
PublicKey {
source: PublicKeyError,
meta: Meta,
@@ -34,7 +34,7 @@
fn resolve(
&self,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/enum.PkarrError.html b/pr/4012/docs/iroh/address_lookup/pkarr/enum.PkarrError.html
index 3850f29652..e942531d11 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/enum.PkarrError.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/enum.PkarrError.html
@@ -1,4 +1,4 @@
-PkarrError in iroh::address_lookup::pkarr - Rust PkarrError
#[non_exhaustive]pub enum PkarrError {
+PkarrError in iroh::address_lookup::pkarr - Rust PkarrError
#[non_exhaustive]pub enum PkarrError {
PublicKey {
source: PublicKeyError,
meta: Meta,
@@ -34,7 +34,7 @@
PkarrError
#[non_exhaustive]pub enum PkarrError {
+PkarrError in iroh::address_lookup::pkarr - Rust PkarrError
#[non_exhaustive]pub enum PkarrError {
PublicKey {
source: PublicKeyError,
meta: Meta,
@@ -34,7 +34,7 @@
HttpRequest
HttpPayload
Encoding
Trait Implementations§
Source§impl Debug for PkarrError
impl Debug for PkarrError
Source§impl Display for PkarrError
impl Display for PkarrError
Source§impl Error for PkarrError
impl Error for PkarrError
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<PkarrError> for AnyError
impl From<PkarrError> for AnyError
Source§fn from(value: PkarrError) -> AnyError
fn from(value: PkarrError) -> AnyError
Source§impl From<PkarrError> for Error
impl From<PkarrError> for Error
Source§fn from(err: PkarrError) -> Self
fn from(err: PkarrError) -> Self
Source§impl StackError for PkarrError
impl StackError for PkarrError
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 PkarrError
impl !RefUnwindSafe for PkarrError
impl Send for PkarrError
impl Sync for PkarrError
impl Unpin for PkarrError
impl !UnwindSafe for PkarrError
Blanket Implementations§
Trait Implementations§
Source§impl Debug for PkarrError
impl Debug for PkarrError
Source§impl Display for PkarrError
impl Display for PkarrError
Source§impl Error for PkarrError
impl Error for PkarrError
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<PkarrError> for AnyError
impl From<PkarrError> for AnyError
Source§fn from(value: PkarrError) -> AnyError
fn from(value: PkarrError) -> AnyError
Source§impl From<PkarrError> for Error
impl From<PkarrError> for Error
Source§fn from(err: PkarrError) -> Self
fn from(err: PkarrError) -> Self
Source§impl StackError for PkarrError
impl StackError for PkarrError
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 PkarrError
impl !RefUnwindSafe for PkarrError
impl Send for PkarrError
impl Sync for PkarrError
impl Unpin for PkarrError
impl !UnwindSafe for PkarrError
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/4012/docs/iroh/address_lookup/pkarr/index.html b/pr/4012/docs/iroh/address_lookup/pkarr/index.html
index a76279d4e3..77da848f3e 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/index.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/index.html
@@ -1,4 +1,4 @@
-iroh::address_lookup::pkarr - Rust Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
+iroh::address_lookup::pkarr - Rust Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
Public-Key Addressable Resource Records, pkarr, is a system which allows publishing
DNS Resource Records owned by a particular SecretKey under a name derived from its
corresponding PublicKey, also known as the EndpointId. Additionally this pkarr
@@ -20,11 +20,10 @@ the Mainline DHT on behalf on the client as well as cache lookups performed on t
to improve performance.
-PkarrPublisher filters published addresses based on the endpoint’s relay configuration
-by default: when relays are enabled, only relay addresses are published
-(AddrFilter::relay_only); when relays are disabled, all addresses are published
-(AddrFilter::unfiltered). You can override this via
-PkarrPublisherBuilder::addr_filter.
+PkarrPublisher filters published addresses: only relay addresses are published by default.
+To change this behavior, use PkarrPublisherBuilder::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.
For address lookup in iroh the pkarr Resource Records contain the addressing information,
providing endpoints which retrieve the pkarr Resource Record with enough detail
to contact the iroh endpoint.
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
index 4362cdc531..6c23508b78 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html
@@ -1,28 +1,28 @@
-PkarrPublisher in iroh::address_lookup::pkarr - Rust PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }
Expand description
Publisher of address lookup information to a pkarr relay.
+PkarrPublisher in iroh::address_lookup::pkarr - Rust PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }
Expand description
Publisher of address lookup information to a pkarr relay.
This publisher uses HTTP to publish address lookup information to a pkarr relay
server, see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only publishes address lookup information, for the corresponding resolver use
the PkarrResolver together with ConcurrentAddressLookup.
This publisher will only publish the RelayUrl if it is set, otherwise the direct addresses are published instead.
-Implementations§
Source§impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
+Implementations§
Source§impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
If no further options are set, the pkarr publisher will use DEFAULT_PKARR_TTL as the
time-to-live value for the published packets, and it will republish Address Lookup information
every DEFAULT_REPUBLISH_INTERVAL, even if the information is unchanged.
PkarrPublisherBuilder implements AddressLookupBuilder, so it can be passed to address_lookup.
It will then use the endpoint’s secret key to sign published packets.
-Sourcepub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0, at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable
IROH_FORCE_STAGING_RELAYS set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
+Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
This is a nonblocking function, the actual update is performed in the background.
-Trait Implementations§
Source§impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreTrait Implementations§
Source§impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
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 PkarrPublisher
§impl !RefUnwindSafe for PkarrPublisher
§impl Send for PkarrPublisher
§impl Sync for PkarrPublisher
§impl Unpin for PkarrPublisher
§impl !UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
Source§impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
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 PkarrPublisher
§impl !RefUnwindSafe for PkarrPublisher
§impl Send for PkarrPublisher
§impl Sync for PkarrPublisher
§impl Unpin for PkarrPublisher
§impl !UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
index 6fc36db1c5..0c3174efaf 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
@@ -1,27 +1,27 @@
-PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
+PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
-Implementations§
Source§impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
-Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
+Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
-Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
public pkarr server.
However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine
connected to the internet via public IP addresses without a firewall.
-In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup
+In such cases, publishing them can make dialing such endpoints via DNS or Pkarr lookup
faster, potentially skipping a relay connection altogether.
-Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
) -> PkarrPublisher
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index b3f3945806..282af05393 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index e7eef60acd..d820c4910a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index 1f1302a316..aeed450263 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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/4012/docs/iroh/dns/struct.DnsResolver.html b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
index c068ae3a48..82b49e1646 100644
--- a/pr/4012/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
@@ -1,21 +1,21 @@
-DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
+DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
-Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
+Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
-Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
Sourcepub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
-Sourcepub async fn lookup_endpoint_by_domain_name(
+
Sourcepub async fn lookup_endpoint_by_domain_name(
&self,
name: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by DNS name.
-Sourcepub async fn lookup_endpoint_by_domain_name_staggered(
+
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read more
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl Resolve for DnsResolver
Source§fn resolve(
&self,
name: Name,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = SocketAddr> + Send>, Box<dyn Error + Send + Sync>>> + Send>>
Performs DNS resolution on a Name.
diff --git a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
index 18c6d69f5b..848eeb8286 100644
--- a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
+++ b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
@@ -1,11 +1,11 @@
-TxtRecordData in iroh::dns - Rust TxtRecordData
pub struct TxtRecordData(/* private fields */);
Available on non-wasm_browser only.Expand description
Record data for a TXT record.
+TxtRecordData in iroh::dns - Rust TxtRecordData
pub struct TxtRecordData(/* private fields */);
Available on non-wasm_browser only.Expand description
Record data for a TXT record.
This contains a list of character strings, as defined in RFC 1035 Section 3.3.14.
TxtRecordData implements fmt::Display, so you can call ToString::to_string to
convert the record data into a string. This will parse each character string with
String::from_utf8_lossy and then concatenate all strings without a separator.
If you want to process each character string individually, use Self::iter.
-Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
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 TxtRecordData
Source§impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordDatawhere
+
Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
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 TxtRecordData
Source§impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordData
Creates a value from an iterator. Read moreAuto Trait Implementations§
§impl Freeze for TxtRecordData
§impl RefUnwindSafe for TxtRecordData
§impl Send for TxtRecordData
§impl Sync for TxtRecordData
§impl Unpin for TxtRecordData
§impl UnwindSafe for TxtRecordData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 5b2edceaed..79d4869ffe 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
index 1f57c25335..391ae319a4 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
@@ -1,4 +1,4 @@
-AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
+AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -12,7 +12,7 @@
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
Blanket Implementations§
Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
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/4012/docs/iroh/endpoint/enum.AuthenticationError.html b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
index 62d270d598..8faf7c280a 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
@@ -1,4 +1,4 @@
-AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
+AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
RemoteId {
source: RemoteEndpointIdError,
meta: Meta,
@@ -8,7 +8,7 @@
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
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/4012/docs/iroh/endpoint/enum.ConnectingError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
index 9aa3a5d9e4..9be5e01897 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
@@ -1,4 +1,4 @@
-ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
§InternalConsistencyError
Fields
§source: RemoteStateActorStoppedErrorPrivate source type, cannot be created publicly.
§meta: MetaCaptured call-site metadata
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
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/4012/docs/iroh/endpoint/enum.ConnectionError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
index 4dd6c4051e..f8bc5a6507 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
@@ -21,7 +21,7 @@ and [TransportConfig::keep_alive_interval()].
§LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§fn eq(&self, other: &ConnectionError) -> bool
Tests for self and other values to be equal, and is used by ==.Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§impl Eq for ConnectionError
§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index ea8c6e648c..bda4de1c47 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
+Module pkarr
Expand description
An address lookup service which publishes and resolves endpoint information using a pkarr relay.
Public-Key Addressable Resource Records, pkarr, is a system which allows publishing
DNS Resource Records owned by a particular SecretKey under a name derived from its
corresponding PublicKey, also known as the EndpointId. Additionally this pkarr
@@ -20,11 +20,10 @@ the Mainline DHT on behalf on the client as well as cache lookups performed on t
to improve performance.
PkarrPublisher filters published addresses based on the endpoint’s relay configuration
-by default: when relays are enabled, only relay addresses are published
-(AddrFilter::relay_only); when relays are disabled, all addresses are published
-(AddrFilter::unfiltered). You can override this via
-PkarrPublisherBuilder::addr_filter.
PkarrPublisher filters published addresses: only relay addresses are published by default.
+To change this behavior, use PkarrPublisherBuilder::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.
For address lookup in iroh the pkarr Resource Records contain the addressing information, providing endpoints which retrieve the pkarr Resource Record with enough detail to contact the iroh endpoint.
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html index 4362cdc531..6c23508b78 100644 --- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html +++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisher.html @@ -1,28 +1,28 @@ -PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }Expand description
Publisher of address lookup information to a pkarr relay.
+PkarrPublisher
pub struct PkarrPublisher { /* private fields */ }Expand description
Publisher of address lookup information to a pkarr relay.
This publisher uses HTTP to publish address lookup information to a pkarr relay server, see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only publishes address lookup information, for the corresponding resolver use
the PkarrResolver together with ConcurrentAddressLookup.
This publisher will only publish the RelayUrl if it is set, otherwise the direct addresses are published instead.
Implementations§
Source§impl PkarrPublisher
impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
pub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
Implementations§
Source§impl PkarrPublisher
impl PkarrPublisher
Sourcepub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
pub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder
Returns a PkarrPublisherBuilder that publishes endpoint info to a pkarr relay at pkarr_relay.
If no further options are set, the pkarr publisher will use DEFAULT_PKARR_TTL as the
time-to-live value for the published packets, and it will republish Address Lookup information
every DEFAULT_REPUBLISH_INTERVAL, even if the information is unchanged.
PkarrPublisherBuilder implements AddressLookupBuilder, so it can be passed to address_lookup.
It will then use the endpoint’s secret key to sign published packets.
Sourcepub fn n0_dns() -> PkarrPublisherBuilder
pub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrPublisherBuilder
pub fn n0_dns() -> PkarrPublisherBuilder
Creates a pkarr publisher which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0, at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable
IROH_FORCE_STAGING_RELAYS set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
pub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
+Sourcepub fn update_endpoint_data(&self, data: &EndpointData)
pub fn update_endpoint_data(&self, data: &EndpointData)
Publishes the addressing information about this endpoint to a pkarr relay.
This is a nonblocking function, the actual update is performed in the background.
-Trait Implementations§
Source§impl AddressLookup for PkarrPublisher
impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
fn publish(&self, data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreTrait Implementations§
Source§impl AddressLookup for PkarrPublisher
impl AddressLookup for PkarrPublisher
Source§fn publish(&self, data: &EndpointData)
fn publish(&self, data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrPublisher
impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
fn clone(&self) -> PkarrPublisher
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 PkarrPublisher
impl !RefUnwindSafe for PkarrPublisher
impl Send for PkarrPublisher
impl Sync for PkarrPublisher
impl Unpin for PkarrPublisher
impl !UnwindSafe for PkarrPublisher
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for T
impl<T> AddressLookupBuilder for T
Source§impl Clone for PkarrPublisher
impl Clone for PkarrPublisher
Source§fn clone(&self) -> PkarrPublisher
fn clone(&self) -> PkarrPublisher
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 PkarrPublisher
impl !RefUnwindSafe for PkarrPublisher
impl Send for PkarrPublisher
impl Sync for PkarrPublisher
impl Unpin for PkarrPublisher
impl !UnwindSafe for PkarrPublisher
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
index 6fc36db1c5..0c3174efaf 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
@@ -1,27 +1,27 @@
-PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
+PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
-Implementations§
Source§impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
-Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
+Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
-Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
public pkarr server.
However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine
connected to the internet via public IP addresses without a firewall.
-In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup
+In such cases, publishing them can make dialing such endpoints via DNS or Pkarr lookup
faster, potentially skipping a relay connection altogether.
-Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
) -> PkarrPublisher
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index b3f3945806..282af05393 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index e7eef60acd..d820c4910a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index 1f1302a316..aeed450263 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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/4012/docs/iroh/dns/struct.DnsResolver.html b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
index c068ae3a48..82b49e1646 100644
--- a/pr/4012/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
@@ -1,21 +1,21 @@
-DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
+DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
-Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
+Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
-Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
Sourcepub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
-Sourcepub async fn lookup_endpoint_by_domain_name(
+
Sourcepub async fn lookup_endpoint_by_domain_name(
&self,
name: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by DNS name.
-Sourcepub async fn lookup_endpoint_by_domain_name_staggered(
+
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read more
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl Resolve for DnsResolver
Source§fn resolve(
&self,
name: Name,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = SocketAddr> + Send>, Box<dyn Error + Send + Sync>>> + Send>>
Performs DNS resolution on a Name.
diff --git a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
index 18c6d69f5b..848eeb8286 100644
--- a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
+++ b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
@@ -1,11 +1,11 @@
-TxtRecordData in iroh::dns - Rust TxtRecordData
pub struct TxtRecordData(/* private fields */);
Available on non-wasm_browser only.Expand description
Record data for a TXT record.
+TxtRecordData in iroh::dns - Rust TxtRecordData
pub struct TxtRecordData(/* private fields */);
Available on non-wasm_browser only.Expand description
Record data for a TXT record.
This contains a list of character strings, as defined in RFC 1035 Section 3.3.14.
TxtRecordData implements fmt::Display, so you can call ToString::to_string to
convert the record data into a string. This will parse each character string with
String::from_utf8_lossy and then concatenate all strings without a separator.
If you want to process each character string individually, use Self::iter.
-Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
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 TxtRecordData
Source§impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordDatawhere
+
Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
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 TxtRecordData
Source§impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordData
Creates a value from an iterator. Read moreAuto Trait Implementations§
§impl Freeze for TxtRecordData
§impl RefUnwindSafe for TxtRecordData
§impl Send for TxtRecordData
§impl Sync for TxtRecordData
§impl Unpin for TxtRecordData
§impl UnwindSafe for TxtRecordData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 5b2edceaed..79d4869ffe 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
index 1f57c25335..391ae319a4 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
@@ -1,4 +1,4 @@
-AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
+AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -12,7 +12,7 @@
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
Blanket Implementations§
Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
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/4012/docs/iroh/endpoint/enum.AuthenticationError.html b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
index 62d270d598..8faf7c280a 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
@@ -1,4 +1,4 @@
-AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
+AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
RemoteId {
source: RemoteEndpointIdError,
meta: Meta,
@@ -8,7 +8,7 @@
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
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/4012/docs/iroh/endpoint/enum.ConnectingError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
index 9aa3a5d9e4..9be5e01897 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
@@ -1,4 +1,4 @@
-ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
§InternalConsistencyError
Fields
§source: RemoteStateActorStoppedErrorPrivate source type, cannot be created publicly.
§meta: MetaCaptured call-site metadata
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
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/4012/docs/iroh/endpoint/enum.ConnectionError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
index 4dd6c4051e..f8bc5a6507 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
@@ -21,7 +21,7 @@ and [TransportConfig::keep_alive_interval()].
§LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§fn eq(&self, other: &ConnectionError) -> bool
Tests for self and other values to be equal, and is used by ==.Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§impl Eq for ConnectionError
§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index ea8c6e648c..bda4de1c47 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
index 6fc36db1c5..0c3174efaf 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrPublisherBuilder.html
@@ -1,27 +1,27 @@
-PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
+PkarrPublisherBuilder in iroh::address_lookup::pkarr - Rust PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description
Builder for PkarrPublisher.
-Implementations§
Source§impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
-Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
+Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
-Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
+Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn addr_filter(self, filter: AddrFilter) -> Self
Sets the address filter to control which addresses are published to the pkarr server.
By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
public pkarr server.
However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine
connected to the internet via public IP addresses without a firewall.
-In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup
+In such cases, publishing them can make dialing such endpoints via DNS or Pkarr lookup
faster, potentially skipping a relay connection altogether.
-Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
) -> PkarrPublisher
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
-Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrPublisherBuilder
§impl !RefUnwindSafe for PkarrPublisherBuilder
§impl Send for PkarrPublisherBuilder
§impl Sync for PkarrPublisherBuilder
§impl Unpin for PkarrPublisherBuilder
§impl !UnwindSafe for PkarrPublisherBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index b3f3945806..282af05393 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index e7eef60acd..d820c4910a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index 1f1302a316..aeed450263 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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/4012/docs/iroh/dns/struct.DnsResolver.html b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
index c068ae3a48..82b49e1646 100644
--- a/pr/4012/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
@@ -1,21 +1,21 @@
-DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
+DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
-Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
+Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
-Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
Sourcepub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
-Sourcepub async fn lookup_endpoint_by_domain_name(
+
Sourcepub async fn lookup_endpoint_by_domain_name(
&self,
name: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by DNS name.
-Sourcepub async fn lookup_endpoint_by_domain_name_staggered(
+
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read more
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl Resolve for DnsResolver
Source§fn resolve(
&self,
name: Name,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = SocketAddr> + Send>, Box<dyn Error + Send + Sync>>> + Send>>
Performs DNS resolution on a Name.
diff --git a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
index 18c6d69f5b..848eeb8286 100644
--- a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
+++ b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
@@ -1,11 +1,11 @@
-TxtRecordData in iroh::dns - Rust TxtRecordData
pub struct TxtRecordData(/* private fields */);
Available on non-wasm_browser only.Expand description
Record data for a TXT record.
+TxtRecordData in iroh::dns - Rust TxtRecordData
pub struct TxtRecordData(/* private fields */);
Available on non-wasm_browser only.Expand description
Record data for a TXT record.
This contains a list of character strings, as defined in RFC 1035 Section 3.3.14.
TxtRecordData implements fmt::Display, so you can call ToString::to_string to
convert the record data into a string. This will parse each character string with
String::from_utf8_lossy and then concatenate all strings without a separator.
If you want to process each character string individually, use Self::iter.
-Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
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 TxtRecordData
Source§impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordDatawhere
+
Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
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 TxtRecordData
Source§impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordData
Creates a value from an iterator. Read moreAuto Trait Implementations§
§impl Freeze for TxtRecordData
§impl RefUnwindSafe for TxtRecordData
§impl Send for TxtRecordData
§impl Sync for TxtRecordData
§impl Unpin for TxtRecordData
§impl UnwindSafe for TxtRecordData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 5b2edceaed..79d4869ffe 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
index 1f57c25335..391ae319a4 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
@@ -1,4 +1,4 @@
-AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
+AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -12,7 +12,7 @@
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
Blanket Implementations§
Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
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/4012/docs/iroh/endpoint/enum.AuthenticationError.html b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
index 62d270d598..8faf7c280a 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
@@ -1,4 +1,4 @@
-AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
+AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
RemoteId {
source: RemoteEndpointIdError,
meta: Meta,
@@ -8,7 +8,7 @@
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
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/4012/docs/iroh/endpoint/enum.ConnectingError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
index 9aa3a5d9e4..9be5e01897 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
@@ -1,4 +1,4 @@
-ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
§InternalConsistencyError
Fields
§source: RemoteStateActorStoppedErrorPrivate source type, cannot be created publicly.
§meta: MetaCaptured call-site metadata
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
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/4012/docs/iroh/endpoint/enum.ConnectionError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
index 4dd6c4051e..f8bc5a6507 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
@@ -21,7 +21,7 @@ and [TransportConfig::keep_alive_interval()].
§LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§fn eq(&self, other: &ConnectionError) -> bool
Tests for self and other values to be equal, and is used by ==.Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§impl Eq for ConnectionError
§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index ea8c6e648c..bda4de1c47 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }Expand description
Builder for PkarrPublisher.
PkarrPublisherBuilder
pub struct PkarrPublisherBuilder { /* private fields */ }Expand description
Builder for PkarrPublisher.
Implementations§
Source§impl PkarrPublisherBuilder
impl PkarrPublisherBuilder
Implementations§
Source§impl PkarrPublisherBuilder
impl PkarrPublisherBuilder
Sourcepub fn ttl(self, ttl: u32) -> Self
pub fn ttl(self, ttl: u32) -> Self
Sets the TTL (time-to-live) for published packets.
Default is DEFAULT_PKARR_TTL.
Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
pub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
+Sourcepub fn republish_interval(self, republish_interval: Duration) -> Self
pub fn republish_interval(self, republish_interval: Duration) -> Self
Sets the interval after which packets are republished even if our endpoint info did not change.
Default is DEFAULT_REPUBLISH_INTERVAL.
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
wasm_browser only.Sets the DNS resolver to use for resolving the pkarr relay URL.
-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 pkarr server.
+Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
wasm_browser only.Sets the DNS resolver to use for resolving the pkarr relay URL.
+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 pkarr server.
By default AddrFilter::relay_only is used. This avoids leaking IP addresses to the
public pkarr server.
However, enabling IP address publishing can be useful, e.g. when iroh runs on a machine connected to the internet via public IP addresses without a firewall. -In such cases, publishing them can make dialing such endpoints via DNS or PKARR lookup +In such cases, publishing them can make dialing such endpoints via DNS or Pkarr lookup faster, potentially skipping a relay connection altogether.
-Sourcepub fn build(
self,
secret_key: SecretKey,
tls_config: ClientConfig,
) -> PkarrPublisher
pub fn build( self, secret_key: SecretKey, tls_config: ClientConfig, ) -> PkarrPublisher
Builds the PkarrPublisher with the passed secret key for signing packets.
This publisher will be able to publish [pkarr] records for SecretKey.
Trait Implementations§
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrPublisherBuilder
impl AddressLookupBuilder for PkarrPublisherBuilder
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 PkarrPublisherBuilder
impl !RefUnwindSafe for PkarrPublisherBuilder
impl Send for PkarrPublisherBuilder
impl Sync for PkarrPublisherBuilder
impl Unpin for PkarrPublisherBuilder
impl !UnwindSafe for PkarrPublisherBuilder
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 PkarrPublisherBuilder
impl !RefUnwindSafe for PkarrPublisherBuilder
impl Send for PkarrPublisherBuilder
impl Sync for PkarrPublisherBuilder
impl Unpin for PkarrPublisherBuilder
impl !UnwindSafe for PkarrPublisherBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
index b3f3945806..282af05393 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClient.html
@@ -1,20 +1,20 @@
-PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
-Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
+PkarrRelayClient in iroh::address_lookup::pkarr - Rust PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }
Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
+Implementations§
Source§impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
-Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
-Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
-Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
Publishes a [SignedPacket].
-Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
§impl !RefUnwindSafe for PkarrRelayClient
§impl Send for PkarrRelayClient
§impl Sync for PkarrRelayClient
§impl Unpin for PkarrRelayClient
§impl !UnwindSafe for PkarrRelayClient
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index e7eef60acd..d820c4910a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index 1f1302a316..aeed450263 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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/4012/docs/iroh/dns/struct.DnsResolver.html b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
index c068ae3a48..82b49e1646 100644
--- a/pr/4012/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
@@ -1,21 +1,21 @@
-DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
+DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
-Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
+Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
-Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
Sourcepub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
-Sourcepub async fn lookup_endpoint_by_domain_name(
+
Sourcepub async fn lookup_endpoint_by_domain_name(
&self,
name: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by DNS name.
-Sourcepub async fn lookup_endpoint_by_domain_name_staggered(
+
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read more
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read moreSource§impl Resolve for DnsResolver
Source§fn resolve(
&self,
name: Name,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = SocketAddr> + Send>, Box<dyn Error + Send + Sync>>> + Send>>
Performs DNS resolution on a Name.
diff --git a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
index 18c6d69f5b..848eeb8286 100644
--- a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
+++ b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
@@ -1,11 +1,11 @@
-TxtRecordData in iroh::dns - Rust TxtRecordData
pub struct TxtRecordData(/* private fields */);
Available on non-wasm_browser only.Expand description
Record data for a TXT record.
+TxtRecordData in iroh::dns - Rust TxtRecordData
pub struct TxtRecordData(/* private fields */);
Available on non-wasm_browser only.Expand description
Record data for a TXT record.
This contains a list of character strings, as defined in RFC 1035 Section 3.3.14.
TxtRecordData implements fmt::Display, so you can call ToString::to_string to
convert the record data into a string. This will parse each character string with
String::from_utf8_lossy and then concatenate all strings without a separator.
If you want to process each character string individually, use Self::iter.
-Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
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 TxtRecordData
Source§impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordDatawhere
+
Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
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 TxtRecordData
Source§impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordData
Creates a value from an iterator. Read moreAuto Trait Implementations§
§impl Freeze for TxtRecordData
§impl RefUnwindSafe for TxtRecordData
§impl Send for TxtRecordData
§impl Sync for TxtRecordData
§impl Unpin for TxtRecordData
§impl UnwindSafe for TxtRecordData
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 5b2edceaed..79d4869ffe 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
index 1f57c25335..391ae319a4 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
@@ -1,4 +1,4 @@
-AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
+AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -12,7 +12,7 @@
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
Blanket Implementations§
Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
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/4012/docs/iroh/endpoint/enum.AuthenticationError.html b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
index 62d270d598..8faf7c280a 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
@@ -1,4 +1,4 @@
-AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
+AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
RemoteId {
source: RemoteEndpointIdError,
meta: Meta,
@@ -8,7 +8,7 @@
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
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/4012/docs/iroh/endpoint/enum.ConnectingError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
index 9aa3a5d9e4..9be5e01897 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
@@ -1,4 +1,4 @@
-ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
§InternalConsistencyError
Fields
§source: RemoteStateActorStoppedErrorPrivate source type, cannot be created publicly.
§meta: MetaCaptured call-site metadata
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
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/4012/docs/iroh/endpoint/enum.ConnectionError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
index 4dd6c4051e..f8bc5a6507 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
@@ -21,7 +21,7 @@ and [TransportConfig::keep_alive_interval()].
§LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§fn eq(&self, other: &ConnectionError) -> bool
Tests for self and other values to be equal, and is used by ==.Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§impl Eq for ConnectionError
§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index ea8c6e648c..bda4de1c47 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
Implementations§
Source§impl PkarrRelayClient
impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
pub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
PkarrRelayClient
pub struct PkarrRelayClient { /* private fields */ }Expand description
A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.
Implementations§
Source§impl PkarrRelayClient
impl PkarrRelayClient
Sourcepub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
pub fn new(pkarr_relay_url: Url, tls_config: ClientConfig) -> Self
Create a new PkarrRelayClient with default settings.
Use the PkarrRelayClient::builder to get a builder that allows for
adding custom settings.
Sourcepub fn builder(
pkarr_relay_url: Url,
tls_config: ClientConfig,
) -> PkarrRelayClientBuilder
pub fn builder( pkarr_relay_url: Url, tls_config: ClientConfig, ) -> PkarrRelayClientBuilder
Create a PkarrRelayClientBuilder.
Sourcepub async fn resolve(
&self,
endpoint_id: EndpointId,
) -> Result<SignedPacket, AddressLookupError>
pub async fn resolve( &self, endpoint_id: EndpointId, ) -> Result<SignedPacket, AddressLookupError>
Resolves a [SignedPacket] for the given EndpointId.
Sourcepub async fn publish(
&self,
signed_packet: &SignedPacket,
) -> Result<(), PkarrError>
pub async fn publish( &self, signed_packet: &SignedPacket, ) -> Result<(), PkarrError>
Publishes a [SignedPacket].
Trait Implementations§
Source§impl Clone for PkarrRelayClient
impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
impl !RefUnwindSafe for PkarrRelayClient
impl Send for PkarrRelayClient
impl Sync for PkarrRelayClient
impl Unpin for PkarrRelayClient
impl !UnwindSafe for PkarrRelayClient
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PkarrRelayClient
impl Clone for PkarrRelayClient
Source§fn clone(&self) -> PkarrRelayClient
fn clone(&self) -> PkarrRelayClient
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 PkarrRelayClient
impl !RefUnwindSafe for PkarrRelayClient
impl Send for PkarrRelayClient
impl Sync for PkarrRelayClient
impl Unpin for PkarrRelayClient
impl !UnwindSafe for PkarrRelayClient
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
index e7eef60acd..d820c4910a 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrRelayClientBuilder.html
@@ -1,7 +1,7 @@
-PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
-Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
-Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index 1f1302a316..aeed450263 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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/4012/docs/iroh/dns/struct.DnsResolver.html b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
index c068ae3a48..82b49e1646 100644
--- a/pr/4012/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
@@ -1,21 +1,21 @@
-DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
+DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
-Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
+Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
-Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
Sourcepub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
-Sourcepub async fn lookup_endpoint_by_domain_name(
+
Sourcepub async fn lookup_endpoint_by_domain_name(
&self,
name: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by DNS name.
-Sourcepub async fn lookup_endpoint_by_domain_name_staggered(
+
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Trait Implementations§
Source§impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
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 DnsResolver
Source§impl Default for DnsResolver
Source§fn default() -> DnsResolver
Returns the “default value” for a type. Read more
PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }Expand description
A builder for the PkarrRelayClient
Implementations§
Source§impl PkarrRelayClientBuilder
impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
pub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
wasm_browser only.Passes an optional DNS resolver for the client to use.
-Sourcepub fn build(self) -> PkarrRelayClient
pub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
impl !RefUnwindSafe for PkarrRelayClientBuilder
impl Send for PkarrRelayClientBuilder
impl Sync for PkarrRelayClientBuilder
impl Unpin for PkarrRelayClientBuilder
impl !UnwindSafe for PkarrRelayClientBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index 1f1302a316..aeed450263 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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/4012/docs/iroh/dns/struct.DnsResolver.html b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
index c068ae3a48..82b49e1646 100644
--- a/pr/4012/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
@@ -1,21 +1,21 @@
-DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
+DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
-Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
+Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
-Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
Sourcepub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
-Sourcepub async fn lookup_endpoint_by_domain_name(
+
Sourcepub async fn lookup_endpoint_by_domain_name(
&self,
name: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by DNS name.
-Sourcepub async fn lookup_endpoint_by_domain_name_staggered(
+
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
impl<T> Any for Twhere
+PkarrRelayClientBuilder in iroh::address_lookup::pkarr - Rust PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }
Expand description
A builder for the PkarrRelayClient
+Implementations§
Source§impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
+Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
§impl !RefUnwindSafe for PkarrRelayClientBuilder
§impl Send for PkarrRelayClientBuilder
§impl Sync for PkarrRelayClientBuilder
§impl Unpin for PkarrRelayClientBuilder
§impl !UnwindSafe for PkarrRelayClientBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index 1f1302a316..aeed450263 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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/4012/docs/iroh/dns/struct.DnsResolver.html b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
index c068ae3a48..82b49e1646 100644
--- a/pr/4012/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
@@ -1,21 +1,21 @@
-DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
+DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
-Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
+Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
-Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
Sourcepub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
-Sourcepub async fn lookup_endpoint_by_domain_name(
+
Sourcepub async fn lookup_endpoint_by_domain_name(
&self,
name: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by DNS name.
-Sourcepub async fn lookup_endpoint_by_domain_name_staggered(
+
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
PkarrRelayClientBuilder
pub struct PkarrRelayClientBuilder { /* private fields */ }Expand description
A builder for the PkarrRelayClient
Implementations§
Source§impl PkarrRelayClientBuilder
impl PkarrRelayClientBuilder
Sourcepub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
Available on non-wasm_browser only.
pub fn set_dns_resolver(self, dns_resolver: Option<DnsResolver>) -> Self
wasm_browser only.Passes an optional DNS resolver for the client to use.
+Sourcepub fn build(self) -> PkarrRelayClient
pub fn build(self) -> PkarrRelayClient
Build a PkarrRelayClient.
Trait Implementations§
Source§impl Clone for PkarrRelayClientBuilder
impl Clone for PkarrRelayClientBuilder
Source§fn clone(&self) -> PkarrRelayClientBuilder
fn clone(&self) -> PkarrRelayClientBuilder
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 PkarrRelayClientBuilder
impl !RefUnwindSafe for PkarrRelayClientBuilder
impl Send for PkarrRelayClientBuilder
impl Sync for PkarrRelayClientBuilder
impl Unpin for PkarrRelayClientBuilder
impl !UnwindSafe for PkarrRelayClientBuilder
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
index 1f1302a316..aeed450263 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolver.html
@@ -1,21 +1,21 @@
-PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver in iroh::address_lookup::pkarr - Rust PkarrResolver
pub struct PkarrResolver { /* private fields */ }
Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server,
see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
-Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
-Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
-Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
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 PkarrResolver
§impl !RefUnwindSafe for PkarrResolver
§impl Send for PkarrResolver
§impl Sync for PkarrResolver
§impl Unpin for PkarrResolver
§impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
T: AddressLookup,
Source§fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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/4012/docs/iroh/dns/struct.DnsResolver.html b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
index c068ae3a48..82b49e1646 100644
--- a/pr/4012/docs/iroh/dns/struct.DnsResolver.html
+++ b/pr/4012/docs/iroh/dns/struct.DnsResolver.html
@@ -1,21 +1,21 @@
-DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
+DnsResolver in iroh::dns - Rust DnsResolver
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
-Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
Sourcepub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
-Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
+Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
-Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
Sourcepub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
Sourcepub async fn resolve_host(
+
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
-Sourcepub async fn lookup_endpoint_by_domain_name(
+
PkarrResolver
pub struct PkarrResolver { /* private fields */ }Expand description
Resolver of address lookup information from a pkarr relay.
+PkarrResolver
pub struct PkarrResolver { /* private fields */ }Expand description
Resolver of address lookup information from a pkarr relay.
The resolver uses HTTP to query address lookup information from a pkarr relay server, see the module docs for details.
This implements the AddressLookup trait to be used as an address lookup service. Note
that it only resolves address lookup information, for the corresponding publisher use
the PkarrPublisher together with ConcurrentAddressLookup.
Implementations§
Source§impl PkarrResolver
impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
pub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
+Implementations§
Source§impl PkarrResolver
impl PkarrResolver
Sourcepub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
pub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder
Creates a new resolver builder using the pkarr relay server at the URL.
The builder implements AddressLookupBuilder.
Sourcepub fn n0_dns() -> PkarrResolverBuilder
pub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
+Sourcepub fn n0_dns() -> PkarrResolverBuilder
pub fn n0_dns() -> PkarrResolverBuilder
Creates a pkarr resolver builder which uses the number 0 pkarr relay server.
This uses the pkarr relay server operated by number 0 at
N0_DNS_PKARR_RELAY_PROD.
When running with the environment variable IROH_FORCE_STAGING_RELAYS
set to any non empty value N0_DNS_PKARR_RELAY_STAGING
server is used instead.
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
impl AddressLookup for PkarrResolver
Trait Implementations§
Source§impl AddressLookup for PkarrResolver
impl AddressLookup for PkarrResolver
Source§fn resolve(
&self,
endpoint_id: EndpointId,
-) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
fn resolve( &self, endpoint_id: EndpointId, -) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>
Source§fn publish(&self, _data: &EndpointData)
fn publish(&self, _data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
fn clone(&self) -> PkarrResolver
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 PkarrResolver
impl !RefUnwindSafe for PkarrResolver
impl Send for PkarrResolver
impl Sync for PkarrResolver
impl Unpin for PkarrResolver
impl !UnwindSafe for PkarrResolver
Blanket Implementations§
Source§impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
impl<T> AddressLookupBuilder for Twhere
+) -> Option<BoxStream<Result<AddressLookupItem, AddressLookupError>>>Source§fn publish(&self, _data: &EndpointData)
Publishes the given EndpointData to the Address Lookup mechanism. Read more
Source§fn publish(&self, _data: &EndpointData)
fn publish(&self, _data: &EndpointData)
EndpointData to the Address Lookup mechanism. Read moreSource§impl Clone for PkarrResolver
impl Clone for PkarrResolver
Source§fn clone(&self) -> PkarrResolver
fn clone(&self) -> PkarrResolver
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 PkarrResolver
impl !RefUnwindSafe for PkarrResolver
impl Send for PkarrResolver
impl Sync for PkarrResolver
impl Unpin for PkarrResolver
impl !UnwindSafe for PkarrResolver
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/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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.
fn into_address_lookup(
self,
_endpoint: &Endpoint,
diff --git a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
index 5b31de57dd..834e05bad1 100644
--- a/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
+++ b/pr/4012/docs/iroh/address_lookup/pkarr/struct.PkarrResolverBuilder.html
@@ -1,11 +1,11 @@
-PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
+PkarrResolverBuilder in iroh::address_lookup::pkarr - Rust PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description
Builder for PkarrResolver.
-Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
-Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
+Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
Source§fn into_address_lookup(
self,
endpoint: &Endpoint,
-) -> Result<impl AddressLookup, AddressLookupBuilderError>
Turns this builder into a ready-to-use AddressLookup. Read moreAuto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
Blanket Implementations§
Source§impl<T> Any for Twhere
+) -> Result<impl AddressLookup, AddressLookupBuilderError>Turns this builder into a ready-to-use AddressLookup. Read more
Auto Trait Implementations§
§impl Freeze for PkarrResolverBuilder
§impl !RefUnwindSafe for PkarrResolverBuilder
§impl Send for PkarrResolverBuilder
§impl Sync for PkarrResolverBuilder
§impl Unpin for PkarrResolverBuilder
§impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
index 5bd4c56b06..3a63891545 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html
+++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
Source§impl<T: AddressLookup> AddressLookup for FilteredAddressLookup<T>
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
index e0c90cdc9e..d5fac58423 100644
--- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookupBuilder.html
+++ b/pr/4012/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.
PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }Expand description
Builder for PkarrResolver.
PkarrResolverBuilder
pub struct PkarrResolverBuilder { /* private fields */ }Expand description
Builder for PkarrResolver.
Implementations§
Source§impl PkarrResolverBuilder
impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
wasm_browser only.Sets the DNS resolver to use for resolving the pkarr relay URL.
-Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
pub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
Trait Implementations§
Implementations§
Source§impl PkarrResolverBuilder
impl PkarrResolverBuilder
Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
wasm_browser only.Sets the DNS resolver to use for resolving the pkarr relay URL.
+Sourcepub fn build(self, tls_config: ClientConfig) -> PkarrResolver
pub fn build(self, tls_config: ClientConfig) -> PkarrResolver
Creates a PkarrResolver from this builder.
Trait Implementations§
Source§impl AddressLookupBuilder for PkarrResolverBuilder
impl AddressLookupBuilder for PkarrResolverBuilder
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 PkarrResolverBuilder
impl !RefUnwindSafe for PkarrResolverBuilder
impl Send for PkarrResolverBuilder
impl Sync for PkarrResolverBuilder
impl Unpin for PkarrResolverBuilder
impl !UnwindSafe for PkarrResolverBuilder
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 PkarrResolverBuilder
impl !RefUnwindSafe for PkarrResolverBuilder
impl Send for PkarrResolverBuilder
impl Sync for PkarrResolverBuilder
impl Unpin for PkarrResolverBuilder
impl !UnwindSafe for PkarrResolverBuilder
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/4012/docs/iroh/address_lookup/trait.AddressLookup.html b/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html index 5bd4c56b06..3a63891545 100644 --- a/pr/4012/docs/iroh/address_lookup/trait.AddressLookup.html +++ b/pr/4012/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 AddressLookup for ConcurrentAddressLookup
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 AddressLookup for ConcurrentAddressLookup
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.
DnsResolver
pub struct DnsResolver(/* private fields */);wasm_browser only.Expand description
The DNS resolver used throughout iroh.
DnsResolver
pub struct DnsResolver(/* private fields */);wasm_browser only.Expand description
The DNS resolver used throughout iroh.
By default, we use a built-in resolver that reads the system’s DNS configuration.
The nameservers can be customized by constructing the resolver with Self::builder.
Alternatively, you can create a fully custom DNS resolver by implementing the Resolver
trait and creating the resolver with Self::custom.
Implementations§
Source§impl DnsResolver
impl DnsResolver
Sourcepub fn new() -> DnsResolver
pub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
+Implementations§
Source§impl DnsResolver
impl DnsResolver
Sourcepub fn new() -> DnsResolver
pub fn new() -> DnsResolver
Creates a new DNS resolver with sensible cross-platform defaults.
We first try to read the system’s resolver from /etc/resolv.conf.
This does not work at least on some Androids, therefore we fallback
to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
-Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
pub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
Sourcepub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a builder to construct a DNS resolver with custom options.
+Sourcepub fn custom(resolver: impl Resolver) -> DnsResolver
pub fn custom(resolver: impl Resolver) -> DnsResolver
Creates a new DnsResolver from a struct that implements Resolver.
If you need more customization for DNS resolving than the Builder allows, you can
implement the Resolver trait on a struct and implement DNS resolution
however you see fit.
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Removes all entries from the cache.
-Sourcepub async fn lookup_txt<T>(
+
pub async fn lookup_txt<T>( +
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Removes all entries from the cache.
+Sourcepub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
pub async fn lookup_txt<T>(
&self,
host: T,
timeout: Duration,
@@ -27,13 +27,13 @@ however you see fit.
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv4 lookup with a timeout.
-Sourcepub async fn lookup_ipv6<T>(
+
pub async fn lookup_ipv6<T>( +
Sourcepub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
pub async fn lookup_ipv6<T>(
&self,
host: T,
timeout: Duration,
) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>where
T: ToString,
Performs an IPv6 lookup with a timeout.
-Sourcepub async fn lookup_ipv4_ipv6<T>(
+
pub async fn lookup_ipv4_ipv6<T>( +
Sourcepub async fn lookup_ipv4_ipv6<T>(
&self,
host: T,
timeout: Duration,
@@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
-
pub async fn lookup_ipv4_ipv6<T>( &self, host: T, timeout: Duration, @@ -42,13 +42,13 @@ however you see fit.
LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is
not usable on the stack, so we manually query both lookups concurrently and time them out
individually.
Sourcepub async fn resolve_host(
+
pub async fn resolve_host( +
Sourcepub async fn resolve_host(
&self,
url: &Url,
prefer_ipv6: bool,
timeout: Duration,
) -> Result<IpAddr, DnsError>
pub async fn resolve_host( &self, url: &Url, prefer_ipv6: bool, timeout: Duration, ) -> Result<IpAddr, DnsError>
Resolves a hostname from a URL to an IP address.
-Sourcepub async fn lookup_ipv4_staggered(
+
pub async fn lookup_ipv4_staggered( +
Sourcepub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv4_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -58,7 +58,7 @@ individually.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv6_staggered(
+
pub async fn lookup_ipv6_staggered( +
Sourcepub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
pub async fn lookup_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -68,7 +68,7 @@ result of the first successful call is returned, or a summary of all errors othe
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
-
Sourcepub async fn lookup_ipv4_ipv6_staggered(
+
pub async fn lookup_ipv4_ipv6_staggered( +
Sourcepub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_ipv4_ipv6_staggered(
&self,
host: impl ToString,
timeout: Duration,
@@ -79,18 +79,18 @@ result of the first successful call is returned, or a summary of all errors othe
at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in
Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Sourcepub async fn lookup_endpoint_by_id(
+
pub async fn lookup_endpoint_by_id( +
Sourcepub async fn lookup_endpoint_by_id(
&self,
endpoint_id: &PublicKey,
origin: &str,
) -> Result<EndpointInfo, LookupError>
pub async fn lookup_endpoint_by_id( &self, endpoint_id: &PublicKey, origin: &str, ) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by EndpointId and origin domain name.
To lookup endpoints that published their endpoint info to the DNS servers run by n0,
pass N0_DNS_ENDPOINT_ORIGIN_PROD as origin.
Sourcepub async fn lookup_endpoint_by_domain_name(
+
pub async fn lookup_endpoint_by_domain_name( +
Sourcepub async fn lookup_endpoint_by_domain_name(
&self,
name: &str,
) -> Result<EndpointInfo, LookupError>
pub async fn lookup_endpoint_by_domain_name( &self, name: &str, ) -> Result<EndpointInfo, LookupError>
Looks up endpoint info by DNS name.
-Sourcepub async fn lookup_endpoint_by_domain_name_staggered(
+
pub async fn lookup_endpoint_by_domain_name_staggered( +
Sourcepub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
pub async fn lookup_endpoint_by_id_staggered(
&self,
endpoint_id: &PublicKey,
origin: &str,
@@ -109,7 +109,7 @@ summary of all errors otherwise.
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
-
Trait Implementations§
Source§impl Clone for DnsResolver
impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
fn clone(&self) -> DnsResolver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DnsResolver
impl Debug for DnsResolver
Source§impl Default for DnsResolver
impl Default for DnsResolver
Source§fn default() -> DnsResolver
fn default() -> DnsResolver
Trait Implementations§
Source§impl Clone for DnsResolver
impl Clone for DnsResolver
Source§fn clone(&self) -> DnsResolver
fn clone(&self) -> DnsResolver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DnsResolver
impl Debug for DnsResolver
Source§impl Default for DnsResolver
impl Default for DnsResolver
Source§fn default() -> DnsResolver
fn default() -> DnsResolver
Source§impl Resolve for DnsResolver
impl Resolve for DnsResolver
Source§fn resolve(
&self,
name: Name,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = SocketAddr> + Send>, Box<dyn Error + Send + Sync>>> + Send>>
fn resolve( &self, name: Name, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = SocketAddr> + Send>, Box<dyn Error + Send + Sync>>> + Send>>
Name.
diff --git a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
index 18c6d69f5b..848eeb8286 100644
--- a/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
+++ b/pr/4012/docs/iroh/dns/struct.TxtRecordData.html
@@ -1,11 +1,11 @@
-TxtRecordData
pub struct TxtRecordData(/* private fields */);wasm_browser only.Expand description
Record data for a TXT record.
+TxtRecordData
pub struct TxtRecordData(/* private fields */);wasm_browser only.Expand description
Record data for a TXT record.
This contains a list of character strings, as defined in RFC 1035 Section 3.3.14.
TxtRecordData implements fmt::Display, so you can call ToString::to_string to
convert the record data into a string. This will parse each character string with
String::from_utf8_lossy and then concatenate all strings without a separator.
If you want to process each character string individually, use Self::iter.
Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
fn clone(&self) -> TxtRecordData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TxtRecordData
impl Debug for TxtRecordData
Source§impl Display for TxtRecordData
impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordDatawhere
+
fn from_iter<T>(iter: T) -> TxtRecordDatawhere
+
Implementations§
Trait Implementations§
Source§impl Clone for TxtRecordData
impl Clone for TxtRecordData
Source§fn clone(&self) -> TxtRecordData
fn clone(&self) -> TxtRecordData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TxtRecordData
impl Debug for TxtRecordData
Source§impl Display for TxtRecordData
impl Display for TxtRecordData
Source§impl FromIterator<Box<[u8]>> for TxtRecordData
impl FromIterator<Box<[u8]>> for TxtRecordData
Source§fn from_iter<T>(iter: T) -> TxtRecordData
fn from_iter<T>(iter: T) -> TxtRecordData
Auto Trait Implementations§
impl Freeze for TxtRecordData
impl RefUnwindSafe for TxtRecordData
impl Send for TxtRecordData
impl Sync for TxtRecordData
impl Unpin for TxtRecordData
impl UnwindSafe for TxtRecordData
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
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 5b2edceaed..79d4869ffe 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
index 1f57c25335..391ae319a4 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
@@ -1,4 +1,4 @@
-AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
+AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -12,7 +12,7 @@
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
Blanket Implementations§
Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
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/4012/docs/iroh/endpoint/enum.AuthenticationError.html b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
index 62d270d598..8faf7c280a 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
@@ -1,4 +1,4 @@
-AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
+AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
RemoteId {
source: RemoteEndpointIdError,
meta: Meta,
@@ -8,7 +8,7 @@
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
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/4012/docs/iroh/endpoint/enum.ConnectingError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
index 9aa3a5d9e4..9be5e01897 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
@@ -1,4 +1,4 @@
-ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
§InternalConsistencyError
Fields
§source: RemoteStateActorStoppedErrorPrivate source type, cannot be created publicly.
§meta: MetaCaptured call-site metadata
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
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/4012/docs/iroh/endpoint/enum.ConnectionError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
index 4dd6c4051e..f8bc5a6507 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
@@ -21,7 +21,7 @@ and [TransportConfig::keep_alive_interval()].
§LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§fn eq(&self, other: &ConnectionError) -> bool
Tests for self and other values to be equal, and is used by ==.Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§impl Eq for ConnectionError
§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index ea8c6e648c..bda4de1c47 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
index 5b2edceaed..79d4869ffe 100644
--- a/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
+++ b/pr/4012/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html
@@ -1,2 +1,2 @@
-ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust ENV_FORCE_STAGING_RELAYS
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
index 1f57c25335..391ae319a4 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AlpnError.html
@@ -1,4 +1,4 @@
-AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
+AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -12,7 +12,7 @@
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
Blanket Implementations§
Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
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/4012/docs/iroh/endpoint/enum.AuthenticationError.html b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
index 62d270d598..8faf7c280a 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
@@ -1,4 +1,4 @@
-AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
+AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
RemoteId {
source: RemoteEndpointIdError,
meta: Meta,
@@ -8,7 +8,7 @@
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
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/4012/docs/iroh/endpoint/enum.ConnectingError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
index 9aa3a5d9e4..9be5e01897 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
@@ -1,4 +1,4 @@
-ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
§InternalConsistencyError
Fields
§source: RemoteStateActorStoppedErrorPrivate source type, cannot be created publicly.
§meta: MetaCaptured call-site metadata
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
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/4012/docs/iroh/endpoint/enum.ConnectionError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
index 4dd6c4051e..f8bc5a6507 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
@@ -21,7 +21,7 @@ and [TransportConfig::keep_alive_interval()].
§LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§fn eq(&self, other: &ConnectionError) -> bool
Tests for self and other values to be equal, and is used by ==.Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§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()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.§impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§impl Eq for ConnectionError
§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl !RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl !UnwindSafe for ConnectionError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index ea8c6e648c..bda4de1c47 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
ENV_FORCE_STAGING_RELAYS
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";Expand description
Environment variable to force the use of staging relays.
+ENV_FORCE_STAGING_RELAYS
AlpnError
#[non_exhaustive]pub enum AlpnError {
+AlpnError in iroh::endpoint - Rust AlpnError
#[non_exhaustive]pub enum AlpnError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -12,7 +12,7 @@
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Error for AlpnError
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<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for AlpnError
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 AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
Blanket Implementations§
Trait Implementations§
Source§impl Error for AlpnError
impl Error for AlpnError
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<ConnectionError> for AlpnError
impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl StackError for AlpnError
impl StackError for AlpnError
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 AlpnError
impl !RefUnwindSafe for AlpnError
impl Send for AlpnError
impl Sync for AlpnError
impl Unpin for AlpnError
impl !UnwindSafe for AlpnError
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/4012/docs/iroh/endpoint/enum.AuthenticationError.html b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
index 62d270d598..8faf7c280a 100644
--- a/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.AuthenticationError.html
@@ -1,4 +1,4 @@
-AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
+AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
RemoteId {
source: RemoteEndpointIdError,
meta: Meta,
@@ -8,7 +8,7 @@
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
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/4012/docs/iroh/endpoint/enum.ConnectingError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
index 9aa3a5d9e4..9be5e01897 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
@@ -1,4 +1,4 @@
-ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
§InternalConsistencyError
Fields
§source: RemoteStateActorStoppedErrorPrivate source type, cannot be created publicly.
§meta: MetaCaptured call-site metadata
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
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 ConnectingError
Source§impl Display for ConnectingError
Source§impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectingError
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 ConnectingError
§impl !RefUnwindSafe for ConnectingError
§impl Send for ConnectingError
§impl Sync for ConnectingError
§impl Unpin for ConnectingError
§impl !UnwindSafe for ConnectingError
Blanket Implementations§
AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
+AuthenticationError in iroh::endpoint - Rust AuthenticationError
#[non_exhaustive]pub enum AuthenticationError {
RemoteId {
source: RemoteEndpointIdError,
meta: Meta,
@@ -8,7 +8,7 @@
},
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
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 AuthenticationError
Source§impl Display for AuthenticationError
Source§impl Error for AuthenticationError
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<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
Converts to this type from the input type.Source§impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
Converts to this type from the input type.Source§impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
Converts to this type from the input type.Source§impl StackError for AuthenticationError
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 AuthenticationError
§impl RefUnwindSafe for AuthenticationError
§impl Send for AuthenticationError
§impl Sync for AuthenticationError
§impl Unpin for AuthenticationError
§impl UnwindSafe for AuthenticationError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for AuthenticationError
impl Clone for AuthenticationError
Source§fn clone(&self) -> AuthenticationError
fn clone(&self) -> AuthenticationError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthenticationError
impl Debug for AuthenticationError
Source§impl Display for AuthenticationError
impl Display for AuthenticationError
Source§impl Error for AuthenticationError
impl Error for AuthenticationError
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<AuthenticationError> for AnyError
impl From<AuthenticationError> for AnyError
Source§fn from(value: AuthenticationError) -> AnyError
fn from(value: AuthenticationError) -> AnyError
Source§impl From<AuthenticationError> for ConnectingError
impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
fn from(source: AuthenticationError) -> Self
Source§impl From<RemoteEndpointIdError> for AuthenticationError
impl From<RemoteEndpointIdError> for AuthenticationError
Source§fn from(source: RemoteEndpointIdError) -> Self
fn from(source: RemoteEndpointIdError) -> Self
Source§impl StackError for AuthenticationError
impl StackError for AuthenticationError
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 AuthenticationError
impl RefUnwindSafe for AuthenticationError
impl Send for AuthenticationError
impl Sync for AuthenticationError
impl Unpin for AuthenticationError
impl UnwindSafe for AuthenticationError
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/4012/docs/iroh/endpoint/enum.ConnectingError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
index 9aa3a5d9e4..9be5e01897 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectingError.html
@@ -1,4 +1,4 @@
-ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
ConnectingError
#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -19,7 +19,7 @@
InternalConsistencyError
Fields
source: RemoteStateActorStoppedErrorPrivate source type, cannot be created publicly.
meta: MetaCaptured call-site metadata
LocallyRejected
Fields
meta: MetaCaptured call-site metadata
-Trait Implementations§
Source§impl Clone for ConnectingError
impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
fn clone(&self) -> ConnectingError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectingError
impl Debug for ConnectingError
Source§impl Display for ConnectingError
impl Display for ConnectingError
Source§impl Error for ConnectingError
impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
fn from(source: AuthenticationError) -> Self
Source§impl From<ConnectingError> for AcceptError
impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
fn from(source: ConnectingError) -> Self
Source§impl From<ConnectingError> for AnyError
impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
fn from(value: ConnectingError) -> AnyError
Source§impl From<ConnectingError> for ConnectError
impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
fn from(source: ConnectingError) -> Self
Source§impl From<ConnectionError> for ConnectingError
impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl StackError for ConnectingError
impl StackError for ConnectingError
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 ConnectingError
impl !RefUnwindSafe for ConnectingError
impl Send for ConnectingError
impl Sync for ConnectingError
impl Unpin for ConnectingError
impl !UnwindSafe for ConnectingError
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectingError
impl Clone for ConnectingError
Source§fn clone(&self) -> ConnectingError
fn clone(&self) -> ConnectingError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectingError
impl Debug for ConnectingError
Source§impl Display for ConnectingError
impl Display for ConnectingError
Source§impl Error for ConnectingError
impl Error for ConnectingError
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<AuthenticationError> for ConnectingError
impl From<AuthenticationError> for ConnectingError
Source§fn from(source: AuthenticationError) -> Self
fn from(source: AuthenticationError) -> Self
Source§impl From<ConnectingError> for AcceptError
impl From<ConnectingError> for AcceptError
Source§fn from(source: ConnectingError) -> Self
fn from(source: ConnectingError) -> Self
Source§impl From<ConnectingError> for AnyError
impl From<ConnectingError> for AnyError
Source§fn from(value: ConnectingError) -> AnyError
fn from(value: ConnectingError) -> AnyError
Source§impl From<ConnectingError> for ConnectError
impl From<ConnectingError> for ConnectError
Source§fn from(source: ConnectingError) -> Self
fn from(source: ConnectingError) -> Self
Source§impl From<ConnectionError> for ConnectingError
impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl StackError for ConnectingError
impl StackError for ConnectingError
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 ConnectingError
impl !RefUnwindSafe for ConnectingError
impl Send for ConnectingError
impl Sync for ConnectingError
impl Unpin for ConnectingError
impl !UnwindSafe for ConnectingError
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/4012/docs/iroh/endpoint/enum.ConnectionError.html b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
index 4dd6c4051e..f8bc5a6507 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ConnectionError.html
@@ -21,7 +21,7 @@ and [TransportConfig::keep_alive_interval()].
LocallyClosed
The local application closed the connection
CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
§impl Clone for ConnectionError
impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
fn clone(&self) -> ConnectionError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ConnectionError
impl Debug for ConnectionError
§impl Display for ConnectionError
impl Display for ConnectionError
§impl Error for ConnectionError
impl Error for ConnectionError
§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
§impl From<Close> for ConnectionError
impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
fn from(x: Close) -> ConnectionError
§impl From<CloseReason> for ConnectionError
impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
fn from(value: CloseReason) -> ConnectionError
Source§impl From<ConnectionError> for AcceptError
impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl From<ConnectionError> for AlpnError
impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl From<ConnectionError> for ConnectError
impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl From<ConnectionError> for ConnectingError
impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
§impl From<ConnectionError> for ReadError
impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
fn from(source: ConnectionError) -> ReadError
§impl From<ConnectionError> for ResetError
impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
fn from(source: ConnectionError) -> ResetError
§impl From<ConnectionError> for SendDatagramError
impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
fn from(source: ConnectionError) -> SendDatagramError
§impl From<ConnectionError> for StoppedError
impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
fn from(source: ConnectionError) -> StoppedError
§impl From<ConnectionError> for WriteError
impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
fn from(source: ConnectionError) -> WriteError
§impl From<Error> for ConnectionError
impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
fn from(source: Error) -> ConnectionError
§impl PartialEq for ConnectionError
impl PartialEq for ConnectionError
§fn eq(&self, other: &ConnectionError) -> bool
fn eq(&self, other: &ConnectionError) -> bool
self and other values to be equal, and is used by ==.Trait Implementations§
§impl Clone for ConnectionError
impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
fn clone(&self) -> ConnectionError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ConnectionError
impl Debug for ConnectionError
§impl Display for ConnectionError
impl Display for ConnectionError
§impl Error for ConnectionError
impl Error for ConnectionError
§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
§impl From<Close> for ConnectionError
impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
fn from(x: Close) -> ConnectionError
§impl From<CloseReason> for ConnectionError
impl From<CloseReason> for ConnectionError
§fn from(value: CloseReason) -> ConnectionError
fn from(value: CloseReason) -> ConnectionError
Source§impl From<ConnectionError> for AcceptError
impl From<ConnectionError> for AcceptError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl From<ConnectionError> for AlpnError
impl From<ConnectionError> for AlpnError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl From<ConnectionError> for ConnectError
impl From<ConnectionError> for ConnectError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Source§impl From<ConnectionError> for ConnectingError
impl From<ConnectionError> for ConnectingError
Source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
§impl From<ConnectionError> for ReadError
impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
fn from(source: ConnectionError) -> ReadError
§impl From<ConnectionError> for ResetError
impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
fn from(source: ConnectionError) -> ResetError
§impl From<ConnectionError> for SendDatagramError
impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
fn from(source: ConnectionError) -> SendDatagramError
§impl From<ConnectionError> for StoppedError
impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
fn from(source: ConnectionError) -> StoppedError
§impl From<ConnectionError> for WriteError
impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
fn from(source: ConnectionError) -> WriteError
§impl From<Error> for ConnectionError
impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
fn from(source: Error) -> ConnectionError
§impl PartialEq for ConnectionError
impl PartialEq for ConnectionError
impl Eq for ConnectionError
impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
impl !Freeze for ConnectionError
impl !RefUnwindSafe for ConnectionError
impl Send for ConnectionError
impl Sync for ConnectionError
impl Unpin for ConnectionError
impl !UnwindSafe for ConnectionError
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
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index ea8c6e648c..bda4de1c47 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
index ea8c6e648c..bda4de1c47 100644
--- a/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/4012/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Source§impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
+Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
RelayMode
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,14 +10,14 @@ This means that neither listening nor dialing relays will be available.
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-Implementations§
Source§impl RelayMode
impl RelayMode
Sourcepub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
pub fn custom(map: impl IntoIterator<Item = RelayUrl>) -> Self
Create a custom relay mode from a list of RelayUrls.
Implementations§
Trait Implementations§
impl Eq for RelayMode
impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
impl Freeze for RelayMode
impl RefUnwindSafe for RelayMode
impl Send for RelayMode
impl Sync for RelayMode
impl Unpin for RelayMode
impl UnwindSafe for RelayMode
Blanket Implementations§
impl Eq for RelayMode
impl StructuralPartialEq for RelayMode
impl Freeze for RelayMode
impl RefUnwindSafe for RelayMode
impl Send for RelayMode
impl Sync for RelayMode
impl Unpin for RelayMode
impl UnwindSafe for RelayMode
§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/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
index bc14fcb0ac..ead99b4862 100644
--- a/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
+++ b/pr/4012/docs/iroh/endpoint/enum.ZeroRttStatus.html
@@ -1,4 +1,4 @@
-ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming
ZeroRttStatus
pub enum ZeroRttStatus {
+ZeroRttStatus in iroh::endpoint - Rust ZeroRttStatus
pub enum ZeroRttStatus {
Accepted(Connection),
Rejected(Connection),
}
Expand description
Returned from OutgoingZeroRttConnection::handshake_completed.
@@ -7,7 +7,7 @@ that were created before the handshake was completed.
§Rejected(Connection)
If the 0-RTT data was rejected, any streams that were created before
the handshake was completed will error and any data that was
previously sent on those streams will need to be resent.
-Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ZeroRttStatus
Source§fn clone(&self) -> ZeroRttStatus
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 ZeroRttStatus
§impl RefUnwindSafe for ZeroRttStatus
§impl Send for ZeroRttStatus
§impl Sync for ZeroRttStatus
§impl Unpin for ZeroRttStatus
§impl UnwindSafe for ZeroRttStatus
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/4012/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
index 8ebb22d6c1..1cdeda18c4 100644
--- a/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/4012/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust default_relay_mode
pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust default_relay_mode
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
index 5d1c762ab4..6cb2623e29 100644
--- a/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/4012/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust force_staging_infra
pub fn force_staging_infra() -> bool
Expand description
Returns true if the use of staging relays is forced.
+force_staging_infra in iroh::endpoint - Rust force_staging_infra
\ No newline at end of file
diff --git a/pr/4012/docs/iroh/endpoint/index.html b/pr/4012/docs/iroh/endpoint/index.html
index b2babe534a..89767c8a40 100644
--- a/pr/4012/docs/iroh/endpoint/index.html
+++ b/pr/4012/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
+iroh::endpoint - Rust Module endpoint
Expand description
The Endpoint allows establishing connections to other iroh endpoints.
The Endpoint is the main API interface to manage a local iroh endpoint. It allows
connecting to and accepting connections from other endpoints. See the module docs for
more details on how iroh connections work.
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accept.html b/pr/4012/docs/iroh/endpoint/struct.Accept.html
index 66a9a4bc51..50273cacdb 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accept.html
@@ -1,5 +1,5 @@
Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl Future for Accept<'_>
Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
Auto Trait Implementations§
§impl<'a> !Freeze for Accept<'a>
§impl<'a> !RefUnwindSafe for Accept<'a>
§impl<'a> Send for Accept<'a>
§impl<'a> Sync for Accept<'a>
§impl<'a> !UnwindSafe for Accept<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Accepting.html b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
index 1dd1fd885c..ee75159f4c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Accepting.html
@@ -1,5 +1,5 @@
-Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Accepting in iroh::endpoint - Rust Accepting
pub struct Accepting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Accepting
Sourcepub fn into_0rtt(self) -> IncomingZeroRttConnection
Converts this Accepting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns a IncomingZeroRttConnection, which represents an incoming 0-RTT or 0.5-RTT connection.
If the connection was initiated with 0-RTT by the remote endpoint, the local endpoint
@@ -16,10 +16,10 @@ authentication is required.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Connecting::into_0rtt.
-Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub fn remote_addr(&self) -> IncomingAddr
Returns the remote address of this connection.
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Trait Implementations§
Source§impl Future for Accepting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Accepting
§impl !RefUnwindSafe for Accepting
§impl Send for Accepting
§impl !Sync for Accepting
§impl Unpin for Accepting
§impl !UnwindSafe for Accepting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
index 4eaba68a4c..a82124620b 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
-Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
+ConnectOptions in iroh::endpoint - Rust ConnectOptions
pub struct ConnectOptions { /* private fields */ }
Expand description
Options for the Endpoint::connect_with_opts function.
+Implementations§
Source§impl ConnectOptions
Sourcepub fn new() -> Self
Initializes new connection options.
By default, the connection will use the same options
as Endpoint::connect, e.g. a default QuicTransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: QuicTransportConfig,
) -> Self
Sets the QUIC transport config options for this connection.
-Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
+
Sourcepub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self
Sets ALPN identifiers that should be signaled as supported on connection, in
addition to the main ALPN identifier used in Endpoint::connect_with_opts.
This allows connecting to servers that may only support older versions of your
protocol. In this case, you would add the older ALPN identifiers with this
@@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint
builder’s Builder::alpns function.
-Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
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 ConnectOptions
Source§impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
Returns the “default value” for a type. Read moreAuto Trait Implementations§
§impl Freeze for ConnectOptions
§impl !RefUnwindSafe for ConnectOptions
§impl Send for ConnectOptions
§impl Sync for ConnectOptions
§impl Unpin for ConnectOptions
§impl !UnwindSafe for ConnectOptions
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/4012/docs/iroh/endpoint/struct.Connecting.html b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
index e761bd0099..f4605c7b47 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connecting.html
@@ -1,6 +1,6 @@
-Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
+Connecting in iroh::endpoint - Rust Connecting
pub struct Connecting { /* private fields */ }
Expand description
An outgoing connection in progress.
This future resolves to a Connection once the handshake completes.
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<OutgoingZeroRttConnection, Connecting>
Converts this Connecting into a 0-RTT connection at the cost of weakened security.
If 0-RTT can be attempted, returns a OutgoingZeroRttConnection, which represents
outgoing 0-RTT connection.
If the 0-RTT cannot even be attempted, returns back the same Connecting without
@@ -24,10 +24,10 @@ should therefore never invoke non-idempotent operations.
You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT
and thus whether parts of the stream are operating under this reduced security level.
See also documentation for Accepting::into_0rtt.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Source§fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>
Attempts to resolve the future to a final value, registering
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+Sourcepub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId of the endpoint that this connection attempt tries to connect to.
+Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectingError>
The type of value produced on completion.Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl !Sync for Connecting
§impl Unpin for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.Connection.html b/pr/4012/docs/iroh/endpoint/struct.Connection.html
index a2311b8990..806df56b72 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust Connection
pub struct Connection<State: ConnectionState = HandshakeCompleted> { /* private fields */ }
Expand description
A QUIC connection.
If all references to a connection (including every clone of the Connection handle,
streams of incoming streams, and the various stream types) have been dropped, then the
connection will be automatically closed with an error_code of 0 and an empty reason. You
@@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t
application. Connection::close describes in more detail how to gracefully close a
connection without losing application data.
May be cloned to obtain another handle to the same connection.
-Implementations§
Source§impl<T: ConnectionState> Connection<T>
Implementations§
Source§impl<T: ConnectionState> Connection<T>
Sourcepub fn open_uni(&self) -> OpenUni<'_> ⓘ
Initiates a new outgoing unidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used.
-Sourcepub fn open_bi(&self) -> OpenBi<'_> ⓘ
Initiates a new outgoing bidirectional stream.
Streams are cheap and instantaneous to open unless blocked by flow control. As a
consequence, the peer won’t be notified that a stream has been opened until the
stream is actually used. Calling open_bi then waiting on the RecvStream
without writing anything to SendStream will never succeed.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
-Sourcepub fn accept_uni(&self) -> AcceptUni<'_> ⓘ
Accepts the next incoming uni-directional stream.
+Sourcepub fn accept_bi(&self) -> AcceptBi<'_> ⓘ
Accept the next incoming bidirectional stream.
Important Note: The peer that calls open_bi must write to its SendStream
before the peer Connection is able to accept the stream using
accept_bi(). Calling open_bi then waiting on the RecvStream without
writing anything to the connected SendStream will never succeed.
-Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
-Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
+Sourcepub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ
Receives an application datagram.
+Sourcepub async fn closed(&self) -> ConnectionError
Wait for the connection to be closed for any reason.
Despite the return type’s name, closed connections are often not an error condition
at the application layer. Cases that might be routine include
ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.
-Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
+Sourcepub fn close_reason(&self) -> Option<ConnectionError>
If the connection is closed, the reason why.
Returns None if the connection is still open.
-Sourcepub fn close(&self, error_code: VarInt, reason: &[u8])
Closes the connection immediately.
Pending operations will fail immediately with ConnectionError::LocallyClosed. No
more data is sent to the peer and the peer may drop buffered data upon receiving the
CONNECTION_CLOSE frame.
@@ -51,39 +51,39 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call
close the remote endpoint may drop any data it received but is as yet
undelivered to the application, including data that was acknowledged as received to
the local endpoint.
-Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
+Sourcepub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>
Transmits data as an unreliable, unordered application datagram.
Application datagrams are a low-level primitive. They may be lost or delivered out
of order, and data must both fit inside a single QUIC packet and be smaller than
the maximum dictated by the peer.
-Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
+Sourcepub fn send_datagram_wait(&self, data: Bytes) -> SendDatagram<'_> ⓘ
Transmits data as an unreliable, unordered application datagram
Unlike send_datagram(), this method will wait for buffer space during congestion
conditions, which effectively prioritizes old datagrams over new datagrams.
See send_datagram() for details.
-Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
+Sourcepub fn max_datagram_size(&self) -> Option<usize>
Computes the maximum size of datagrams that may be passed to send_datagram.
Returns None if datagrams are unsupported by the peer or disabled locally.
This may change over the lifetime of a connection according to variation in the path
MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.
Not necessarily the maximum size of received datagrams.
-Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
+Sourcepub fn datagram_send_buffer_space(&self) -> usize
Bytes available in the outgoing datagram buffer.
When greater than zero, calling send_datagram with a
datagram of at most this size is guaranteed not to cause older datagrams to be
dropped.
-Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
-Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
-Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
-Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
+Sourcepub fn rtt(&self, path_id: PathId) -> Option<Duration>
Current best estimate of this connection’s latency (round-trip-time).
+Sourcepub fn stats(&self) -> ConnectionStats
Returns connection statistics.
+Sourcepub fn congestion_state(&self, path_id: PathId) -> Option<Box<dyn Controller>>
Current state of the congestion control algorithm, for debugging purposes.
+Sourcepub fn handshake_data(&self) -> Option<Box<dyn Any>>
Parameters negotiated during the handshake.
Guaranteed to return Some on fully established connections or after
Connecting::handshake_data() succeeds. See that method’s documentations for
details on the returned value.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn stable_id(&self) -> usize
A stable identifier for this connection.
Peer addresses and connection IDs can change, but this value will remain fixed for
the lifetime of the connection.
-Sourcepub fn export_keying_material(
+
Sourcepub fn export_keying_material(
&self,
output: &mut [u8],
label: &[u8],
@@ -94,20 +94,20 @@ arguments and output buffers of equal length, they will get the
same sequence of bytes in output. These bytes are cryptographically
strong and pseudorandom, and are suitable for use as keying material.
See RFC5705 for more information.
-
Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
+Sourcepub fn set_max_concurrent_uni_streams(&self, count: VarInt)
Modifies the number of unidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
-Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
+Sourcepub fn set_receive_window(&self, receive_window: VarInt)
See [noq_proto::TransportConfig::receive_window].
+Sourcepub fn set_max_concurrent_bi_streams(&self, count: VarInt)
Modifies the number of bidirectional streams that may be concurrently opened.
No streams may be opened by the peer unless fewer than count are already
open. Large counts increase both minimum and worst-case memory consumption.
-Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
+Source§impl Connection<HandshakeCompleted>
Sourcepub fn remote_id(&self) -> EndpointId
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
+Sourcepub fn paths(&self) -> PathWatcher
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
will be a path via the relay server and a holepunched path.
Returns a PathWatcher, which implements the Watcher trait. The watcher is updated
@@ -126,12 +126,12 @@ stats for a path via Connection have been dropped. To reliably access path stats when a connection closes,
wait for Connection::closed and then call Connection::paths and directly
iterate over the path stats while the Connection struct is still in scope.
-Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
+Sourcepub fn to_info(&self) -> ConnectionInfo
Returns a connection info struct.
A ConnectionInfo is a weak handle to the connection that does not keep the connection alive,
but does allow to access some information about the connection and to wait for the connection to be closed.
-Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
+Source§impl Connection<IncomingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(&self) -> Result<Connection, ConnectingError>
Waits until the full handshake occurs and then returns a Connection.
This may fail with ConnectingError::ConnectionError, if there was
some general failure with the connection, such as a network timeout since
we accepted the connection.
@@ -140,13 +140,13 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Source§impl Connection<OutgoingZeroRtt>
Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub async fn handshake_completed(
&self,
) -> Result<ZeroRttStatus, ConnectingError>
Waits until the full handshake occurs and returns a ZeroRttStatus.
If ZeroRttStatus::Accepted is returned, than any streams created before
@@ -162,14 +162,14 @@ doesn’t use the right TLS authentication, which usually every iroh endpoint
uses and requires.
Thus, those errors should only occur if someone connects to you with a
modified iroh endpoint or with a plain QUIC client.
-Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
+Sourcepub fn remote_id(&self) -> Result<EndpointId, RemoteEndpointIdError>
Returns the EndpointId from the peer’s TLS certificate.
The PublicKey of an endpoint is also known as an EndpointId. This PublicKey is
included in the TLS certificate presented during the handshake when connecting.
This function allows you to get the EndpointId of the remote endpoint of this
connection.
-Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>where
+
Trait Implementations§
Source§impl<State: Clone + ConnectionState> Clone for Connection<State>
Source§fn clone(&self) -> Connection<State>
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<State> Freeze for Connection<State>
§impl<State> RefUnwindSafe for Connection<State>
§impl<State> Send for Connection<State>
§impl<State> Sync for Connection<State>where
diff --git a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
index 3dada2c7cc..7ec52c3b14 100644
--- a/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
+++ b/pr/4012/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -1,15 +1,15 @@
-ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
+ConnectionInfo in iroh::endpoint - Rust ConnectionInfo
pub struct ConnectionInfo { /* private fields */ }
Expand description
Information about a connection.
A ConnectionInfo is a weak handle to a connection that exposes some information about the connection,
but does not keep the connection alive.
-Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
+Implementations§
Source§impl ConnectionInfo
Sourcepub fn alpn(&self) -> &[u8] ⓘ
Sourcepub fn remote_id(&self) -> EndpointId
Sourcepub fn is_alive(&self) -> bool
Sourcepub fn paths(&self) -> PathWatcher
Returns a watcher for the network paths of this connection.
See Connection::paths for details.
-Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
+Sourcepub fn stats(&self) -> Option<ConnectionStats>
Returns connection statistics.
Returns None if the connection has been dropped.
-Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
+Sourcepub async fn closed(&self) -> Option<(ConnectionError, ConnectionStats)>
Waits for the connection to be closed, and returns the close reason and final connection stats.
Returns None if the connection has been dropped already before this call.
-Sourcepub fn selected_path(&self) -> Option<PathInfo>
Returns the currently selected path.
-Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
Blanket Implementations§
Trait Implementations§
Source§impl Clone for ConnectionInfo
Source§fn clone(&self) -> ConnectionInfo
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 ConnectionInfo
§impl RefUnwindSafe for ConnectionInfo
§impl Send for ConnectionInfo
§impl Sync for ConnectionInfo
§impl Unpin for ConnectionInfo
§impl UnwindSafe for ConnectionInfo
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/4012/docs/iroh/endpoint/struct.Endpoint.html b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
index f95262c3a2..2861f5ae15 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Endpoint.html
@@ -16,7 +16,7 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.
Note that due to the light-weight properties of streams a stream will only be accepted
once the initiating peer has sent some data on it.
- Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
+Implementations§
Source§impl Endpoint
Sourcepub fn builder() -> Builder
Returns the builder for an Endpoint, with a production configuration.
This uses the presets::N0 as the configuration.
Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
@@ -56,7 +56,7 @@ connection attempt will fail with an error.
The alpn, or application-level protocol identifier, is also required. The remote
endpoint must support this alpn, otherwise the connection attempt will fail with
an error.
-Sourcepub async fn connect_with_opts(
+
Sourcepub async fn connect_with_opts(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -76,17 +76,17 @@ security concerns.
establishing and maintaining direct connections. Carefully test settings you use and
consider this currently as still rather experimental.
-
Sourcepub fn accept(&self) -> Accept<'_> ⓘ
Accepts an incoming connection on the endpoint.
Only connections with the ALPNs configured in Builder::alpns will be accepted.
If multiple ALPNs have been configured the ALPN can be inspected before accepting
the connection using Connecting::alpn.
The returned future will yield None if the endpoint is closed by calling
Endpoint::close.
-Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
-Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn id(&self) -> EndpointId
Returns the endpoint id of this endpoint.
This ID is the unique addressing information of this endpoint and other peers must know
it to be able to connect to this endpoint.
-Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
+
Sourcepub fn addr(&self) -> EndpointAddr
Returns the current EndpointAddr.
As long as the endpoint was able to bind to a network interface, some
local addresses will be available.
The state of other fields depends on the state of networking and connectivity.
@@ -96,7 +96,7 @@ to ensure that the EndpointAddr will contain enough information to
to be dialable by a remote endpoint over the internet.
You can use the Endpoint::watch_addr method to get updates when the EndpointAddr
changes.
-Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
+Sourcepub fn watch_addr(&self) -> impl Watcher<Value = EndpointAddr> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current EndpointAddr for this endpoint.
The observed EndpointAddr will have the current RelayUrl and direct addresses.
use iroh::{Endpoint, Watcher};
@@ -139,7 +139,7 @@ tokio::spawn(endpoint_closed.run_until(async move {
}));
// Do fancy things, then close the endpoint.
// Our task above will stop even if there are still clones of `Endpoint` alive somewhere.
-endpoint.close().await;
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
This currently means at least one relay server was connected,
and at least one local IP address is available.
Even if no relays are configured, this will still wait for a relay connection.
@@ -172,25 +172,25 @@ let endpoint = Endpoint::bind().await;
// After this await returns we have a connection to at least one relay
// and holepunching should work as expected.
endpoint.online().await;
-}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
+}Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Available on non-wasm_browser only.
Returns the local socket addresses on which the underlying sockets are bound.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> Result<&DnsResolver, EndpointError>
Available on non-wasm_browser only.
Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
+Sourcepub fn tls_config(&self) -> &ClientConfig
Returns the [rustls::ClientConfig] used by the endpoint for connecting to external services.
This might be useful for address lookup services or other functions
that want to use the same trust anchors as iroh does for verifying the
validity of TLS certificates presented by external services.
Note that this TLS config is unrelated to how iroh validates the authenticity
of iroh connections itself.
The config is based on the trust anchors set via Builder::ca_roots_config.
-Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
+Sourcepub fn address_lookup(&self) -> Result<&ConcurrentAddressLookup, EndpointError>
Returns the Address Lookup service, if configured.
§Errors
Returns a EndpointError::Closed error if the endpoint is closed.
-Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
+Sourcepub fn metrics(&self) -> &EndpointMetrics
Available on crate feature metrics only.
Returns metrics collected for this endpoint.
The endpoint internally collects various metrics about its operation.
The returned EndpointMetrics struct contains all of these metrics.
You can access individual metrics directly by using the public fields:
@@ -260,13 +260,13 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE socket_recv_datagrams counter"#));
-assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
+assert!(res.contains(r#"socket_recv_datagrams_total 0"#));Sourcepub async fn remote_info(&self, endpoint_id: EndpointId) -> Option<RemoteInfo>
Returns addressing information about a recently used remote endpoint.
The returned RemoteInfo contains a list of all transport addresses for the remote
that we know about. This is a snapshot in time and not a watcher.
Returns None if the endpoint doesn’t have information about the remote or if the endpoint is closed.
When remote endpoints are no longer used, our endpoint will keep information around
for a little while, and then drop it. Afterwards, this will return None.
-Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
On many systems iroh is able to detect network changes by itself, however
some systems like android do not expose this functionality to native code.
Android does however provide this functionality to Java code. This
@@ -275,14 +275,14 @@ this.
Even when the network did not change, or iroh was already able to detect
the network change itself, there is no harm in calling this function.
If the endpoint is closed, this method will log a warning and ignore the request.
-Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
+Sourcepub fn set_user_data_for_address_lookup(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in Address Lookups for this endpoint.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its endpoint info to the configured Address Lookups.
See also Builder::user_data_for_address_lookup for setting an initial value when
building the endpoint.
If the endpoint is closed, this method will log a warning and ignore the
request.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the socket.
This will close any remaining open Connections with an error code
of 0 and an empty reason. Though it is best practice to close those
explicitly before with a custom error code and reason.
@@ -308,8 +308,8 @@ while TCP sockets usually get closed and drained by the operating system in the
kernel during the “Time-Wait” period of the TCP socket.
Be aware however that the underlying UDP sockets are only closed once all clones of
the the respective Endpoint are dropped.
-Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
+Sourcepub fn closed(&self) -> EndpointClosed ⓘ
Returns a future that resolves once the endpoint closes.
The returned future does not contain a clone or reference to the Endpoint,
so keeping the returned future alive does not prevent the endpoint from being dropped.
To run a task and stop it once the endpoint closes, you can use
@@ -318,7 +318,7 @@ so keeping the returned future alive does not prevent the endpoint from being dr
let endpoint = Endpoint::bind().await?;
tokio::spawn(endpoint.closed().run_until(async move {
// the future will be aborted once the endpoint closes.
-}));
Sourcepub fn create_server_config_builder(
+}));
Sourcepub fn create_server_config_builder(
&self,
alpns: Vec<Vec<u8>>,
) -> ServerConfigBuilder
Create a ServerConfigBuilder for this endpoint that includes the given alpns.
diff --git a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
index 6e857986d2..069ba48c02 100644
--- a/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
+++ b/pr/4012/docs/iroh/endpoint/struct.EndpointClosed.html
@@ -1,9 +1,9 @@
-EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
-Implementations§
Source§impl EndpointClosed
Sourcepub async fn run_until<F: Future>(self, fut: F) -> Option<F::Output>
Runs a future to completion, or until the Endpoint is closed.
+EndpointClosed in iroh::endpoint - Rust EndpointClosed
pub struct EndpointClosed { /* private fields */ }
Expand description
Future returned from Endpoint::closed.
+Implementations§
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
+
Trait Implementations§
Source§impl Debug for EndpointClosed
Source§impl Future for EndpointClosed
Source§impl<'pin> Unpin for EndpointClosedwhere
PinnedFieldsOf<__EndpointClosed<'pin>>: Unpin,
Auto Trait Implementations§
§impl !Freeze for EndpointClosed
§impl !RefUnwindSafe for EndpointClosed
§impl Send for EndpointClosed
§impl Sync for EndpointClosed
§impl !UnwindSafe for EndpointClosed
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 12275f6a51..9602ef313c 100644
--- a/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/4012/docs/iroh/endpoint/struct.HandshakeCompleted.html
@@ -1,5 +1,5 @@
-HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
-Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
Blanket Implementations§
Source§impl<T> Any for Twhere
+HandshakeCompleted in iroh::endpoint - Rust HandshakeCompleted
pub struct HandshakeCompleted;
Expand description
Marker type for a connection that has completed the handshake.
+Trait Implementations§
Source§impl Clone for HandshakeCompleted
Source§fn clone(&self) -> HandshakeCompleted
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 ConnectionState for HandshakeCompleted
Source§type Data = HandshakeCompletedData
State-specific data stored in the Connection.Auto Trait Implementations§
§impl Freeze for HandshakeCompleted
§impl RefUnwindSafe for HandshakeCompleted
§impl Send for HandshakeCompleted
§impl Sync for HandshakeCompleted
§impl Unpin for HandshakeCompleted
§impl UnwindSafe for HandshakeCompleted
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/4012/docs/iroh/endpoint/struct.Incoming.html b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
index fb71d0a426..4b15f9e2d5 100644
--- a/pr/4012/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/4012/docs/iroh/endpoint/struct.Incoming.html
@@ -1,31 +1,31 @@
-Incoming in iroh::endpoint - Rust Incoming