diff --git a/pr/3689/docs/help.html b/pr/3689/docs/help.html index cf8fc56f42..f35afe481b 100644 --- a/pr/3689/docs/help.html +++ b/pr/3689/docs/help.html @@ -1 +1 @@ -
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16The default QUIC port used by the Relay server to accept QUIC connections +
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery
The port is “QUIC” typed on a phone keypad. The default QUIC port used by the Relay server to accept QUIC connections diff --git a/pr/3689/docs/iroh/discovery/dns/constant.N0_DNS_ENDPOINT_ORIGIN_PROD.html b/pr/3689/docs/iroh/discovery/dns/constant.N0_DNS_ENDPOINT_ORIGIN_PROD.html index bb54e7b5aa..0807911615 100644 --- a/pr/3689/docs/iroh/discovery/dns/constant.N0_DNS_ENDPOINT_ORIGIN_PROD.html +++ b/pr/3689/docs/iroh/discovery/dns/constant.N0_DNS_ENDPOINT_ORIGIN_PROD.html @@ -1,2 +1,2 @@ -
pub const N0_DNS_ENDPOINT_ORIGIN_PROD: &'static str;wasm_browser only.The n0 testing DNS endpoint origin, for production.
+pub const N0_DNS_ENDPOINT_ORIGIN_STAGING: &'static str;wasm_browser only.The n0 testing DNS endpoint origin, for testing.
+Creates a new user error from an arbitrary error type that can be converted into [AnyError].
source. Read moresource. Read moreCreates a new user error from an arbitrary boxed error type.
-#[non_exhaustive]pub enum ParseError {
+ParseError in iroh::discovery - Rust ParseError
Converts into a EndpointAddr by cloning the needed fields.
Converts into a EndpointAddr without cloning.
Returns the relay URL of the endpoint.
-Returns the optional user-defined data of the endpoint.
-Returns the direct addresses of the endpoint.
-Returns the full list of all known addresses
-Returns the relay URL of the endpoint.
+Returns the optional user-defined data of the endpoint.
+Returns the direct addresses of the endpoint.
+Returns the full list of all known addresses
+source. Read morepub struct EndpointData { /* private fields */ }Data about an endpoint that may be published to and resolved from discovery services.
+pub struct EndpointData { /* private fields */ }Data about an endpoint that may be published to and resolved from discovery services.
This includes an optional RelayUrl, a set of direct addresses, and the optional
UserData, a string that can be set by applications and is not parsed or used by iroh
itself.
This struct does not include the endpoint’s EndpointId, only the data about a certain
endpoint. See EndpointInfo for a struct that contains a EndpointId with associated EndpointData.
Creates a new EndpointData with a relay URL and a set of direct addresses.
Sets the relay URL and returns the updated endpoint data.
-Sets the direct addresses and returns the updated endpoint data.
-Sets the user-defined data and returns the updated endpoint data.
-Returns the relay URL of the endpoint.
-Returns the optional user-defined data of the endpoint.
-Returns the direct addresses of the endpoint.
-Removes all direct addresses from the endpoint data.
-Removes all direct addresses from the endpoint data.
-Add addresses to the endpoint data.
-Sets the user-defined data of the endpoint data.
-Returns the full list of all known addresses
-source. Read moreCreates a new EndpointData with a relay URL and a set of direct addresses.
Sets the relay URL and returns the updated endpoint data.
+Sets the direct addresses and returns the updated endpoint data.
+Sets the user-defined data and returns the updated endpoint data.
+Returns the relay URL of the endpoint.
+Returns the optional user-defined data of the endpoint.
+Returns the direct addresses of the endpoint.
+Removes all direct addresses from the endpoint data.
+Removes all direct addresses from the endpoint data.
+Add addresses to the endpoint data.
+Sets the user-defined data of the endpoint data.
+Returns the full list of all known addresses
+source. Read morepub struct EndpointInfo {
+EndpointInfo in iroh::discovery - Rust EndpointInfo
pub struct EndpointInfo {
pub endpoint_id: PublicKey,
pub data: EndpointData,
}
Expand description
Information about an endpoint that may be published to and resolved from discovery services.
This struct couples a EndpointId with its associated EndpointData.
Fields§
§endpoint_id: PublicKeyThe EndpointId of the endpoint this is about.
§data: EndpointDataThe information published about the endpoint.
-Implementations§
§impl EndpointInfo
pub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
-pub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
-pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> EndpointInfo
Sets the relay URL and returns the updated endpoint info.
-pub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
-pub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
-pub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
-pub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
-pub fn from_txt_lookup(
+
Implementations§
Source§impl EndpointInfo
Sourcepub fn new(endpoint_id: PublicKey) -> EndpointInfo
Creates a new EndpointInfo with an empty EndpointData.
+Sourcepub fn from_parts(endpoint_id: PublicKey, data: EndpointData) -> EndpointInfo
Creates a new EndpointInfo from its parts.
+Sourcepub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> EndpointInfo
Sets the relay URL and returns the updated endpoint info.
+Sourcepub fn with_ip_addrs(self, addrs: BTreeSet<SocketAddr>) -> EndpointInfo
Sets the IP based addresses and returns the updated endpoint info.
+Sourcepub fn with_user_data(self, user_data: Option<UserData>) -> EndpointInfo
Sets the user-defined data and returns the updated endpoint info.
+Sourcepub fn to_endpoint_addr(&self) -> EndpointAddr
Converts into a EndpointAddr by cloning the needed fields.
+Sourcepub fn into_endpoint_addr(self) -> EndpointAddr
Converts into a EndpointAddr without cloning.
+Sourcepub fn from_txt_lookup(
domain_name: String,
- lookup: impl Iterator<Item = TxtRecordData>,
+ lookup: impl Iterator<Item = TxtRecordData>,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from DNS TXT lookup.
-pub fn from_pkarr_signed_packet(
+
Sourcepub fn from_pkarr_signed_packet(
packet: &SignedPacket,
) -> Result<EndpointInfo, ParseError>
Parses a EndpointInfo from a [pkarr::SignedPacket].
-pub fn to_pkarr_signed_packet(
+
Sourcepub fn to_pkarr_signed_packet(
&self,
secret_key: &SecretKey,
ttl: u32,
) -> Result<SignedPacket, EncodingError>
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
-pub fn to_txt_strings(&self) -> Vec<String>
Converts into a list of {key}={value} strings.
-Methods from Deref<Target = EndpointData>§
pub fn relay_urls(&self) -> impl Iterator<Item = &RelayUrl>
Returns the relay URL of the endpoint.
-pub fn user_data(&self) -> Option<&UserData>
Returns the optional user-defined data of the endpoint.
-pub fn ip_addrs(&self) -> impl Iterator<Item = &SocketAddr>
Returns the direct addresses of the endpoint.
-pub fn clear_ip_addrs(&mut self)
Removes all direct addresses from the endpoint data.
-pub fn clear_relay_urls(&mut self)
Removes all direct addresses from the endpoint data.
-pub fn add_addrs(&mut self, addrs: impl IntoIterator<Item = TransportAddr>)
Add addresses to the endpoint data.
-pub fn set_user_data(&mut self, user_data: Option<UserData>)
Sets the user-defined data of the endpoint data.
-pub fn addrs(&self) -> impl Iterator<Item = &TransportAddr>
Returns the full list of all known addresses
-Trait Implementations§
§impl Clone for EndpointInfo
§fn clone(&self) -> EndpointInfo
Returns a duplicate of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for EndpointInfo
§impl Deref for EndpointInfo
§type Target = EndpointData
The resulting type after dereferencing.§fn deref(&self) -> &<EndpointInfo as Deref>::Target
Dereferences the value.§impl DerefMut for EndpointInfo
§fn deref_mut(&mut self) -> &mut <EndpointInfo as Deref>::Target
Mutably dereferences the value.§impl From<&TxtAttrs<IrohAttr>> for EndpointInfo
§fn from(attrs: &TxtAttrs<IrohAttr>) -> EndpointInfo
Converts to this type from the input type.Source§impl From<DiscoveryItem> for EndpointInfo
Source§fn from(item: DiscoveryItem) -> Self
Converts to this type from the input type.§impl From<EndpointAddr> for EndpointInfo
§fn from(addr: EndpointAddr) -> EndpointInfo
Converts to this type from the input type.§impl From<EndpointInfo> for EndpointAddr
§fn from(value: EndpointInfo) -> EndpointAddr
Converts to this type from the input type.§impl From<TxtAttrs<IrohAttr>> for EndpointInfo
§fn from(attrs: TxtAttrs<IrohAttr>) -> EndpointInfo
Converts to this type from the input type.§impl PartialEq for EndpointInfo
§impl Eq for EndpointInfo
§impl StructuralPartialEq for EndpointInfo
Auto Trait Implementations§
§impl Freeze for EndpointInfo
§impl RefUnwindSafe for EndpointInfo
§impl Send for EndpointInfo
§impl Sync for EndpointInfo
§impl Unpin for EndpointInfo
§impl UnwindSafe for EndpointInfo
Blanket Implementations§
Returns the relay URL of the endpoint.
+Returns the optional user-defined data of the endpoint.
+Returns the direct addresses of the endpoint.
+Removes all direct addresses from the endpoint data.
+Removes all direct addresses from the endpoint data.
+Add addresses to the endpoint data.
+Sets the user-defined data of the endpoint data.
+Returns the full list of all known addresses
+source. Read morepub struct UserData(/* private fields */);Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
pub struct UserData(/* private fields */);Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.
Iroh does not keep track of or examine the user-defined data.
UserData implements FromStr and TryFrom<String>, so you can
convert &str and String into UserData easily.
The max byte length allowed for user-defined data.
+The max byte length allowed for user-defined data.
In DNS discovery services, the user-defined data is stored in a TXT record character string,
which has a max length of 255 bytes. We need to subtract the user-data= prefix,
which leaves 245 bytes for the actual user-defined data.
pub const N0_DNS_ENDPOINT_ORIGIN_PROD: &'static str;wasm_browser only.The n0 testing DNS endpoint origin, for production.
+pub const N0_DNS_ENDPOINT_ORIGIN_STAGING: &'static str;wasm_browser only.The n0 testing DNS endpoint origin, for testing.
+pub struct DnsResolver(/* private fields */);wasm_browser only.The DNS resolver used throughout iroh.
Creates a new DNS resolver with sensible cross-platform defaults.
+pub struct DnsResolver(/* private fields */);wasm_browser only.The DNS resolver used throughout iroh.
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.
Creates a new DNS resolver configured with a single UDP DNS nameserver.
-Creates a builder to construct a DNS resolver with custom options.
-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
+
Creates a new DNS resolver configured with a single UDP DNS nameserver.
+Creates a builder to construct a DNS resolver with custom options.
+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.
Removes all entries from the cache.
-Recreates the inner resolver.
-Removes all entries from the cache.
+Looks up a TXT record.
-Resolves IPv4 and IPv6 in parallel with a timeout.
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.
Resolves a hostname from a URL to an IP address.
-Resolves a hostname from a URL to an IP address.
+Performs an IPv4 lookup with a timeout in a staggered fashion.
+) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>Performs an IPv4 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
Performs an IPv6 lookup with a timeout in a staggered fashion.
+) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>Performs an IPv6 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The
result of the first successful call is returned, or a summary of all errors otherwise.
Races an IPv4 and IPv6 lookup with a timeout in a staggered fashion.
+) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>Races an IPv4 and IPv6 lookup with a timeout in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The 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.
Looks up endpoint info by EndpointId and origin domain name.
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.
Looks up endpoint info by DNS name.
-Looks up endpoint info by DNS name.
+Looks up endpoint info by DNS name in a staggered fashion.
+) -> Result<EndpointInfo, StaggeredError<LookupError>>Looks up endpoint info by DNS name in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
Looks up endpoint info by EndpointId and origin domain name.
Looks up endpoint info by EndpointId and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
source. Read moresource. Read moreName.
diff --git a/pr/3689/docs/iroh/endpoint/connection/struct.ConnectionInfo.html b/pr/3689/docs/iroh/endpoint/connection/struct.ConnectionInfo.html
new file mode 100644
index 0000000000..efeabb415b
--- /dev/null
+++ b/pr/3689/docs/iroh/endpoint/connection/struct.ConnectionInfo.html
@@ -0,0 +1,11 @@
+
+
+
+
+ Redirecting to ../../../iroh/endpoint/struct.ConnectionInfo.html...
+ + + \ No newline at end of file diff --git a/pr/3689/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/3689/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html index 6d6d94e4a1..83f00ed0ea 100644 --- a/pr/3689/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html +++ b/pr/3689/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html @@ -1,2 +1,2 @@ -pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";Environment variable to force the use of staging relays.
+pub enum AfterHandshakeOutcome {
+ Accept,
+ Reject {
+ error_code: VarInt,
+ reason: Vec<u8>,
+ },
+}Outcome of EndpointHooks::after_handshake
Accept the connection.
+Reject and close the connection.
+See Connection::close for details on error_code and reason.
Returns Self::Accept.
Returns Self::Reject.
Subscriber to this type, returning a
+[WithDispatch] wrapper. Read more#[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§
#[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§
source. Read morepub enum BeforeConnectOutcome {
+ Accept,
+ Reject,
+}Outcome of EndpointHooks::before_connect
Subscriber to this type, returning a
+[WithDispatch] wrapper. Read more#[non_exhaustive]pub enum BindError {
+BindError in iroh::endpoint - Rust BindError
#[non_exhaustive]pub enum BindError {
MagicSpawn {
source: CreateHandleError,
meta: Meta,
@@ -9,7 +9,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 BindError
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<IntoDiscoveryError> for BindError
Source§fn from(source: IntoDiscoveryError) -> Self
Converts to this type from the input type.Source§impl StackError for BindError
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 BindError
§impl !RefUnwindSafe for BindError
§impl Send for BindError
§impl Sync for BindError
§impl Unpin for BindError
§impl !UnwindSafe for BindError
Blanket Implementations§
#[non_exhaustive]pub enum ConnectError {
+ConnectError in iroh::endpoint - Rust ConnectError
#[non_exhaustive]pub enum ConnectError {
Connect {
source: ConnectWithOptsError,
meta: Meta,
@@ -14,7 +14,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 Debug for ConnectError
Source§impl Display for ConnectError
Source§impl Error for ConnectError
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<ConnectError> for AnyError
Source§fn from(value: ConnectError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectWithOptsError> for ConnectError
Source§fn from(source: ConnectWithOptsError) -> Self
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 ConnectError
Source§fn from(source: ConnectionError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectError
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 ConnectError
§impl !RefUnwindSafe for ConnectError
§impl Send for ConnectError
§impl Sync for ConnectError
§impl Unpin for ConnectError
§impl !UnwindSafe for ConnectError
Blanket Implementations§
#[non_exhaustive]pub enum ConnectWithOptsError {
+ConnectWithOptsError in iroh::endpoint - Rust ConnectWithOptsError
#[non_exhaustive]pub enum ConnectWithOptsError {
SelfConnect {
meta: Meta,
},
@@ -14,12 +14,16 @@
source: RemoteStateActorStoppedError,
meta: Meta,
},
+ LocallyRejected {
+ meta: Meta,
+ },
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.Trait Implementations§
Source§impl Debug for ConnectWithOptsError
Source§impl Display for ConnectWithOptsError
Source§impl Error for ConnectWithOptsError
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<ConnectError> for ConnectWithOptsError
Source§impl From<ConnectWithOptsError> for AnyError
Source§fn from(value: ConnectWithOptsError) -> AnyError
Converts to this type from the input type.Source§impl From<ConnectWithOptsError> for ConnectError
Source§fn from(source: ConnectWithOptsError) -> Self
Converts to this type from the input type.Source§impl From<DiscoveryError> for ConnectWithOptsError
Source§fn from(source: DiscoveryError) -> Self
Converts to this type from the input type.Source§impl StackError for ConnectWithOptsError
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 ConnectWithOptsError
§impl !RefUnwindSafe for ConnectWithOptsError
§impl Send for ConnectWithOptsError
§impl Sync for ConnectWithOptsError
§impl Unpin for ConnectWithOptsError
§impl !UnwindSafe for ConnectWithOptsError
Blanket Implementations§
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
+#[non_exhaustive]pub enum ConnectingError {
+ConnectingError in iroh::endpoint - Rust ConnectingError
#[non_exhaustive]pub enum ConnectingError {
ConnectionError {
source: ConnectionError,
meta: Meta,
@@ -11,11 +11,15 @@
source: RemoteStateActorStoppedError,
meta: Meta,
},
+ LocallyRejected {
+ meta: Meta,
+ },
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.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§
§LocallyRejected
Fields
§meta: MetaCaptured call-site metadata
+source. Read moreThe local application closed the connection
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-source. Read moreself and other values to be equal, and is used by ==.source. Read morepub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust DirectAddrType
pub enum DirectAddrType {
Unknown,
Local,
Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.
It is possible to configure iroh to bound to a specific port and independently
configure the router to forward this port to the iroh endpoint. This indicates a
situation like this, which still uses QAD to discover the public address.
-
source. Read moresource. Read morepub enum RelayMode {
+RelayMode in iroh::endpoint - Rust RelayMode
pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -10,9 +10,9 @@ 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.
-pub enum Source {
+Source in iroh::endpoint - Rust Source
pub enum Source {
Udp,
Relay,
App,
@@ -39,12 +39,12 @@ address through multiple means.
Currently this means the path was in uses as PathId::ZERO when the a connection
was added to the RemoteStateActor.
Fields
§_0: Privateprivate marker
-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/3689/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/3689/docs/iroh/endpoint/fn.default_relay_mode.html
index fc0d0257bd..836c3a66d2 100644
--- a/pr/3689/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/3689/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/3689/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/3689/docs/iroh/endpoint/fn.force_staging_infra.html
index 2d12e15ff8..bfc5be56ab 100644
--- a/pr/3689/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/3689/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/3689/docs/iroh/endpoint/hooks/enum.AfterHandshakeOutcome.html b/pr/3689/docs/iroh/endpoint/hooks/enum.AfterHandshakeOutcome.html
new file mode 100644
index 0000000000..be877fefd3
--- /dev/null
+++ b/pr/3689/docs/iroh/endpoint/hooks/enum.AfterHandshakeOutcome.html
@@ -0,0 +1,11 @@
+
+
+
+
+ Redirection
+
+
+ Redirecting to ../../../iroh/endpoint/enum.AfterHandshakeOutcome.html...
+
+
+
\ No newline at end of file
diff --git a/pr/3689/docs/iroh/endpoint/hooks/enum.BeforeConnectOutcome.html b/pr/3689/docs/iroh/endpoint/hooks/enum.BeforeConnectOutcome.html
new file mode 100644
index 0000000000..c7c70d3cc2
--- /dev/null
+++ b/pr/3689/docs/iroh/endpoint/hooks/enum.BeforeConnectOutcome.html
@@ -0,0 +1,11 @@
+
+
+
+
+ Redirection
+
+
+ Redirecting to ../../../iroh/endpoint/enum.BeforeConnectOutcome.html...
+
+
+
\ No newline at end of file
diff --git a/pr/3689/docs/iroh/endpoint/hooks/trait.EndpointHooks.html b/pr/3689/docs/iroh/endpoint/hooks/trait.EndpointHooks.html
new file mode 100644
index 0000000000..8d30ea16de
--- /dev/null
+++ b/pr/3689/docs/iroh/endpoint/hooks/trait.EndpointHooks.html
@@ -0,0 +1,11 @@
+
+
+
+
+ Redirection
+
+
+ Redirecting to ../../../iroh/endpoint/trait.EndpointHooks.html...
+
+
+
\ No newline at end of file
diff --git a/pr/3689/docs/iroh/endpoint/index.html b/pr/3689/docs/iroh/endpoint/index.html
index e02a47f55b..60eefab7a5 100644
--- a/pr/3689/docs/iroh/endpoint/index.html
+++ b/pr/3689/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.
@@ -7,6 +7,6 @@ more details on how iroh connections work.
Endpoint to establish iroh connections with other endpoints.
Builder to create an Endpoint.
-Modules§
- presets
- Presets allow configuring an endpoint quickly with a chosen set of defaults.
Structs§
- Accept
- Future produced by
Endpoint::accept. - Accept
Bi - Future produced by [
Connection::accept_bi] - Accept
Uni - Future produced by [
Connection::accept_uni] - Accepting
- In-progress connection attempt future
- AckFrequency
Config - Parameters for controlling the peer’s acknowledgement frequency
- Application
Close - Reason given by an application for closing the connection
- Builder
- Builder for
Endpoint. - Chunk
- A chunk of data from the receive stream
- Closed
Stream - Error indicating that a stream has not been opened or has already been finished or reset
- Connect
Options - Options for the
Endpoint::connect_with_opts function. - Connecting
- An outgoing connection in progress.
- Connection
- A QUIC connection.
- Connection
Close - Reason given by the transport for closing the connection
- Connection
Stats - Connection statistics
- Crypto
Error - Generic crypto errors
- Direct
Addr - A direct address on which an iroh-endpoint might be contactable.
- Endpoint
- Controls an iroh endpoint, establishing connections with other endpoints.
- Export
KeyingMaterialError - Error returned by [Session::export_keying_material].
- Frame
Stats - Number of frames transmitted or received of each frame type
- Handshake
Completed - Marker type for a connection that has completed the handshake.
- Incoming
- An incoming connection for which the server has not yet begun its parts of the
-handshake.
- Incoming
ZeroRtt - Marker type for a connection that is in the incoming 0-RTT state.
- MtuDiscovery
Config - Parameters governing MTU discovery.
- OpenBi
- Future produced by [
Connection::open_bi] - OpenUni
- Future produced by [
Connection::open_uni] - Outgoing
ZeroRtt - Marker type for a connection that is in the outgoing 0-RTT state.
- Path
Info - Information about a network path used by a
Connection. - Path
InfoList - List of
PathInfo for the network paths of a Connection. - Path
Stats - Statistics related to a transmission path
- Quinn
TransportConfig - Parameters governing the core QUIC state machine
- Read
Datagram - Future produced by [
Connection::read_datagram] - Recv
Stream - A stream that can only be used to receive data
- Remote
EndpointIdError - Retry
Error - Error for attempting to retry an [
Incoming] which already bears a token from a previous retry - Send
Stream - A stream that can only be used to send data
- Server
Config - Parameters governing incoming connections
- Stream
Id - Identifier for a stream within a particular connection
- Transport
Error - Transport-level errors occur when a peer violates the protocol specification
- Transport
ErrorCode - Transport-level error code
- UdpStats
- Statistics about UDP datagrams transmitted or received on a connection
- Unsupported
Version - Error indicating that the specified QUIC version is not supported
- VarInt
- An integer less than 2^62
- Weak
ConnectionHandle - A handle to some connection internals, use with care.
- Written
- Indicates how many bytes and chunks had been transferred in a write operation
Enums§
- Alpn
Error - Authentication
Error - Bind
Error - Connect
Error - Connect
WithOptsError - Connecting
Error - Connection
Error - Reasons why a connection might be lost
- Direct
AddrType - The type of direct address.
- Read
Error - Errors that arise from reading from a stream.
- Read
ExactError - Errors that arise from reading from a stream.
- Read
ToEndError - Errors from
RecvStream::read_to_end - Relay
Mode - Configuration of the relay servers for an
Endpoint. - Reset
Error - Errors that arise while waiting for a stream to be reset
- Send
DatagramError - Errors that can arise when sending a datagram
- Source
- The origin or source through which an address associated with a remote endpoint
-was discovered.
- Stopped
Error - Errors that arise while monitoring for a send stream stop from the peer
- Transport
Config - Available transport configurations.
- Write
Error - Errors that arise from writing to a stream
- Zero
RttStatus - Returned from
OutgoingZeroRttConnection::handshake_completed.
Constants§
- ENV_
FORCE_STAGING_RELAYS - Environment variable to force the use of staging relays.
Traits§
- AeadKey
- A key for sealing data with AEAD-based algorithms
- Connection
State - Trait to track the state of a
Connection at compile time. - Controller
- Common interface for different congestion controllers
- Controller
Factory - Constructs controllers on demand
- Crypto
ServerConfig - Server-side configuration for the crypto protocol
- Handshake
TokenKey - A pseudo random key for HKDF
Functions§
- default_
relay_mode - Returns the default relay mode.
- force_
staging_infra - Returns
true if the use of staging relays is forced.
Type Aliases§
- Incoming
ZeroRttConnection - A QUIC connection on the server-side that can possibly accept 0-RTT data.
- Outgoing
ZeroRttConnection - The client side of a 0-RTT connection.
\ No newline at end of file
+Modules§
- presets
- Presets allow configuring an endpoint quickly with a chosen set of defaults.
Structs§
- Accept
- Future produced by
Endpoint::accept. - Accept
Bi - Future produced by [
Connection::accept_bi] - Accept
Uni - Future produced by [
Connection::accept_uni] - Accepting
- In-progress connection attempt future
- AckFrequency
Config - Parameters for controlling the peer’s acknowledgement frequency
- Application
Close - Reason given by an application for closing the connection
- Builder
- Builder for
Endpoint. - Chunk
- A chunk of data from the receive stream
- Closed
Stream - Error indicating that a stream has not been opened or has already been finished or reset
- Connect
Options - Options for the
Endpoint::connect_with_opts function. - Connecting
- An outgoing connection in progress.
- Connection
- A QUIC connection.
- Connection
Close - Reason given by the transport for closing the connection
- Connection
Info - Information about a connection.
- Connection
Stats - Connection statistics
- Crypto
Error - Generic crypto errors
- Direct
Addr - A direct address on which an iroh-endpoint might be contactable.
- Endpoint
- Controls an iroh endpoint, establishing connections with other endpoints.
- Export
KeyingMaterialError - Error returned by [Session::export_keying_material].
- Frame
Stats - Number of frames transmitted or received of each frame type
- Handshake
Completed - Marker type for a connection that has completed the handshake.
- Incoming
- An incoming connection for which the server has not yet begun its parts of the
+handshake.
- Incoming
ZeroRtt - Marker type for a connection that is in the incoming 0-RTT state.
- MtuDiscovery
Config - Parameters governing MTU discovery.
- OpenBi
- Future produced by [
Connection::open_bi] - OpenUni
- Future produced by [
Connection::open_uni] - Outgoing
ZeroRtt - Marker type for a connection that is in the outgoing 0-RTT state.
- Path
Info - Information about a network path used by a
Connection. - Path
InfoList - List of
PathInfo for the network paths of a Connection. - Path
Stats - Statistics related to a transmission path
- Quinn
TransportConfig - Parameters governing the core QUIC state machine
- Read
Datagram - Future produced by [
Connection::read_datagram] - Recv
Stream - A stream that can only be used to receive data
- Remote
EndpointIdError - Retry
Error - Error for attempting to retry an [
Incoming] which already bears a token from a previous retry - Send
Stream - A stream that can only be used to send data
- Server
Config - Parameters governing incoming connections
- Stream
Id - Identifier for a stream within a particular connection
- Transport
Error - Transport-level errors occur when a peer violates the protocol specification
- Transport
ErrorCode - Transport-level error code
- UdpStats
- Statistics about UDP datagrams transmitted or received on a connection
- Unsupported
Version - Error indicating that the specified QUIC version is not supported
- VarInt
- An integer less than 2^62
- Weak
ConnectionHandle - A handle to some connection internals, use with care.
- Written
- Indicates how many bytes and chunks had been transferred in a write operation
Enums§
- After
HandshakeOutcome - Outcome of
EndpointHooks::after_handshake - Alpn
Error - Authentication
Error - Before
ConnectOutcome - Outcome of
EndpointHooks::before_connect - Bind
Error - Connect
Error - Connect
WithOptsError - Connecting
Error - Connection
Error - Reasons why a connection might be lost
- Direct
AddrType - The type of direct address.
- Read
Error - Errors that arise from reading from a stream.
- Read
ExactError - Errors that arise from reading from a stream.
- Read
ToEndError - Errors from
RecvStream::read_to_end - Relay
Mode - Configuration of the relay servers for an
Endpoint. - Reset
Error - Errors that arise while waiting for a stream to be reset
- Send
DatagramError - Errors that can arise when sending a datagram
- Source
- The origin or source through which an address associated with a remote endpoint
+was discovered.
- Stopped
Error - Errors that arise while monitoring for a send stream stop from the peer
- Transport
Config - Available transport configurations.
- Write
Error - Errors that arise from writing to a stream
- Zero
RttStatus - Returned from
OutgoingZeroRttConnection::handshake_completed.
Constants§
- ENV_
FORCE_STAGING_RELAYS - Environment variable to force the use of staging relays.
Traits§
- AeadKey
- A key for sealing data with AEAD-based algorithms
- Connection
State - Trait to track the state of a
Connection at compile time. - Controller
- Common interface for different congestion controllers
- Controller
Factory - Constructs controllers on demand
- Crypto
ServerConfig - Server-side configuration for the crypto protocol
- Endpoint
Hooks - EndpointHooks intercept the connection establishment process of an
Endpoint. - Handshake
TokenKey - A pseudo random key for HKDF
Functions§
- default_
relay_mode - Returns the default relay mode.
- force_
staging_infra - Returns
true if the use of staging relays is forced.
Type Aliases§
- Incoming
ZeroRttConnection - A QUIC connection on the server-side that can possibly accept 0-RTT data.
- Outgoing
ZeroRttConnection - The client side of a 0-RTT connection.
\ No newline at end of file
diff --git a/pr/3689/docs/iroh/endpoint/sidebar-items.js b/pr/3689/docs/iroh/endpoint/sidebar-items.js
index fcf47b8655..fe1ffc9ef7 100644
--- a/pr/3689/docs/iroh/endpoint/sidebar-items.js
+++ b/pr/3689/docs/iroh/endpoint/sidebar-items.js
@@ -1 +1 @@
-window.SIDEBAR_ITEMS = {"constant":["ENV_FORCE_STAGING_RELAYS"],"enum":["AlpnError","AuthenticationError","BindError","ConnectError","ConnectWithOptsError","ConnectingError","ConnectionError","DirectAddrType","ReadError","ReadExactError","ReadToEndError","RelayMode","ResetError","SendDatagramError","Source","StoppedError","TransportConfig","WriteError","ZeroRttStatus"],"fn":["default_relay_mode","force_staging_infra"],"mod":["presets"],"struct":["Accept","AcceptBi","AcceptUni","Accepting","AckFrequencyConfig","ApplicationClose","Builder","Chunk","ClosedStream","ConnectOptions","Connecting","Connection","ConnectionClose","ConnectionStats","CryptoError","DirectAddr","Endpoint","ExportKeyingMaterialError","FrameStats","HandshakeCompleted","Incoming","IncomingZeroRtt","MtuDiscoveryConfig","OpenBi","OpenUni","OutgoingZeroRtt","PathInfo","PathInfoList","PathStats","QuinnTransportConfig","ReadDatagram","RecvStream","RemoteEndpointIdError","RetryError","SendStream","ServerConfig","StreamId","TransportError","TransportErrorCode","UdpStats","UnsupportedVersion","VarInt","WeakConnectionHandle","Written"],"trait":["AeadKey","ConnectionState","Controller","ControllerFactory","CryptoServerConfig","HandshakeTokenKey"],"type":["IncomingZeroRttConnection","OutgoingZeroRttConnection"]};
\ No newline at end of file
+window.SIDEBAR_ITEMS = {"constant":["ENV_FORCE_STAGING_RELAYS"],"enum":["AfterHandshakeOutcome","AlpnError","AuthenticationError","BeforeConnectOutcome","BindError","ConnectError","ConnectWithOptsError","ConnectingError","ConnectionError","DirectAddrType","ReadError","ReadExactError","ReadToEndError","RelayMode","ResetError","SendDatagramError","Source","StoppedError","TransportConfig","WriteError","ZeroRttStatus"],"fn":["default_relay_mode","force_staging_infra"],"mod":["presets"],"struct":["Accept","AcceptBi","AcceptUni","Accepting","AckFrequencyConfig","ApplicationClose","Builder","Chunk","ClosedStream","ConnectOptions","Connecting","Connection","ConnectionClose","ConnectionInfo","ConnectionStats","CryptoError","DirectAddr","Endpoint","ExportKeyingMaterialError","FrameStats","HandshakeCompleted","Incoming","IncomingZeroRtt","MtuDiscoveryConfig","OpenBi","OpenUni","OutgoingZeroRtt","PathInfo","PathInfoList","PathStats","QuinnTransportConfig","ReadDatagram","RecvStream","RemoteEndpointIdError","RetryError","SendStream","ServerConfig","StreamId","TransportError","TransportErrorCode","UdpStats","UnsupportedVersion","VarInt","WeakConnectionHandle","Written"],"trait":["AeadKey","ConnectionState","Controller","ControllerFactory","CryptoServerConfig","EndpointHooks","HandshakeTokenKey"],"type":["IncomingZeroRttConnection","OutgoingZeroRttConnection"]};
\ No newline at end of file
diff --git a/pr/3689/docs/iroh/endpoint/struct.Accept.html b/pr/3689/docs/iroh/endpoint/struct.Accept.html
index 0f7983cb57..cc147574cd 100644
--- a/pr/3689/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/3689/docs/iroh/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
-Trait Implementations§
Source§impl<'pin, 'a> Unpin for Accept<'a>where
+Accept in iroh::endpoint - Rust Accept
pub struct Accept<'a> { /* private fields */ }
Expand description
Future produced by Endpoint::accept.
+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
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
@@ -27,14 +27,12 @@ the current task for wakeup if the value is not yet available. where
Self: Sized,
Similar to [CancellationToken::run_until_cancelled],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§fn with_cancellation_token_owned(
+but with the advantage that it is easier to write fluent call chains. Read more
§fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
Similar to [CancellationToken::run_until_cancelled_owned],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§impl<T> FutureExt for T
§fn map<U, F>(self, f: F) -> Map<Self, F>
Map this future’s output to a different type, returning a new future of
diff --git a/pr/3689/docs/iroh/endpoint/struct.AcceptBi.html b/pr/3689/docs/iroh/endpoint/struct.AcceptBi.html
index 9b322bd65c..3b405cfaa2 100644
--- a/pr/3689/docs/iroh/endpoint/struct.AcceptBi.html
+++ b/pr/3689/docs/iroh/endpoint/struct.AcceptBi.html
@@ -30,14 +30,12 @@ the current task for wakeup if the value is not yet available. where
Self: Sized,Similar to [CancellationToken::run_until_cancelled],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§fn with_cancellation_token_owned(
+but with the advantage that it is easier to write fluent call chains. Read more
§fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
Similar to [CancellationToken::run_until_cancelled_owned],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more
§impl<T> FutureExt for T
§fn map<U, F>(self, f: F) -> Map<Self, F>
Map this future’s output to a different type, returning a new future of
diff --git a/pr/3689/docs/iroh/endpoint/struct.AcceptUni.html b/pr/3689/docs/iroh/endpoint/struct.AcceptUni.html
index 63f270c174..fa9b626052 100644
--- a/pr/3689/docs/iroh/endpoint/struct.AcceptUni.html
+++ b/pr/3689/docs/iroh/endpoint/struct.AcceptUni.html
@@ -30,14 +30,12 @@ the current task for wakeup if the value is not yet available. where
Self: Sized,Similar to [CancellationToken::run_until_cancelled],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§fn with_cancellation_token_owned(
+but with the advantage that it is easier to write fluent call chains. Read more
§fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
Similar to [CancellationToken::run_until_cancelled_owned],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§impl<T> FutureExt for T
§fn map<U, F>(self, f: F) -> Map<Self, F>
Map this future’s output to a different type, returning a new future of
diff --git a/pr/3689/docs/iroh/endpoint/struct.Accepting.html b/pr/3689/docs/iroh/endpoint/struct.Accepting.html
index d9de02d730..4c5ec60ea4 100644
--- a/pr/3689/docs/iroh/endpoint/struct.Accepting.html
+++ b/pr/3689/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,9 +16,9 @@ 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 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 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
@@ -45,14 +45,12 @@ the current task for wakeup if the value is not yet available. where
Self: Sized,
Similar to [CancellationToken::run_until_cancelled],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§fn with_cancellation_token_owned(
+but with the advantage that it is easier to write fluent call chains. Read more
§fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
Similar to [CancellationToken::run_until_cancelled_owned],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§impl<T> FutureExt for T
§fn map<U, F>(self, f: F) -> Map<Self, F>
Map this future’s output to a different type, returning a new future of
diff --git a/pr/3689/docs/iroh/endpoint/struct.Builder.html b/pr/3689/docs/iroh/endpoint/struct.Builder.html
index 990f623c5d..6ab42e81a3 100644
--- a/pr/3689/docs/iroh/endpoint/struct.Builder.html
+++ b/pr/3689/docs/iroh/endpoint/struct.Builder.html
@@ -1,30 +1,30 @@
-Builder in iroh::endpoint - Rust Builder
pub struct Builder { /* private fields */ }
Expand description
Builder for Endpoint.
+Builder in iroh::endpoint - Rust Builder
pub struct Builder { /* private fields */ }
Expand description
Builder for Endpoint.
By default the endpoint will generate a new random SecretKey, which will result in a
new EndpointId.
To create the Endpoint call Builder::bind.
-Implementations§
Source§impl Builder
Implementations§
Source§impl Builder
Sourcepub fn empty(relay_mode: RelayMode) -> Self
Creates an empty builder with no discovery services.
-Sourcepub fn bind_addr_v4(self, bind_addr: SocketAddrV4) -> Self
Available on non-wasm_browser only.
Adds an IP transport, binding to the provided IPv4 address.
+Sourcepub fn empty(relay_mode: RelayMode) -> Self
Creates an empty builder with no discovery services.
+Sourcepub fn bind_addr_v4(self, bind_addr: SocketAddrV4) -> Self
Available on non-wasm_browser only.
Adds an IP transport, binding to the provided IPv4 address.
If you want to remove the default transports, make sure to call clear_ip first.
Setting the port to 0 will use a random port.
If the port specified is already in use, it will fallback to choosing a random port.
-Sourcepub fn bind_addr_v6(self, bind_addr: SocketAddrV6) -> Self
Available on non-wasm_browser only.
Adds an IP transport, binding to the provided IPv6 address.
+Sourcepub fn bind_addr_v6(self, bind_addr: SocketAddrV6) -> Self
Available on non-wasm_browser only.
Adds an IP transport, binding to the provided IPv6 address.
If you want to remove the default transports, make sure to call clear_ip first.
Setting the port to 0 will use a random port.
If the port specified is already in use, it will fallback to choosing a random port.
-Sourcepub fn clear_ip_transports(self) -> Self
Available on non-wasm_browser only.
Removes all IP based transports
-Sourcepub fn clear_relay_transports(self) -> Self
Removes all relay based transports
-Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
Sets a secret key to authenticate with other peers.
+Sourcepub fn clear_ip_transports(self) -> Self
Available on non-wasm_browser only.
Removes all IP based transports
+Sourcepub fn clear_relay_transports(self) -> Self
Removes all relay based transports
+Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
Sets a secret key to authenticate with other peers.
This secret key’s public key will be the PublicKey of this endpoint and thus
also its EndpointId
If not set, a new secret key will be generated.
-Sourcepub fn alpns(self, alpn_protocols: Vec<Vec<u8>>) -> Self
Sets the ALPN protocols that this endpoint will accept on incoming connections.
+Sourcepub fn relay_mode(self, relay_mode: RelayMode) -> Self
Sets the relay servers to assist in establishing connectivity.
+Sourcepub fn relay_mode(self, relay_mode: RelayMode) -> Self
Sets the relay servers to assist in establishing connectivity.
Relay servers are used to establish initial connection with another iroh endpoint.
They also perform various functions related to hole punching, see the crate docs
for more details.
@@ -32,11 +32,11 @@ for more details.
When using RelayMode::Custom, the provided relay_map must contain at least one
configured relay endpoint. If an invalid RelayMap is provided bind
will result in an error.
-Sourcepub fn clear_discovery(self) -> Self
Removes all discovery services from the builder.
+Sourcepub fn clear_discovery(self) -> Self
Removes all discovery services from the builder.
If no discovery service is set, connecting to an endpoint without providing its
direct addresses or relay URLs will fail.
See the documentation of the crate::discovery::Discovery trait for details.
-Sourcepub fn discovery(self, discovery: impl IntoDiscovery) -> Self
Adds a discovery mechanism for this endpoint.
+Sourcepub fn discovery(self, discovery: impl IntoDiscovery) -> Self
Adds a discovery mechanism for this endpoint.
The function discovery
will be called on endpoint creation with the configured secret key of
the endpoint. Discovery services that need to publish information need
@@ -47,13 +47,13 @@ to use this secret key to sign the information.
direct addresses or relay URLs will fail.
To clear all discovery services, use Builder::clear_discovery.
See the documentation of the crate::discovery::Discovery trait for details.
-Sourcepub fn user_data_for_discovery(self, user_data: UserData) -> Self
Sets the initial user-defined data to be published in discovery services for this node.
+Sourcepub fn user_data_for_discovery(self, user_data: UserData) -> Self
Sets the initial user-defined data to be published in discovery services for this node.
When using discovery services, this string of UserData will be published together
with the endpoint’s addresses and relay URL. When other endpoints discover this endpoint,
they retrieve the UserData in addition to the addressing info.
Iroh itself does not interpret the user-defined data in any way, it is purely left
for applications to parse and use.
-Sourcepub fn transport_config(self, transport_config: TransportConfig) -> Self
Sets a custom quinn::TransportConfig for this endpoint.
+Sourcepub fn transport_config(self, transport_config: TransportConfig) -> Self
Sets a custom quinn::TransportConfig for this endpoint.
The transport config contains parameters governing the QUIC state machine.
If unset, the default config is used. Default values should be suitable for most
internet applications. Applications protocols which forbid remotely-initiated
@@ -61,33 +61,40 @@ streams should set max_concurrent_bidi_streams and max_concur
zero.
Please be aware that changing some settings may have adverse effects on establishing
and maintaining direct connections.
-Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Optionally sets a custom DNS resolver to use for this endpoint.
+Sourcepub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self
Available on non-wasm_browser only.
Optionally sets a custom DNS resolver to use for this endpoint.
The DNS resolver is used to resolve relay hostnames, and endpoint addresses if
crate::discovery::dns::DnsDiscovery is configured.
By default, a new DNS resolver is created which is configured to use the
host system’s DNS configuration. You can pass a custom instance of DnsResolver
here to use a differently configured DNS resolver for this endpoint, or to share
a DnsResolver between multiple endpoints.
-Sourcepub fn proxy_url(self, url: Url) -> Self
Sets an explicit proxy url to proxy all HTTP(S) traffic through.
-Sourcepub fn proxy_from_env(self) -> Self
Sets the proxy url from the environment, in this order:
+Sourcepub fn proxy_url(self, url: Url) -> Self
Sets an explicit proxy url to proxy all HTTP(S) traffic through.
+Sourcepub fn proxy_from_env(self) -> Self
Sets the proxy url from the environment, in this order:
HTTP_PROXY
http_proxy
HTTPS_PROXY
https_proxy
-Sourcepub fn keylog(self, keylog: bool) -> Self
Enables saving the TLS pre-master key for connections.
+Sourcepub fn keylog(self, keylog: bool) -> Self
Enables saving the TLS pre-master key for connections.
This key should normally remain secret but can be useful to debug networking issues
by decrypting captured traffic.
If keylog is true then setting the SSLKEYLOGFILE environment variable to a
filename will result in this file being used to log the TLS pre-master keys.
-Sourcepub fn insecure_skip_relay_cert_verify(self, skip_verify: bool) -> Self
Available on crate features test-utils only.
Skip verification of SSL certificates from relay servers
+Sourcepub fn insecure_skip_relay_cert_verify(self, skip_verify: bool) -> Self
Available on crate features test-utils only.
Skip verification of SSL certificates from relay servers
May only be used in tests.
-Sourcepub fn max_tls_tickets(self, n: usize) -> Self
Set the maximum number of TLS tickets to cache.
+Sourcepub fn max_tls_tickets(self, n: usize) -> Self
Set the maximum number of TLS tickets to cache.
Set this to a larger value if you want to do 0rtt connections to a large
number of clients.
The default is 256, taking about 150 KiB in memory.
-Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Builder
§impl !RefUnwindSafe for Builder
§impl Send for Builder
§impl Sync for Builder
§impl Unpin for Builder
§impl !UnwindSafe for Builder
Blanket Implementations§
Sourcepub fn hooks(self, hooks: impl EndpointHooks + 'static) -> Self
Install hooks onto the endpoint.
+Endpoint hooks intercept the connection establishment process of an Endpoint.
+You can install multiple EndpointHooks by calling this function multiple times.
+Order matters: hooks are invoked in the order they were installed onto the endpoint
+builder. Once a hook returns reject, further processing
+is aborted and other hooks won’t be invoked.
+See EndpointHooks for details on the possible interception points in the connection lifecycle.
+Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Builder
§impl !RefUnwindSafe for Builder
§impl Send for Builder
§impl Sync for Builder
§impl Unpin for Builder
§impl !UnwindSafe for Builder
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3689/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3689/docs/iroh/endpoint/struct.ConnectOptions.html
index f8a5dd4c30..3d80821958 100644
--- a/pr/3689/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/3689/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 TransportConfig.
-Sourcepub fn with_transport_config(
+
Sourcepub fn with_transport_config(
self,
transport_config: Arc<TransportConfig>,
) -> 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/3689/docs/iroh/endpoint/struct.Connecting.html b/pr/3689/docs/iroh/endpoint/struct.Connecting.html
index d2ce789a85..9f7e6cf14d 100644
--- a/pr/3689/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3689/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
@@ -54,14 +54,12 @@ the current task for wakeup if the value is not yet available. where
Self: Sized,
Similar to [CancellationToken::run_until_cancelled],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§fn with_cancellation_token_owned(
+but with the advantage that it is easier to write fluent call chains. Read more
§fn with_cancellation_token_owned(
self,
cancellation_token: CancellationToken,
) -> WithCancellationTokenFutureOwned<Self>where
Self: Sized,
Similar to [CancellationToken::run_until_cancelled_owned],
-but with the advantage that it is easier to write fluent call chains,
-and biased towards waiting for [CancellationToken] to complete. Read more§impl<T> FutureExt for T
§fn map<U, F>(self, f: F) -> Map<Self, F>
Map this future’s output to a different type, returning a new future of
diff --git a/pr/3689/docs/iroh/endpoint/struct.Connection.html b/pr/3689/docs/iroh/endpoint/struct.Connection.html
index bc869a2c67..1c129ae561 100644
--- a/pr/3689/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3689/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,35 +51,35 @@ 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 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) -> 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) -> 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) -> 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) -> 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],
@@ -90,20 +90,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)
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)
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,
) -> impl Watcher<Value = PathInfoList> + Unpin + Send + Sync + 'static
Returns a Watcher for the network paths of this connection.
A connection can have several network paths to the remote endpoint, commonly there
@@ -112,8 +112,12 @@ will be a path via the relay server and a holepunched path.
for transmission changes (see PathInfo::is_selected).
The PathInfoList returned from the watcher contains a PathInfo for each
transmission path.
-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.
+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.
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.
@@ -122,8 +126,8 @@ 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.
-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
@@ -139,9 +143,9 @@ 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.
-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/3689/docs/iroh/endpoint/struct.ConnectionInfo.html b/pr/3689/docs/iroh/endpoint/struct.ConnectionInfo.html
new file mode 100644
index 0000000000..29ee2bf6f5
--- /dev/null
+++ b/pr/3689/docs/iroh/endpoint/struct.ConnectionInfo.html
@@ -0,0 +1,52 @@
+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,
+) -> impl Watcher<Value = PathInfoList> + Unpin + Send + Sync + 'static
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.
+The watcher is updated whenever a path is opened or closed, or when the path selected
+for transmission changes (see PathInfo::is_selected).
+The PathInfoList returned from the watcher contains a PathInfo for each
+transmission path.
+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.
+Returns None if the connection has been dropped already before this call.
+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,
Source§impl<T> BorrowMut<T> for Twhere
+ T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moreSource§impl<T> CloneToUninit for Twhere
+ T: Clone,
§impl<T> CompatExt for T
§impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
+ T: ?Sized,
§impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
+ S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
+[WithDispatch] wrapper. Read more
\ No newline at end of file
diff --git a/pr/3689/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3689/docs/iroh/endpoint/struct.DirectAddr.html
index e5d501214d..867cc22a32 100644
--- a/pr/3689/docs/iroh/endpoint/struct.DirectAddr.html
+++ b/pr/3689/docs/iroh/endpoint/struct.DirectAddr.html
@@ -1,4 +1,4 @@
-DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust DirectAddr
pub struct DirectAddr {
pub addr: SocketAddr,
pub typ: DirectAddrType,
}
Expand description
A direct address on which an iroh-endpoint might be contactable.
@@ -9,16 +9,16 @@ iroh endpoint, see Fields§§addr: SocketAddrThe address.
§typ: DirectAddrTypeThe origin of this direct address.
-Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
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 DirectAddr
Source§impl Hash for DirectAddr
1.3.0 · Source§fn hash_slice<H>(data: &[Self], state: &mut H)where
+Trait Implementations§
Source§impl Clone for DirectAddr
Source§fn clone(&self) -> DirectAddr
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 DirectAddr
Source§impl Hash for DirectAddr
Source§impl Ord for DirectAddr
Source§impl Ord for DirectAddr
Source§fn cmp(&self, other: &DirectAddr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moreSource§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl PartialEq for DirectAddr
Source§impl PartialOrd for DirectAddr
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
Blanket Implementations§
Source§impl Eq for DirectAddr
Source§impl StructuralPartialEq for DirectAddr
Auto Trait Implementations§
§impl Freeze for DirectAddr
§impl RefUnwindSafe for DirectAddr
§impl Send for DirectAddr
§impl Sync for DirectAddr
§impl Unpin for DirectAddr
§impl UnwindSafe for DirectAddr
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/3689/docs/iroh/endpoint/struct.Endpoint.html b/pr/3689/docs/iroh/endpoint/struct.Endpoint.html
index 103521eddd..a8c9105710 100644
--- a/pr/3689/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3689/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
+Endpoint in iroh::endpoint - Rust Endpoint
pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh endpoint, establishing connections with other endpoints.
This is the main API interface to create connections to, and accept connections from
other iroh endpoints. The connections are peer-to-peer and encrypted, a Relay server is
used to make the connections reliable. See the [crate docs] for a more detailed
@@ -16,24 +16,24 @@ 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.
+Sourcepub fn empty_builder(relay_mode: RelayMode) -> Builder
Returns the builder for an Endpoint, with an empty configuration.
See Builder::empty for details.
-Sourcepub async fn bind() -> Result<Self, BindError>
Constructs a default Endpoint and binds it immediately.
+Sourcepub async fn bind() -> Result<Self, BindError>
Constructs a default Endpoint and binds it immediately.
Uses the presets::N0 as configuration.
-Sourcepub fn set_alpns(&self, alpns: Vec<Vec<u8>>)
Sets the list of accepted ALPN protocols.
This will only affect new incoming connections.
Note that this overrides the current list of ALPNs.
-Sourcepub async fn insert_relay(
+
Sourcepub async fn insert_relay(
&self,
relay: RelayUrl,
config: Arc<RelayConfig>,
) -> Option<Arc<RelayConfig>>
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn remove_relay(&self, relay: &RelayUrl) -> Option<Arc<RelayConfig>>
Sourcepub async fn connect(
&self,
endpoint_addr: impl Into<EndpointAddr>,
alpn: &[u8],
@@ -53,7 +53,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],
@@ -73,17 +73,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.
@@ -93,7 +93,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};
@@ -117,7 +117,7 @@ on the internet.
the endpoint changes its preferred relay server
more addresses are discovered for this endpoint
-
Sourcepub async fn online(&self)
A convenience method that waits for the endpoint to be considered “online”.
+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.
Event if no relays are configured, this will still wait for a relay connection.
@@ -129,16 +129,16 @@ timeout. We recommend using a timeout close to
To understand if the endpoint has gone back “offline”,
you must use the Endpoint::watch_addr method, to
get information on the current relay and direct address information.
-Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Returns the local socket addresses on which the underlying sockets are bound.
+Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
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 async fn latency(&self, endpoint_id: EndpointId) -> Option<Duration>
Returns the currently lowest latency for this endpoint.
+Sourcepub async fn latency(&self, endpoint_id: EndpointId) -> Option<Duration>
Returns the currently lowest latency for this endpoint.
Will return None if we do not have any address information for the given endpoint_id.
-Sourcepub fn dns_resolver(&self) -> &DnsResolver
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
+Sourcepub fn dns_resolver(&self) -> &DnsResolver
Available on non-wasm_browser only.
Returns the DNS resolver used in this Endpoint.
-Sourcepub fn discovery(&self) -> &ConcurrentDiscovery
Returns the discovery mechanism, if configured.
+Sourcepub fn discovery(&self) -> &ConcurrentDiscovery
Returns the discovery mechanism, if configured.
See Builder::discovery.
-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:
@@ -208,7 +208,7 @@ registry.write().unwrap().register_all(endpoint.metrics());
.std_context("text")?;
assert!(res.contains(r#"TYPE magicsock_recv_datagrams counter"#));
-assert!(res.contains(r#"magicsock_recv_datagrams_total 0"#));Sourcepub async fn network_change(&self)
Notifies the system of potential network changes.
+assert!(res.contains(r#"magicsock_recv_datagrams_total 0"#));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
@@ -216,12 +216,12 @@ function allows for notifying iroh of any potential network changes like
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.
-Sourcepub fn set_user_data_for_discovery(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in discovery services for this endpoint.
+Sourcepub fn set_user_data_for_discovery(&self, user_data: Option<UserData>)
Sets the initial user-defined data to be published in discovery services 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 discovery services.
See also Builder::user_data_for_discovery for setting an initial value when
building the endpoint.
-Sourcepub async fn close(&self)
Closes the QUIC endpoint and the magic 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.
@@ -247,8 +247,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.
-
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
Blanket Implementations§
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for Endpoint
§impl !RefUnwindSafe for Endpoint
§impl Send for Endpoint
§impl Sync for Endpoint
§impl Unpin for Endpoint
§impl !UnwindSafe for Endpoint
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/3689/docs/iroh/endpoint/struct.FrameStats.html b/pr/3689/docs/iroh/endpoint/struct.FrameStats.html
index 632afcd7ac..7e7c383410 100644
--- a/pr/3689/docs/iroh/endpoint/struct.FrameStats.html
+++ b/pr/3689/docs/iroh/endpoint/struct.FrameStats.html
@@ -1,4 +1,4 @@
-FrameStats in iroh::endpoint - Rust FrameStats
Struct FrameStats
#[non_exhaustive]pub struct FrameStats {Show 37 fields
+FrameStats in iroh::endpoint - Rust FrameStats
Struct FrameStats
#[non_exhaustive]pub struct FrameStats {}
Expand description
Number of frames transmitted or received of each frame type
-Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§acks: u64§path_acks: u64§ack_frequency: u64§crypto: u64§connection_close: u64§data_blocked: u64§datagram: u64§handshake_done: u8§immediate_ack: u64§max_data: u64§max_stream_data: u64§max_streams_bidi: u64§max_streams_uni: u64§new_connection_id: u64§path_new_connection_id: u64§new_token: u64§path_challenge: u64§path_response: u64§ping: u64§reset_stream: u64§retire_connection_id: u64§path_retire_connection_id: u64§stream_data_blocked: u64§streams_blocked_bidi: u64§streams_blocked_uni: u64§stop_sending: u64§stream: u64§observed_addr: u64§path_abandon: u64§path_available: u64§path_backup: u64§max_path_id: u64§paths_blocked: u64§path_cids_blocked: u64§add_address: u64§punch_me_now: u64§remove_address: u64Trait Implementations§
§impl Clone for FrameStats
§fn clone(&self) -> FrameStats
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 FrameStats
§impl Default for FrameStats
§fn default() -> FrameStats
Returns the “default value” for a type. Read more§impl Copy for FrameStats
Auto Trait Implementations§
§impl Freeze for FrameStats
§impl RefUnwindSafe for FrameStats
§impl Send for FrameStats
§impl Sync for FrameStats
§impl Unpin for FrameStats
§impl UnwindSafe for FrameStats
Blanket Implementations§
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.§acks: u64§path_acks: u64§ack_frequency: u64§crypto: u64§connection_close: u64§data_blocked: u64§datagram: u64§handshake_done: u8§immediate_ack: u64§max_data: u64§max_stream_data: u64§max_streams_bidi: u64§max_streams_uni: u64§new_connection_id: u64§path_new_connection_id: u64§new_token: u64§path_challenge: u64§path_response: u64§ping: u64§reset_stream: u64§retire_connection_id: u64§path_retire_connection_id: u64§stream_data_blocked: u64§streams_blocked_bidi: u64§streams_blocked_uni: u64§stop_sending: u64§stream: u64§observed_addr: u64§path_abandon: u64§path_available: u64§path_backup: u64§max_path_id: u64§paths_blocked: u64§path_cids_blocked: u64§add_address: u64§reach_out: u64§remove_address: u64Trait Implementations§
§impl Clone for FrameStats
§fn clone(&self) -> FrameStats
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 FrameStats
§impl Default for FrameStats
§fn default() -> FrameStats
Returns the “default value” for a type. Read more§impl Copy for FrameStats
Auto Trait Implementations§
§impl Freeze for FrameStats
§impl RefUnwindSafe for FrameStats
§impl Send for FrameStats
§impl Sync for FrameStats
§impl Unpin for FrameStats
§impl UnwindSafe for FrameStats
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/3689/docs/iroh/endpoint/struct.HandshakeCompleted.html b/pr/3689/docs/iroh/endpoint/struct.HandshakeCompleted.html
index 5e6dfd65e0..31a4113a96 100644
--- a/pr/3689/docs/iroh/endpoint/struct.HandshakeCompleted.html
+++ b/pr/3689/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/3689/docs/iroh/endpoint/struct.Incoming.html b/pr/3689/docs/iroh/endpoint/struct.Incoming.html
index 9cb4b4cd42..1c5b734ac7 100644
--- a/pr/3689/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3689/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust Incoming
pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
+
Incoming in iroh::endpoint - Rust