pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";Expand description
Environment variable to force the use of staging relays.
+diff --git a/pr/3465/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/3465/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html index 05f73b3abf..475659f8fd 100644 --- a/pr/3465/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html +++ b/pr/3465/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.
+Error::source. Read more#[non_exhaustive]pub enum AlpnError {
+AlpnError in iroh::endpoint - Rust #[non_exhaustive]pub enum AlpnError {
ConnectionError {
source: ConnectionError,
backtrace: Option<Backtrace>,
@@ -12,11 +12,11 @@
backtrace: Option<Backtrace>,
span_trace: SpanTrace,
},
-}
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 description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for AlpnError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
+}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 description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for AlpnError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
-and continuing with recursive calls to Error::source. Read moreSource§impl From<ConnectionError> for AlpnError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.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§
Source§impl From<ConnectionError> for AlpnError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.Auto Trait Implementations§
§impl !Freeze for AlpnError
§impl !RefUnwindSafe for AlpnError
§impl Send for AlpnError
§impl Sync for AlpnError
§impl Unpin for AlpnError
§impl !UnwindSafe for AlpnError
Blanket Implementations§
§impl<T> AsErrorSource for Twhere
T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
diff --git a/pr/3465/docs/iroh/endpoint/enum.BindError.html b/pr/3465/docs/iroh/endpoint/enum.BindError.html
index c75de3736b..ca765cde83 100644
--- a/pr/3465/docs/iroh/endpoint/enum.BindError.html
+++ b/pr/3465/docs/iroh/endpoint/enum.BindError.html
@@ -1,11 +1,11 @@
-BindError in iroh::endpoint - Rust #[non_exhaustive]pub enum BindError {
+BindError in iroh::endpoint - Rust #[non_exhaustive]pub enum BindError {
MagicSpawn {
source: CreateHandleError,
backtrace: Option<Backtrace>,
span_trace: SpanTrace,
},
-}
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 description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for BindError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
+}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 description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingAuto 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§
Source§impl<T> Any for Twhere
diff --git a/pr/3465/docs/iroh/endpoint/enum.ConnectError.html b/pr/3465/docs/iroh/endpoint/enum.ConnectError.html
index 3a5be3c749..9e9352ebea 100644
--- a/pr/3465/docs/iroh/endpoint/enum.ConnectError.html
+++ b/pr/3465/docs/iroh/endpoint/enum.ConnectError.html
@@ -1,4 +1,4 @@
-ConnectError in iroh::endpoint - Rust #[non_exhaustive]pub enum ConnectError {
+ConnectError in iroh::endpoint - Rust #[non_exhaustive]pub enum ConnectError {
Connect {
source: Box<ConnectWithOptsError>,
backtrace: Option<Backtrace>,
@@ -9,11 +9,11 @@
backtrace: Option<Backtrace>,
span_trace: SpanTrace,
},
-}
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 description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for ConnectError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
+}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 description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for ConnectError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
-and continuing with recursive calls to Error::source. Read moreSource§impl From<ConnectWithOptsError> for ConnectError
Source§fn from(error: ConnectWithOptsError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.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§
Source§impl From<ConnectWithOptsError> for ConnectError
Source§fn from(error: ConnectWithOptsError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.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§
§impl<T> AsErrorSource for Twhere
T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
diff --git a/pr/3465/docs/iroh/endpoint/enum.ConnectWithOptsError.html b/pr/3465/docs/iroh/endpoint/enum.ConnectWithOptsError.html
index 6e6c9b18df..cce5f844fc 100644
--- a/pr/3465/docs/iroh/endpoint/enum.ConnectWithOptsError.html
+++ b/pr/3465/docs/iroh/endpoint/enum.ConnectWithOptsError.html
@@ -1,4 +1,4 @@
-ConnectWithOptsError in iroh::endpoint - Rust #[non_exhaustive]pub enum ConnectWithOptsError {
+ConnectWithOptsError in iroh::endpoint - Rust #[non_exhaustive]pub enum ConnectWithOptsError {
AddNodeAddr {
source: AddNodeAddrError,
backtrace: Option<Backtrace>,
@@ -18,11 +18,11 @@
backtrace: Option<Backtrace>,
span_trace: SpanTrace,
},
-}
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 description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for ConnectWithOptsError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
+}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 description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for ConnectWithOptsError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
-and continuing with recursive calls to Error::source. Read moreSource§impl From<AddNodeAddrError> for ConnectWithOptsError
Source§fn from(error: AddNodeAddrError) -> Self
Converts to this type from the input type.Source§impl From<ConnectWithOptsError> for ConnectError
Source§fn from(error: ConnectWithOptsError) -> Self
Converts to this type from the input type.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§
Source§impl From<AddNodeAddrError> for ConnectWithOptsError
Source§fn from(error: AddNodeAddrError) -> Self
Converts to this type from the input type.Source§impl From<ConnectWithOptsError> for ConnectError
Source§fn from(error: ConnectWithOptsError) -> Self
Converts to this type from the input type.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§
§impl<T> AsErrorSource for Twhere
T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
diff --git a/pr/3465/docs/iroh/endpoint/enum.ConnectionError.html b/pr/3465/docs/iroh/endpoint/enum.ConnectionError.html
index b4a7d9b353..b3355a311d 100644
--- a/pr/3465/docs/iroh/endpoint/enum.ConnectionError.html
+++ b/pr/3465/docs/iroh/endpoint/enum.ConnectionError.html
@@ -20,7 +20,7 @@ and §LocallyClosed
The local application closed the connection
§CidsExhausted
The connection could not be created because not enough of the CID space is available
Try using longer connection IDs.
-Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§fn eq(&self, other: &ConnectionError) -> bool
Tests for self and other values to be equal, and is used by ==.Trait Implementations§
§impl Clone for ConnectionError
§fn clone(&self) -> ConnectionError
Returns a copy of the value. Read more1.0.0 · Source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for ConnectionError
§impl Display for ConnectionError
§impl Error for ConnectionError
§fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more1.0.0 · Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()§impl From<Close> for ConnectionError
§fn from(x: Close) -> ConnectionError
Converts to this type from the input type.Source§impl From<ConnectionError> for AcceptError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for AlpnError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.Source§impl From<ConnectionError> for ConnectError
Source§fn from(error: ConnectionError) -> Self
Converts to this type from the input type.§impl From<ConnectionError> for ReadError
§fn from(source: ConnectionError) -> ReadError
Converts to this type from the input type.§impl From<ConnectionError> for ResetError
§fn from(source: ConnectionError) -> ResetError
Converts to this type from the input type.§impl From<ConnectionError> for SendDatagramError
§fn from(source: ConnectionError) -> SendDatagramError
Converts to this type from the input type.§impl From<ConnectionError> for StoppedError
§fn from(source: ConnectionError) -> StoppedError
Converts to this type from the input type.§impl From<ConnectionError> for WriteError
§fn from(source: ConnectionError) -> WriteError
Converts to this type from the input type.§impl From<Error> for ConnectionError
§fn from(source: Error) -> ConnectionError
Converts to this type from the input type.§impl PartialEq for ConnectionError
§impl Eq for ConnectionError
§impl StructuralPartialEq for ConnectionError
Auto Trait Implementations§
§impl !Freeze for ConnectionError
§impl RefUnwindSafe for ConnectionError
§impl Send for ConnectionError
§impl Sync for ConnectionError
§impl Unpin for ConnectionError
§impl UnwindSafe for ConnectionError
Blanket Implementations§
§impl<T> AsErrorSource for Twhere
T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
diff --git a/pr/3465/docs/iroh/endpoint/enum.GetMappingAddressError.html b/pr/3465/docs/iroh/endpoint/enum.GetMappingAddressError.html
index c2f85ccb9e..9f098a904e 100644
--- a/pr/3465/docs/iroh/endpoint/enum.GetMappingAddressError.html
+++ b/pr/3465/docs/iroh/endpoint/enum.GetMappingAddressError.html
@@ -1,4 +1,4 @@
-GetMappingAddressError in iroh::endpoint - Rust #[non_exhaustive]pub enum GetMappingAddressError {
+GetMappingAddressError in iroh::endpoint - Rust #[non_exhaustive]pub enum GetMappingAddressError {
DiscoveryStart {
source: DiscoveryError,
backtrace: Option<Backtrace>,
@@ -13,8 +13,8 @@
backtrace: Option<Backtrace>,
span_trace: SpanTrace,
},
-}
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 GetMappingAddressError
Source§impl Display for GetMappingAddressError
Source§impl Error for GetMappingAddressError
Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for GetMappingAddressError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
+}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 GetMappingAddressError
Source§impl Display for GetMappingAddressError
Source§impl Error for GetMappingAddressError
Source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Source§fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcastingSource§impl ErrorCompat for GetMappingAddressError
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to Error::source. Read moreAuto Trait Implementations§
§impl Freeze for GetMappingAddressError
§impl !RefUnwindSafe for GetMappingAddressError
§impl Send for GetMappingAddressError
§impl Sync for GetMappingAddressError
§impl Unpin for GetMappingAddressError
§impl !UnwindSafe for GetMappingAddressError
Blanket Implementations§
Source§impl<T> Any for Twhere
diff --git a/pr/3465/docs/iroh/endpoint/enum.PathSelection.html b/pr/3465/docs/iroh/endpoint/enum.PathSelection.html
index 17f1e8c1b6..c17a780fd3 100644
--- a/pr/3465/docs/iroh/endpoint/enum.PathSelection.html
+++ b/pr/3465/docs/iroh/endpoint/enum.PathSelection.html
@@ -1,12 +1,12 @@
-PathSelection in iroh::endpoint - Rust pub enum PathSelection {
+PathSelection in iroh::endpoint - Rust pub enum PathSelection {
All,
RelayOnly,
}
Available on crate feature test-utils only.Expand description
Defines the mode of path selection for all traffic flowing through
the endpoint.
Variants§
Trait Implementations§
Source§impl Clone for PathSelection
Source§fn clone(&self) -> PathSelection
Returns a copy 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 PathSelection
Source§impl Default for PathSelection
Source§fn default() -> PathSelection
Returns the “default value” for a type. Read moreSource§impl PartialEq for PathSelection
Source§impl Copy for PathSelection
Source§impl Eq for PathSelection
Source§impl StructuralPartialEq for PathSelection
Auto Trait Implementations§
§impl Freeze for PathSelection
§impl RefUnwindSafe for PathSelection
§impl Send for PathSelection
§impl Sync for PathSelection
§impl Unpin for PathSelection
§impl UnwindSafe for PathSelection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for PathSelection
Source§fn clone(&self) -> PathSelection
Returns a copy 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 PathSelection
Source§impl Default for PathSelection
Source§fn default() -> PathSelection
Returns the “default value” for a type. Read moreSource§impl PartialEq for PathSelection
Source§impl Copy for PathSelection
Source§impl Eq for PathSelection
Source§impl StructuralPartialEq for PathSelection
Auto Trait Implementations§
§impl Freeze for PathSelection
§impl RefUnwindSafe for PathSelection
§impl Send for PathSelection
§impl Sync for PathSelection
§impl Unpin for PathSelection
§impl UnwindSafe for PathSelection
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/3465/docs/iroh/endpoint/enum.RelayMode.html b/pr/3465/docs/iroh/endpoint/enum.RelayMode.html
index 24d8a7f570..5c50e85b2a 100644
--- a/pr/3465/docs/iroh/endpoint/enum.RelayMode.html
+++ b/pr/3465/docs/iroh/endpoint/enum.RelayMode.html
@@ -1,4 +1,4 @@
-RelayMode in iroh::endpoint - Rust pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust pub enum RelayMode {
Disabled,
Default,
Staging,
@@ -9,9 +9,9 @@
See crate::defaults::prod for the severs used.
§Staging
Use the staging relay servers from n0.
§Custom(RelayMap)
Use a custom relay map.
-
Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
Implementations§
Trait Implementations§
Source§impl Eq for RelayMode
Source§impl StructuralPartialEq for RelayMode
Auto Trait Implementations§
§impl Freeze for RelayMode
§impl RefUnwindSafe for RelayMode
§impl Send for RelayMode
§impl Sync for RelayMode
§impl Unpin for RelayMode
§impl UnwindSafe for RelayMode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§fn implicit(
diff --git a/pr/3465/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/3465/docs/iroh/endpoint/fn.default_relay_mode.html
index 9e0e719fc0..c4267257d4 100644
--- a/pr/3465/docs/iroh/endpoint/fn.default_relay_mode.html
+++ b/pr/3465/docs/iroh/endpoint/fn.default_relay_mode.html
@@ -1,4 +1,4 @@
-default_relay_mode in iroh::endpoint - Rust pub fn default_relay_mode() -> RelayMode
Expand description
Returns the default relay mode.
+default_relay_mode in iroh::endpoint - Rust
\ No newline at end of file
diff --git a/pr/3465/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/3465/docs/iroh/endpoint/fn.force_staging_infra.html
index 805ec34cce..ba73948ae3 100644
--- a/pr/3465/docs/iroh/endpoint/fn.force_staging_infra.html
+++ b/pr/3465/docs/iroh/endpoint/fn.force_staging_infra.html
@@ -1,2 +1,2 @@
-force_staging_infra in iroh::endpoint - Rust 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
\ No newline at end of file
diff --git a/pr/3465/docs/iroh/endpoint/index.html b/pr/3465/docs/iroh/endpoint/index.html
index f880cc1560..16b3e48240 100644
--- a/pr/3465/docs/iroh/endpoint/index.html
+++ b/pr/3465/docs/iroh/endpoint/index.html
@@ -1,4 +1,4 @@
-iroh::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh nodes.
+iroh::endpoint - Rust Expand description
The Endpoint allows establishing connections to other iroh nodes.
The Endpoint is the main API interface to manage a local iroh node. It allows
connecting to and accepting connections from other nodes. See the module docs for
more details on how iroh connections work.
diff --git a/pr/3465/docs/iroh/endpoint/struct.Accept.html b/pr/3465/docs/iroh/endpoint/struct.Accept.html
index 9759984190..9d022982b7 100644
--- a/pr/3465/docs/iroh/endpoint/struct.Accept.html
+++ b/pr/3465/docs/iroh/endpoint/struct.Accept.html
@@ -1,6 +1,6 @@
-Accept in iroh::endpoint - Rust 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 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
diff --git a/pr/3465/docs/iroh/endpoint/struct.Builder.html b/pr/3465/docs/iroh/endpoint/struct.Builder.html
index 8f35264f35..4420d4b47a 100644
--- a/pr/3465/docs/iroh/endpoint/struct.Builder.html
+++ b/pr/3465/docs/iroh/endpoint/struct.Builder.html
@@ -1,24 +1,24 @@
-Builder in iroh::endpoint - Rust pub struct Builder { /* private fields */ }
Expand description
Builder for Endpoint.
+Builder in iroh::endpoint - Rust 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 NodeId.
To create the Endpoint call Builder::bind.
-Implementations§
Source§impl Builder
Sourcepub fn bind_addr_v4(self, addr: SocketAddrV4) -> Self
Sets the IPv4 bind address.
+Implementations§
Source§impl Builder
Sourcepub fn bind_addr_v4(self, addr: SocketAddrV4) -> Self
Sets the IPv4 bind address.
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.
By default will use 0.0.0.0:0 to bind to.
-Sourcepub fn bind_addr_v6(self, addr: SocketAddrV6) -> Self
Sets the IPv6 bind address.
+Sourcepub fn bind_addr_v6(self, addr: SocketAddrV6) -> Self
Sets the IPv6 bind address.
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.
By default will use [::]:0 to bind to.
-Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
Sets a secret key to authenticate with other peers.
+Sourcepub fn secret_key(self, secret_key: SecretKey) -> Self
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 node.
They also perform various functions related to hole punching, see the crate docs
for more details.
@@ -26,15 +26,15 @@ for more details.
When using RelayMode::Custom, the provided relay_map must contain at least one
configured relay node. 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 discovery(self, discovery: impl IntoDiscovery) -> Self
Optionally sets a discovery mechanism for this endpoint.
+Sourcepub fn clear_discovery(self) -> Self
Removes all discovery services from the builder.
+Sourcepub fn discovery(self, discovery: impl IntoDiscovery) -> Self
Optionally sets a discovery mechanism for this endpoint.
If you want to combine multiple discovery services, you can use
Builder::add_discovery instead. This will internally create a
crate::discovery::ConcurrentDiscovery.
If no discovery service is set, connecting to a node without providing its
direct addresses or relay URLs will fail.
See the documentation of the crate::discovery::Discovery trait for details.
-Sourcepub fn add_discovery(self, discovery: impl IntoDiscovery) -> Self
Adds a discovery mechanism for this endpoint.
+Sourcepub fn add_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
@@ -45,7 +45,7 @@ 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 discovery_n0(self) -> Self
Configures the endpoint to use the default n0 DNS discovery service.
+Sourcepub fn discovery_n0(self) -> Self
Configures the endpoint to use the default n0 DNS discovery service.
The default discovery service publishes to and resolves from the
n0.computer dns server iroh.link.
This is equivalent to adding both a crate::discovery::pkarr::PkarrPublisher
@@ -54,23 +54,23 @@ n0.computer dns server.
This will by default use N0_DNS_PKARR_RELAY_PROD.
When in tests, or when the test-utils feature is enabled, this will use the
N0_DNS_PKARR_RELAY_STAGING.
-Sourcepub fn discovery_dht(self) -> Self
Available on crate feature discovery-pkarr-dht only.
Configures the endpoint to also use the mainline DHT with default settings.
+Sourcepub fn discovery_dht(self) -> Self
Available on crate feature discovery-pkarr-dht only.
Configures the endpoint to also use the mainline DHT with default settings.
This is equivalent to adding a crate::discovery::pkarr::dht::DhtDiscovery
with default settings. Note that DhtDiscovery has various more advanced
configuration options. If you need any of those, you should manually
create a DhtDiscovery and add it with Builder::add_discovery.
-Sourcepub fn discovery_local_network(self) -> Self
Available on crate feature discovery-local-network only.
Configures the endpoint to also use local network discovery.
+Sourcepub fn discovery_local_network(self) -> Self
Available on crate feature discovery-local-network only.
Configures the endpoint to also use local network discovery.
This is equivalent to adding a crate::discovery::mdns::MdnsDiscovery
with default settings. Note that MdnsDiscovery has various more advanced
configuration options. If you need any of those, you should manually
create a MdnsDiscovery and add it with Builder::add_discovery.
-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 node’s addresses and relay URL. When other nodes discover this node,
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
@@ -78,35 +78,35 @@ 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 node 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 feature 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 feature test-utils only.
Skip verification of SSL certificates from relay servers
May only be used in tests.
-Sourcepub fn path_selection(self, path_selection: PathSelection) -> Self
Available on crate feature test-utils only.
This implies we only use the relay to communicate
+
Sourcepub fn path_selection(self, path_selection: PathSelection) -> Self
Available on crate feature test-utils only.
This implies we only use the relay to communicate
and do not attempt to do any hole punching.
-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§
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/3465/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3465/docs/iroh/endpoint/struct.ConnectOptions.html
index b401f87cbc..1e450aa106 100644
--- a/pr/3465/docs/iroh/endpoint/struct.ConnectOptions.html
+++ b/pr/3465/docs/iroh/endpoint/struct.ConnectOptions.html
@@ -1,12 +1,12 @@
-ConnectOptions in iroh::endpoint - Rust 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 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 copy 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 copy 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/3465/docs/iroh/endpoint/struct.Connecting.html b/pr/3465/docs/iroh/endpoint/struct.Connecting.html
index 46a849630b..500af2d42a 100644
--- a/pr/3465/docs/iroh/endpoint/struct.Connecting.html
+++ b/pr/3465/docs/iroh/endpoint/struct.Connecting.html
@@ -1,5 +1,5 @@
-Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
-Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
+
Connecting in iroh::endpoint - Rust pub struct Connecting { /* private fields */ }
Expand description
In-progress connection attempt future
+Implementations§
Source§impl Connecting
Sourcepub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>
Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened
security.
Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
If so, the returned Connection can be used to send application data without waiting for
@@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used
data for which client authentication is being used.
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.
-Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
-Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
+Sourcepub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>
Parameters negotiated during the handshake
+
Trait Implementations§
Source§impl Debug for Connecting
Source§impl Future for Connecting
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for Connectingwhere
PinnedFieldsOf<__Connecting<'pin>>: Unpin,
Auto Trait Implementations§
§impl Freeze for Connecting
§impl !RefUnwindSafe for Connecting
§impl Send for Connecting
§impl Sync for Connecting
§impl !UnwindSafe for Connecting
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/3465/docs/iroh/endpoint/struct.Connection.html b/pr/3465/docs/iroh/endpoint/struct.Connection.html
index 77e76f1cba..bef94026ad 100644
--- a/pr/3465/docs/iroh/endpoint/struct.Connection.html
+++ b/pr/3465/docs/iroh/endpoint/struct.Connection.html
@@ -1,4 +1,4 @@
-Connection in iroh::endpoint - Rust pub struct Connection { /* private fields */ }
Expand description
A QUIC connection.
+Connection in iroh::endpoint - Rust pub struct Connection { /* 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 Connection
Implementations§
Source§impl Connection
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,41 +51,41 @@ 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 alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
-Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Cryptographic identity of the peer.
+Sourcepub fn alpn(&self) -> Option<Vec<u8>>
Extracts the ALPN protocol from the peer’s handshake data.
+Sourcepub fn peer_identity(&self) -> Option<Box<dyn Any>>
Sourcepub fn remote_node_id(&self) -> Result<NodeId, RemoteNodeIdError>
Returns the NodeId from the peer’s TLS certificate.
+Sourcepub fn remote_node_id(&self) -> Result<NodeId, RemoteNodeIdError>
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],
@@ -96,14 +96,14 @@ 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.
-Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy 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 Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
Blanket Implementations§
Trait Implementations§
Source§impl Clone for Connection
Source§fn clone(&self) -> Connection
Returns a copy 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 Connection
§impl RefUnwindSafe for Connection
§impl Send for Connection
§impl Sync for Connection
§impl Unpin for Connection
§impl UnwindSafe for Connection
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/3465/docs/iroh/endpoint/struct.Endpoint.html b/pr/3465/docs/iroh/endpoint/struct.Endpoint.html
index 83f41ce7ec..5723d10256 100644
--- a/pr/3465/docs/iroh/endpoint/struct.Endpoint.html
+++ b/pr/3465/docs/iroh/endpoint/struct.Endpoint.html
@@ -1,4 +1,4 @@
-Endpoint in iroh::endpoint - Rust pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh node, establishing connections with other nodes.
+Endpoint in iroh::endpoint - Rust pub struct Endpoint { /* private fields */ }
Expand description
Controls an iroh node, establishing connections with other nodes.
This is the main API interface to create connections to, and accept connections from
other iroh nodes. 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,11 +16,11 @@ 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 async fn connect(
&self,
node_addr: impl Into<NodeAddr>,
alpn: &[u8],
@@ -40,7 +40,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,
node_addr: impl Into<NodeAddr>,
alpn: &[u8],
@@ -60,19 +60,51 @@ 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 add_node_addr_with_source(
+ &self,
+ node_addr: NodeAddr,
+ source: &'static str,
+) -> Result<(), AddNodeAddrError>
Informs this Endpoint about addresses of the iroh node, noting the source.
+This updates the local state for the remote node. If the provided NodeAddr contains a
+RelayUrl this will be used as the new relay server for this node. If it contains any
+new IP endpoints they will also be stored and tried when next connecting to this node. Any
+address that matches this node’s direct addresses will be silently ignored. The source is
+used for logging exclusively and will not be stored.
+§Using node discovery instead
+It is strongly advised to use node discovery using the StaticProvider instead.
+This provides more flexibility and future proofing.
+§Errors
+Will return an error if we attempt to add our own NodeId to the node map or
+if the direct addresses are a subset of ours.
+Sourcepub fn secret_key(&self) -> &SecretKey
Returns the secret_key of this endpoint.
+Sourcepub fn node_id(&self) -> NodeId
Returns the node id of this endpoint.
This ID is the unique addressing information of this node and other peers must know
it to be able to connect to this node.
-Sourcepub fn node_addr(&self) -> impl Watcher<Value = Option<NodeAddr>> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current NodeAddr for this endpoint.
-The observed NodeAddr will have the current RelayUrl and direct addresses
-as they would be returned by Endpoint::home_relay and Endpoint::direct_addresses.
+Sourcepub fn node_addr(&self) -> NodeAddr
Returns the current NodeAddr.
+If this is called right after the Endpoint has been created, there is
+a good chance these fields will be empty.
+Use the Endpoint::online method to ensure that the endpoint is considered
+“online” (has contacted a relay server and has at least one local addresses)
+before calling this method, if you want to ensure that the NodeAddr will
+contain enough information to allow this endpoint to be dialable by
+a remote endpoint.
+Or, use the Endpoint::watch_node_addr method to get updates when the
+NodeAddr changes.
+The NodeAddr will change as:
+
+- network conditions change
+- the endpoint connects to a relay server
+- the endpoint changes its preferred relay server
+- more addresses are discovered for this endpoint
+
+Sourcepub fn watch_node_addr(&self) -> impl Watcher<Value = Option<NodeAddr>> + use<>
Available on non-wasm_browser only.
Returns a Watcher for the current NodeAddr for this endpoint.
+The observed NodeAddr will have the current RelayUrl and direct addresses.
Use Watcher::initialized to wait for a NodeAddr that is ready to be connected to:
use iroh::{Endpoint, Watcher};
@@ -81,48 +113,27 @@ as they would be returned by vec![b"my-alpn".to_vec()])
.bind()
.await?;
-let node_addr = endpoint.node_addr().initialized().await;
-Sourcepub fn home_relay(&self) -> impl Watcher<Value = Vec<RelayUrl>> + use<>
Returns a Watcher for the RelayUrl of the Relay server used as home relay.
-Every endpoint has a home Relay server which it chooses as the server with the
-lowest latency out of the configured servers provided by Builder::relay_mode.
-This is the server other iroh nodes can use to reliably establish a connection
-to this node.
-The watcher stores None if we are not connected to any Relay server.
-Note that this will store None right after the Endpoint is created since it takes
-some time to connect to find and connect to the home relay server.
-§Examples
-To wait for a home relay connection to be established, use Watcher::initialized:
-
-use iroh::{Endpoint, Watcher};
-
-let mep = Endpoint::builder().bind().await.unwrap();
-let _relay_url = mep.home_relay().initialized().await;
-Sourcepub fn direct_addresses(&self) -> Direct<Option<BTreeSet<DirectAddr>>>
Returns a Watcher for the direct addresses of this Endpoint.
-The direct addresses of the Endpoint are those that could be used by other
-iroh nodes to establish direct connectivity, depending on the network
-situation. The yielded lists of direct addresses contain both the locally-bound
-addresses and the Endpoint’s publicly reachable addresses discovered through
-mechanisms such as QAD and port mapping. Hence usually only a subset of these
-will be applicable to a certain remote iroh node.
-The Endpoint continuously monitors the direct addresses for changes as its own
-location in the network might change. Whenever changes are detected this stream
-will yield a new list of direct addresses.
-When issuing the first call to this method the first direct address discovery might
-still be underway, in this case the Watcher might not be initialized with Some
-value yet. Once the first set of local direct addresses are discovered the Watcher
-will always return Some set of direct addresses immediately, which are the most
-recently discovered direct addresses.
-§Examples
-To get the first set of direct addresses use Watcher::initialized:
-
-use iroh::{Endpoint, Watcher as _};
-
-let ep = Endpoint::builder().bind().await.unwrap();
-let _addrs = ep.direct_addresses().initialized().await;
-Sourcepub fn bound_sockets(&self) -> Vec<SocketAddr>
Returns the local socket addresses on which the underlying sockets are bound.
+let node_addr = endpoint.watch_node_addr().initialized().await;
+The Endpoint::online method can be used as a convenience method to
+understand if the endpoint has ever been considered “online”. But after
+that initial call to Endpoint::online, to understand if your
+endpoint is no longer able to be connected to by endpoints outside
+of the private or local network, watch for changes in it’s NodeAddr.
+If the relay_url is None or if there are no direct_addresses in
+the NodeAddr, you may not be dialable by other endpoints on the internet.
+Sourcepub async fn online(&self)
Available on non-wasm_browser only.
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.
+Once this has been resolved once, this will always immediately resolve.
+This has no timeout, so if that is needed, you need to wrap it in a timeout.
+To understand if the endpoint has gone back “offline”,
+you must use the Endpoint::watch_node_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.
The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6
address if available.
-Sourcepub fn conn_type(&self, node_id: NodeId) -> Option<Direct<ConnectionType>>
Returns a Watcher that reports the current connection type and any changes for
+
Sourcepub fn conn_type(&self, node_id: NodeId) -> Option<Direct<ConnectionType>>
Returns a Watcher that reports the current connection type and any changes for
given remote node.
This watcher allows observing a stream of ConnectionType items by calling
Watcher::stream(). If the underlying connection to a remote node changes, it will
@@ -140,13 +151,13 @@ or Sourcepub fn latency(&self, node_id: NodeId) -> Option<Duration>
Returns the currently lowest latency for this node.
+Sourcepub fn latency(&self, node_id: NodeId) -> Option<Duration>
Returns the currently lowest latency for this node.
Will return None if we do not have any address information for the given node_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:
@@ -217,7 +228,7 @@ registry.write().unwrap().register_all(endpoint.metrics());
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.
+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
@@ -225,12 +236,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 node.
+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 node.
If the user-defined data passed to this function is different to the previous one,
the endpoint will republish its node 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.
@@ -256,8 +267,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/3465/docs/iroh/endpoint/struct.Incoming.html b/pr/3465/docs/iroh/endpoint/struct.Incoming.html
index d8ceb76251..e650e2c186 100644
--- a/pr/3465/docs/iroh/endpoint/struct.Incoming.html
+++ b/pr/3465/docs/iroh/endpoint/struct.Incoming.html
@@ -1,29 +1,29 @@
-Incoming in iroh::endpoint - Rust 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 pub struct Incoming { /* private fields */ }
Expand description
An incoming connection for which the server has not yet begun its parts of the
handshake.
-Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
+Implementations§
Source§impl Incoming
Sourcepub fn accept(self) -> Result<Connecting, ConnectionError>
Attempts to accept this incoming connection (an error may still occur).
Errors occurring here are likely not caused by the application or remote. The QUIC
connection listens on a normal UDP socket and any reachable network endpoint can
send datagrams to it, solicited or not. Even if the first few bytes look like a
QUIC packet, it might not even be a QUIC packet that is being received.
Thus it is common to simply log the errors here and accept them as something which
can happen.
-Sourcepub fn accept_with(
+
Sourcepub fn accept_with(
self,
server_config: Arc<ServerConfig>,
) -> Result<Connecting, ConnectionError>
Accepts this incoming connection using a custom configuration.
See accept() for more details.
-Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
+Sourcepub fn retry(self) -> Result<(), RetryError>
Responds with a retry packet.
This requires the client to retry with address validation.
Errors if remote_address_validated() is true.
-Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
-Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
+
Sourcepub fn ignore(self)
Ignores this incoming connection attempt, not sending any packet in response.
+Sourcepub fn local_ip(&self) -> Option<IpAddr>
Returns the local IP address which was used when the peer established the
connection.
-Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
-Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
+Sourcepub fn remote_address(&self) -> SocketAddr
Returns the peer’s UDP address.
+Sourcepub fn remote_address_validated(&self) -> bool
Whether the socket address that is initiating this connection has been validated.
This means that the sender of the initial packet has proved that they can receive
traffic sent to self.remote_address().
-Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
Blanket Implementations§
Trait Implementations§
Source§impl IntoFuture for Incoming
Source§type Output = Result<Connection, ConnectionError>
The output that the future will produce on completion.Source§type IntoFuture = IncomingFuture
Which kind of future are we turning this into?Source§fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read moreAuto Trait Implementations§
§impl !Freeze for Incoming
§impl !RefUnwindSafe for Incoming
§impl Send for Incoming
§impl Sync for Incoming
§impl Unpin for Incoming
§impl !UnwindSafe for Incoming
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/3465/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3465/docs/iroh/endpoint/struct.IncomingFuture.html
index db6843f20d..b67804fa2a 100644
--- a/pr/3465/docs/iroh/endpoint/struct.IncomingFuture.html
+++ b/pr/3465/docs/iroh/endpoint/struct.IncomingFuture.html
@@ -1,6 +1,6 @@
-IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
-Trait Implementations§
Source§impl Debug for IncomingFuture
Source§impl Future for IncomingFuture
Source§type Output = Result<Connection, ConnectionError>
The type of value produced on completion.Source§impl<'pin> Unpin for IncomingFuturewhere
+IncomingFuture in iroh::endpoint - Rust pub struct IncomingFuture { /* private fields */ }
Expand description
Adaptor to let Incoming be awaited like a Connecting.
+Trait Implementations§
Source§impl Debug for IncomingFuture