Struct iroh_blobs::downloader::DownloadRequest
source · pub struct DownloadRequest { /* private fields */ }Expand description
A download request.
Implementations§
source§impl DownloadRequest
impl DownloadRequest
sourcepub fn new(
resource: impl Into<DownloadKind>,
- nodes: impl IntoIterator<Item = impl Into<NodeAddr>>
+ nodes: impl IntoIterator<Item = impl Into<NodeAddr>>
) -> Self
pub fn new( resource: impl Into<DownloadKind>, - nodes: impl IntoIterator<Item = impl Into<NodeAddr>> + nodes: impl IntoIterator<Item = impl Into<NodeAddr>> ) -> Self
Create a new download request.
It is the responsibility of the caller to ensure that the data is tagged either with a temp tag or with a persistent tag to make sure the data is not garbage collected during diff --git a/pr/2605/docs/iroh_blobs/downloader/struct.Downloader.html b/pr/2605/docs/iroh_blobs/downloader/struct.Downloader.html index 88d2e7f7c0..1c6762c576 100644 --- a/pr/2605/docs/iroh_blobs/downloader/struct.Downloader.html +++ b/pr/2605/docs/iroh_blobs/downloader/struct.Downloader.html @@ -11,7 +11,7 @@ S: Store,
Create a new Downloader with custom ConcurrencyLimits and RetryConfig.
sourcepub async fn queue(&self, request: DownloadRequest) -> DownloadHandle ⓘ
pub async fn queue(&self, request: DownloadRequest) -> DownloadHandle ⓘ
Queue a download.
sourcepub async fn cancel(&self, handle: DownloadHandle)
pub async fn cancel(&self, handle: DownloadHandle)
Cancel a download.
-sourcepub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
Declare that certains nodes can be used to download a hash.
+sourcepub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
Declare that certains nodes can be used to download a hash.
Note that this does not start a download, but only provides new nodes to already queued
downloads. Use Self::queue to queue a download.
Trait Implementations§
source§impl Clone for Downloader
impl Clone for Downloader
source§fn clone(&self) -> Downloader
fn clone(&self) -> Downloader
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Downloader
impl !RefUnwindSafe for Downloader
impl Send for Downloader
impl Sync for Downloader
impl Unpin for Downloader
impl !UnwindSafe for Downloader
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2605/docs/iroh_blobs/downloader/trait.Dialer.html
index 2dfc99bd33..d23576a87e 100644
--- a/pr/2605/docs/iroh_blobs/downloader/trait.Dialer.html
+++ b/pr/2605/docs/iroh_blobs/downloader/trait.Dialer.html
@@ -1,15 +1,15 @@
-Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+
sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2605/docs/iroh_blobs/downloader/trait.Dialer.html
index 2dfc99bd33..d23576a87e 100644
--- a/pr/2605/docs/iroh_blobs/downloader/trait.Dialer.html
+++ b/pr/2605/docs/iroh_blobs/downloader/trait.Dialer.html
@@ -1,15 +1,15 @@
-Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+
sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+sourcefn is_pending(&self, node: NodeId) -> bool
fn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+source§impl Dialer for Dialer
impl Dialer for Dialer
type Connection = Connection
fn queue_dial(&mut self, node_id: NodeId)
fn pending_count(&self) -> usize
fn is_pending(&self, node: NodeId) -> bool
fn node_id(&self) -> NodeId
Enum iroh_blobs::BlobFormat
pub enum BlobFormat {
+BlobFormat in iroh_blobs - Rust Enum iroh_blobs::BlobFormat
source · pub enum BlobFormat {
Raw,
HashSeq,
}
Expand description
A format identifier
Variants§
Implementations§
§impl BlobFormat
pub const fn is_hash_seq(&self) -> bool
Is hash seq format
-Trait Implementations§
§impl Clone for BlobFormat
§fn clone(&self) -> BlobFormat
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 BlobFormat
§impl Default for BlobFormat
§fn default() -> BlobFormat
Returns the “default value” for a type. Read more§impl<'de> Deserialize<'de> for BlobFormat
§fn deserialize<__D>(
+
Implementations§
source§impl BlobFormat
Trait Implementations§
source§impl Clone for BlobFormat
source§fn clone(&self) -> BlobFormat
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 BlobFormat
source§impl Default for BlobFormat
source§fn default() -> BlobFormat
Returns the “default value” for a type. Read moresource§impl<'de> Deserialize<'de> for BlobFormat
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<BlobFormat, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for BlobFormat
§impl Hash for BlobFormat
§fn hash<__H>(&self, state: &mut __H)where
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for BlobFormat
source§impl Hash for BlobFormat
§impl MaxSize for BlobFormat
§const POSTCARD_MAX_SIZE: usize = 1usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for BlobFormat
source§impl MaxSize for BlobFormat
source§const POSTCARD_MAX_SIZE: usize = 1usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for BlobFormat
source§fn cmp(&self, other: &BlobFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for BlobFormat
§fn eq(&self, other: &BlobFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for BlobFormat
source§fn eq(&self, other: &BlobFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for BlobFormat
§fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>
source§impl PartialOrd for BlobFormat
source§fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for BlobFormat
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
- __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Copy for BlobFormat
§impl Eq for BlobFormat
§impl StructuralPartialEq for BlobFormat
Auto Trait Implementations§
§impl Freeze for BlobFormat
§impl RefUnwindSafe for BlobFormat
§impl Send for BlobFormat
§impl Sync for BlobFormat
§impl Unpin for BlobFormat
§impl UnwindSafe for BlobFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Copy for BlobFormat
source§impl Eq for BlobFormat
source§impl StructuralPartialEq for BlobFormat
Auto Trait Implementations§
impl Freeze for BlobFormat
impl RefUnwindSafe for BlobFormat
impl Send for BlobFormat
impl Sync for BlobFormat
impl Unpin for BlobFormat
impl UnwindSafe for BlobFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2605/docs/iroh_blobs/export/enum.ExportProgress.html
index b7ed98104e..4b75ec988b 100644
--- a/pr/2605/docs/iroh_blobs/export/enum.ExportProgress.html
+++ b/pr/2605/docs/iroh_blobs/export/enum.ExportProgress.html
@@ -14,7 +14,7 @@
id: u64,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress events for an export operation
Variants§
§Found
The download part is done for this id, we are now exporting the data
to the specified out path.
@@ -30,7 +30,7 @@ to the specified out path.
§Done
We finished exporting a blob
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2605/docs/iroh_blobs/export/enum.ExportProgress.html
index b7ed98104e..4b75ec988b 100644
--- a/pr/2605/docs/iroh_blobs/export/enum.ExportProgress.html
+++ b/pr/2605/docs/iroh_blobs/export/enum.ExportProgress.html
@@ -14,7 +14,7 @@
id: u64,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress events for an export operation
Variants§
§Found
The download part is done for this id, we are now exporting the data
to the specified out path.
@@ -30,7 +30,7 @@ to the specified out path.
§Done
We finished exporting a blob
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Expand description
Progress events for an export operation
Variants§
Found
The download part is done for this id, we are now exporting the data to the specified out path.
@@ -30,7 +30,7 @@ to the specified out path.Done
We finished exporting a blob
AllDone
We are done with the whole operation.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Clone for ExportProgress
impl Clone for ExportProgress
source§fn clone(&self) -> ExportProgress
fn clone(&self) -> ExportProgress
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ExportProgress
impl Debug for ExportProgress
source§impl<'de> Deserialize<'de> for ExportProgress
impl<'de> Deserialize<'de> for ExportProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl !Freeze for ExportProgress
impl RefUnwindSafe for ExportProgress
impl Send for ExportProgress
impl Sync for ExportProgress
impl Unpin for ExportProgress
impl UnwindSafe for ExportProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2605/docs/iroh_blobs/get/db/enum.DownloadProgress.html
index 36d0d471ba..ee27dc5703 100644
--- a/pr/2605/docs/iroh_blobs/get/db/enum.DownloadProgress.html
+++ b/pr/2605/docs/iroh_blobs/get/db/enum.DownloadProgress.html
@@ -25,7 +25,7 @@
id: u64,
},
AllDone(Stats),
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the get operation.
Variants§
§InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
§FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.
§AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
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 DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
index 4d8bd0e023..b75f639a3e 100644
--- a/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index a02d787cb8..78120c7523 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
index 75baf8d96b..60a86461ff 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/struct.Hash.html b/pr/2605/docs/iroh_blobs/struct.Hash.html
index c3bab58851..1a1bcaba85 100644
--- a/pr/2605/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2605/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2605/docs/iroh_blobs/get/db/enum.DownloadProgress.html
index 36d0d471ba..ee27dc5703 100644
--- a/pr/2605/docs/iroh_blobs/get/db/enum.DownloadProgress.html
+++ b/pr/2605/docs/iroh_blobs/get/db/enum.DownloadProgress.html
@@ -25,7 +25,7 @@
id: u64,
},
AllDone(Stats),
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the get operation.
Variants§
§InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
§FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.
§AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
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 DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
index 4d8bd0e023..b75f639a3e 100644
--- a/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index a02d787cb8..78120c7523 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
index 75baf8d96b..60a86461ff 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/struct.Hash.html b/pr/2605/docs/iroh_blobs/struct.Hash.html
index c3bab58851..1a1bcaba85 100644
--- a/pr/2605/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2605/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
Expand description
Progress updates for the get operation.
Variants§
InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
fn clone(&self) -> DownloadProgress
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DownloadProgress
impl Debug for DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Serialize for DownloadProgress
impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
index 4d8bd0e023..b75f639a3e 100644
--- a/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index a02d787cb8..78120c7523 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
index 75baf8d96b..60a86461ff 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/struct.Hash.html b/pr/2605/docs/iroh_blobs/struct.Hash.html
index c3bab58851..1a1bcaba85 100644
--- a/pr/2605/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2605/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
index 4d8bd0e023..b75f639a3e 100644
--- a/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2605/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index a02d787cb8..78120c7523 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
index 75baf8d96b..60a86461ff 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/struct.Hash.html b/pr/2605/docs/iroh_blobs/struct.Hash.html
index c3bab58851..1a1bcaba85 100644
--- a/pr/2605/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2605/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
Expand description
Progress updates for the add operation.
Variants§
Found
An item was found with name name, from now on referred to via id
Fields
Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Serialize for AddProgress
impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index a02d787cb8..78120c7523 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index a02d787cb8..78120c7523 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Expand description
Progress updates for the validate operation
Variants§
level: ReportLevelThe level of the message
Done
Consistency check ended
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ConsistencyCheckProgress
impl RefUnwindSafe for ConsistencyCheckProgress
impl Send for ConsistencyCheckProgress
impl Sync for ConsistencyCheckProgress
impl Unpin for ConsistencyCheckProgress
impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
index 75baf8d96b..60a86461ff 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/struct.Hash.html b/pr/2605/docs/iroh_blobs/struct.Hash.html
index c3bab58851..1a1bcaba85 100644
--- a/pr/2605/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2605/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
index 75baf8d96b..60a86461ff 100644
--- a/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2605/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/struct.Hash.html b/pr/2605/docs/iroh_blobs/struct.Hash.html
index c3bab58851..1a1bcaba85 100644
--- a/pr/2605/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2605/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
Expand description
Progress updates for the validate operation
Variants§
Starting
started validating
Fields
total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.AllDone
We are done with the whole operation.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ValidateProgress
impl RefUnwindSafe for ValidateProgress
impl Send for ValidateProgress
impl Sync for ValidateProgress
impl Unpin for ValidateProgress
impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/struct.Hash.html b/pr/2605/docs/iroh_blobs/struct.Hash.html
index c3bab58851..1a1bcaba85 100644
--- a/pr/2605/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2605/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
impl<T> Any for Twhere
diff --git a/pr/2605/docs/iroh_blobs/struct.Hash.html b/pr/2605/docs/iroh_blobs/struct.Hash.html
index c3bab58851..1a1bcaba85 100644
--- a/pr/2605/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2605/docs/iroh_blobs/struct.Hash.html
@@ -1,36 +1,36 @@
-Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
-Implementations§
§impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string
+
Hash in iroh_blobs - Rust Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);
Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for Hash
source§impl PartialEq for Hash
§impl PartialOrd for Hash
source§impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
source§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);Expand description
Hash type used throughout.
-Implementations§
§impl Hash
impl Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
pub fn fmt_short(&self) -> String
pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string +
Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
source§impl FromIterator<Hash> for HashSeq
impl FromIterator<Hash> for HashSeq
§impl Hash for Hash
impl Hash for Hash
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
source§impl FromIterator<Hash> for HashSeq
impl FromIterator<Hash> for HashSeq
§impl MaxSize for Hash
impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
const POSTCARD_MAX_SIZE: usize = 32usize
source§impl MaxSize for Hash
impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
const POSTCARD_MAX_SIZE: usize = 32usize
source§impl Ord for Hash
impl Ord for Hash
source§impl PartialEq for Hash
impl PartialEq for Hash
§impl PartialOrd for Hash
impl PartialOrd for Hash
source§impl PartialOrd for Hash
impl PartialOrd for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Serialize for Hash
impl Serialize for Hash
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
§impl Value for Hash
impl Value for Hash
§type SelfType<'a> = Hash
type SelfType<'a> = Hash
type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
fn fixed_width() -> Option<usize>
§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
source§impl Value for Hash
impl Value for Hash
§type SelfType<'a> = Hash
type SelfType<'a> = Hash
type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
fn fixed_width() -> Option<usize>
impl Copy for Hash
impl Eq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations§
impl Copy for Hash
impl Eq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
index b46be55fd2..4f72a83723 100644
--- a/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2605/docs/iroh_blobs/struct.HashAndFormat.html
@@ -1,37 +1,37 @@
-HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
Struct iroh_blobs::HashAndFormat
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust Struct iroh_blobs::HashAndFormat
source · pub struct HashAndFormat {
pub hash: Hash,
pub format: BlobFormat,
}
Expand description
A hash and format pair
Fields§
§hash: HashThe hash
§format: BlobFormatThe format
-Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
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 HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
+
Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
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 HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
§fn hash<__H>(&self, state: &mut __H)where
+ D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
-type can have, in bytes.§impl Ord for HashAndFormat
source§impl MaxSize for HashAndFormat
source§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.source§impl Ord for HashAndFormat
source§fn cmp(&self, other: &HashAndFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more§impl PartialEq for HashAndFormat
§fn eq(&self, other: &HashAndFormat) -> bool
Restrict a value to a certain interval. Read moresource§impl PartialEq for HashAndFormat
source§fn eq(&self, other: &HashAndFormat) -> bool
This method tests for self and other values to be equal, and is used
by ==.§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
source§impl PartialOrd for HashAndFormat
source§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read moresource§impl Serialize for HashAndFormat
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable width§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ S: Serializer,
Serialize this value into the given Serde serializer. Read moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
HashAndFormat: 'a,
Deserializes data
-Implementations may return a view over data, or an owned typesource§fn as_bytes<'a, 'b>(
value: &'a <HashAndFormat as Value>::SelfType<'b>
) -> <HashAndFormat as Value>::AsBytes<'a>where
'b: 'a,
- HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
impl Freeze for HashAndFormat
impl RefUnwindSafe for HashAndFormat
impl Send for HashAndFormat
impl Sync for HashAndFormat
impl Unpin for HashAndFormat
impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
index 20b2a2b8ce..85ee06c85a 100644
--- a/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
+++ b/pr/2605/docs/iroh_gossip/metrics/struct.Metrics.html
@@ -1,26 +1,26 @@
Metrics in iroh_gossip::metrics - Rust Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}
Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
index ac5b366078..352ef870b0 100644
--- a/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
+++ b/pr/2605/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html
@@ -591,10 +591,10 @@
#[tokio::test]
async fn test_local_swarm_discovery() -> TestResult {
let _guard = iroh_test::logging::setup();
- let (node_id_a, discovery_a) = make_discoverer()?;
- let (_, discovery_b) = make_discoverer()?;
+ let (_, discovery_a) = make_discoverer()?;
+ let (node_id_b, discovery_b) = make_discoverer()?;
- // make addr info for discoverer a
+ // make addr info for discoverer b
let addr_info = AddrInfo {
relay_url: None,
direct_addresses: BTreeSet::from(["0.0.0.0:11111".parse()?]),
@@ -603,15 +603,15 @@
// pass in endpoint, this is never used
let ep = crate::endpoint::Builder::default().bind(0).await?;
// resolve twice to ensure we can create separate streams for the same node_id
- let mut s1 = discovery_b.resolve(ep.clone(), node_id_a).unwrap();
- let mut s2 = discovery_b.resolve(ep, node_id_a).unwrap();
- tracing::debug!(?node_id_a, "Discovering node id a");
- // publish discovery_a's address
- discovery_a.publish(&addr_info);
- let s1_res = tokio::time::timeout(Duration::from_secs(10), s1.next())
+ let mut s1 = discovery_a.resolve(ep.clone(), node_id_b).unwrap();
+ let mut s2 = discovery_a.resolve(ep, node_id_b).unwrap();
+ tracing::debug!(?node_id_b, "Discovering node id b");
+ // publish discovery_b's address
+ discovery_b.publish(&addr_info);
+ let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
.await?
.unwrap()?;
- let s2_res = tokio::time::timeout(Duration::from_secs(10), s2.next())
+ let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
.await?
.unwrap()?;
assert_eq!(s1_res.addr_info, addr_info);
diff --git a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
index ff37a28e34..8902586109 100644
--- a/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
+++ b/pr/2605/docs/trait.impl/iroh_metrics/core/trait.Metric.js
@@ -3,7 +3,7 @@
"iroh_blobs":[["impl Metric for Metrics"]],
"iroh_dns_server":[["impl Metric for Metrics"]],
"iroh_docs":[["impl Metric for Metrics"]],
-"iroh_gossip":[["impl Metric for Metrics"]],
+"iroh_gossip":[["impl Metric for Metrics"]],
"iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]],
"iroh_relay":[["impl Metric for StunMetrics"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
\ No newline at end of file
Struct iroh_gossip::metrics::Metrics
source · pub struct Metrics {Show 18 fields
- pub msgs_ctrl_sent: Counter,
- pub msgs_ctrl_recv: Counter,
- pub msgs_data_sent: Counter,
- pub msgs_data_recv: Counter,
- pub msgs_data_sent_size: Counter,
- pub msgs_data_recv_size: Counter,
- pub msgs_ctrl_sent_size: Counter,
- pub msgs_ctrl_recv_size: Counter,
- pub neighbor_up: Counter,
- pub neighbor_down: Counter,
- pub actor_tick_main: Counter,
- pub actor_tick_rx: Counter,
- pub actor_tick_endpoint: Counter,
- pub actor_tick_dialer: Counter,
- pub actor_tick_dialer_success: Counter,
- pub actor_tick_dialer_failure: Counter,
- pub actor_tick_in_event_rx: Counter,
- pub actor_tick_timers: Counter,
+ pub msgs_ctrl_sent: Counter,
+ pub msgs_ctrl_recv: Counter,
+ pub msgs_data_sent: Counter,
+ pub msgs_data_recv: Counter,
+ pub msgs_data_sent_size: Counter,
+ pub msgs_data_recv_size: Counter,
+ pub msgs_ctrl_sent_size: Counter,
+ pub msgs_ctrl_recv_size: Counter,
+ pub neighbor_up: Counter,
+ pub neighbor_down: Counter,
+ pub actor_tick_main: Counter,
+ pub actor_tick_rx: Counter,
+ pub actor_tick_endpoint: Counter,
+ pub actor_tick_dialer: Counter,
+ pub actor_tick_dialer_success: Counter,
+ pub actor_tick_dialer_failure: Counter,
+ pub actor_tick_in_event_rx: Counter,
+ pub actor_tick_timers: Counter,
}Expand description
Enum of metrics for the module
-Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: CounterTrait Implementations§
source§impl Metric for Metrics
impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
fn with_metric<T, F>(f: F)where
+
Fields§
§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter