From 078dfd87566fea620301efdf2d683384a60937ed Mon Sep 17 00:00:00 2001 From: ramfox Date: Thu, 8 Aug 2024 19:43:57 +0000 Subject: [PATCH] deploy: 0713b6aa4eccc8dbaba608671401fd05ebbf8728 --- .../downloader/struct.DownloadRequest.html | 2 +- .../downloader/struct.Downloader.html | 2 +- .../iroh_blobs/downloader/trait.Dialer.html | 16 ++++---- pr/2605/docs/iroh_blobs/enum.BlobFormat.html | 22 +++++----- .../export/enum.ExportProgress.html | 4 +- .../get/db/enum.DownloadProgress.html | 4 +- .../iroh_blobs/provider/enum.AddProgress.html | 4 +- .../store/enum.ConsistencyCheckProgress.html | 4 +- .../store/enum.ValidateProgress.html | 4 +- pr/2605/docs/iroh_blobs/struct.Hash.html | 34 ++++++++-------- .../docs/iroh_blobs/struct.HashAndFormat.html | 28 ++++++------- .../iroh_gossip/metrics/struct.Metrics.html | 40 +++++++++---------- .../discovery/local_swarm_discovery.rs.html | 20 +++++----- .../iroh_metrics/core/trait.Metric.js | 2 +- 14 files changed, 93 insertions(+), 93 deletions(-) diff --git a/pr/2605/docs/iroh_blobs/downloader/struct.DownloadRequest.html b/pr/2605/docs/iroh_blobs/downloader/struct.DownloadRequest.html index b1c1915713..8b5e715e84 100644 --- a/pr/2605/docs/iroh_blobs/downloader/struct.DownloadRequest.html +++ b/pr/2605/docs/iroh_blobs/downloader/struct.DownloadRequest.html @@ -1,7 +1,7 @@ DownloadRequest in iroh_blobs::downloader - Rust

Struct iroh_blobs::downloader::DownloadRequest

source ·
pub struct DownloadRequest { /* private fields */ }
Expand description

A download request.

Implementations§

source§

impl DownloadRequest

source

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.

source

pub async fn queue(&self, request: DownloadRequest) -> DownloadHandle ⓘ

Queue a download.

source

pub async fn cancel(&self, handle: DownloadHandle)

Cancel a download.

-
source

pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)

Declare that certains nodes can be used to download a hash.

+
source

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

source§

fn clone(&self) -> Downloader

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Downloader

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where 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§

source

type Connection: Clone + 'static

Type of connections returned by the Dialer.

-

Required Methods§

source

fn queue_dial(&mut self, node_id: NodeId)

Dial a node.

+

Required Methods§

source

fn queue_dial(&mut self, node_id: NodeId)

Dial a node.

source

fn pending_count(&self) -> usize

Get the number of dialing nodes.

-
source

fn is_pending(&self, node: NodeId) -> bool

Check if a node is being dialed.

-
source

fn node_id(&self) -> NodeId

Get the node id of our node.

-

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 +

source

fn is_pending(&self, node: NodeId) -> bool

Check if a node is being dialed.

+
source

fn node_id(&self) -> NodeId

Get the node id of our node.

+

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 diff --git a/pr/2605/docs/iroh_blobs/enum.BlobFormat.html b/pr/2605/docs/iroh_blobs/enum.BlobFormat.html index c3efc176d4..6c73cb94bb 100644 --- a/pr/2605/docs/iroh_blobs/enum.BlobFormat.html +++ b/pr/2605/docs/iroh_blobs/enum.BlobFormat.html @@ -1,30 +1,30 @@ -BlobFormat in iroh_blobs - Rust

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§

§

Raw

Raw blob

§

HashSeq

A sequence of BLAKE3 hashes

-

Implementations§

§

impl BlobFormat

pub const fn is_raw(&self) -> bool

Is raw format

-

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 more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for BlobFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

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

source

pub const fn is_raw(&self) -> bool

Is raw format

+
source

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

+

Trait Implementations§

source§

impl Clone for BlobFormat

source§

fn clone(&self) -> BlobFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlobFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for BlobFormat

source§

fn default() -> BlobFormat

Returns the “default value” for a type. Read more
source§

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

§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Hash for BlobFormat

§

fn hash<__H>(&self, state: &mut __H)
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for BlobFormat

source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Hash for BlobFormat

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

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

§

fn cmp(&self, other: &BlobFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
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

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for BlobFormat

§

fn eq(&self, other: &BlobFormat) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,
Restrict a value to a certain interval. Read more
source§

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 ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for BlobFormat

§

fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
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 <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for BlobFormat

source§

fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
§

impl Serialize for BlobFormat

§

fn serialize<__S>( +operator. Read more

source§

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§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for BlobFormat

source§

impl Eq for BlobFormat

source§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where 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

Fields

§id: u64

Unique id of the entry that is being exported.

§

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

source§

fn clone(&self) -> ExportProgress

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExportProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ExportProgress

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ExportProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where 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.

Fields

§id: u64

The unique id of the entry.

§

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 more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DownloadProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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 more
source§

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

§id: u64

A new unique id for this entry.

@@ -33,7 +33,7 @@

Fields

§hash: Hash

The hash of the created data.

§format: BlobFormat

The format of the added data.

§tag: Tag

The tag of the added data.

-
§

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 Debug for AddProgress

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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 more
source§

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§

§

Start

Consistency check started

§

Update

Consistency check update

@@ -14,7 +14,7 @@
§entry: Option<Hash>

The entry this message is about, if any

§level: ReportLevel

The 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§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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 more
source§

impl Serialize for ConsistencyCheckProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where 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: u64

The total number of entries to validate

@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.

Fields

§id: u64

The unique id of the entry.

§ranges: RangeSpec

Available ranges.

§

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§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
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 more
source§

impl Serialize for ValidateProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where 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 EMPTY: Hash = _

The hash for the empty byte range (b"").

-

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

-

pub fn as_bytes(&self) -> &[u8; 32]

Bytes of the hash.

-

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

-

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

-

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§

source§

impl Hash

source

pub const EMPTY: Hash = _

The hash for the empty byte range (b"").

+
source

pub fn new(buf: impl AsRef<[u8]>) -> Hash

Calculate the hash of the provided bytes.

+
source

pub fn as_bytes(&self) -> &[u8; 32]

Bytes of the hash.

+
source

pub const fn from_bytes(bytes: [u8; 32]) -> Hash

Create a Hash from its raw bytes representation.

+
source

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

+
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string representation of the hash.

-

Trait Implementations§

§

impl AsRef<[u8]> for Hash

§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
§

impl Borrow<[u8]> for Hash

§

fn borrow(&self) -> &[u8] ⓘ

Immutably borrows from an owned value. Read more
§

impl Borrow<[u8; 32]> for Hash

§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
§

impl Clone for Hash

§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Hash

§

fn deserialize<D>( +

Trait Implementations§

source§

impl AsRef<[u8]> for Hash

source§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<[u8]> for Hash

source§

fn borrow(&self) -> &[u8] ⓘ

Immutably borrows from an owned value. Read more
source§

impl Borrow<[u8; 32]> for Hash

source§

fn borrow(&self) -> &[u8; 32]

Immutably borrows from an owned value. Read more
source§

impl Clone for Hash

source§

fn clone(&self) -> Hash

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Hash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
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 more
§

impl Display for Hash

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl From<&[u8; 32]> for Hash

§

fn from(value: &[u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<[u8; 32]> for Hash

§

fn from(value: [u8; 32]) -> Hash

Converts to this type from the input type.
§

impl From<Hash> for [u8; 32]

§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromIterator<Hash> for HashSeq

source§

fn from_iter<T: IntoIterator<Item = Hash>>(iter: T) -> Self

Creates a value from an iterator. Read more
§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for Hash

§

fn hash<__H>(&self, state: &mut __H)
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Hash

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&[u8; 32]> for Hash

source§

fn from(value: &[u8; 32]) -> Hash

Converts to this type from the input type.
source§

impl From<[u8; 32]> for Hash

source§

fn from(value: [u8; 32]) -> Hash

Converts to this type from the input type.
source§

impl From<Hash> for [u8; 32]

source§

fn from(value: Hash) -> [u8; 32]

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromIterator<Hash> for HashSeq

source§

fn from_iter<T: IntoIterator<Item = Hash>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Hash, <Hash as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for Hash

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Key for Hash

§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
§

impl MaxSize for Hash

§

const POSTCARD_MAX_SIZE: usize = 32usize

The maximum possible size that the serialization of this -type can have, in bytes.
§

impl Ord for Hash

§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Key for Hash

source§

fn compare(data1: &[u8], data2: &[u8]) -> Ordering

Compare data1 with data2
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§

fn cmp(&self, other: &Hash) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Hash

§

fn eq(&self, other: &Hash) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more

source§

impl PartialEq for Hash

source§

fn eq(&self, other: &Hash) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Hash

§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
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 <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Hash

source§

fn partial_cmp(&self, other: &Hash) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
§

impl Serialize for Hash

§

fn serialize<S>( +operator. Read more

source§

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 more
source§

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
source§

fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>
where Hash: 'a,

Deserializes data -Implementations may return a view over data, or an owned type
§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

source§

fn as_bytes<'a, 'b>( value: &'a <Hash as Value>::SelfType<'b> ) -> <Hash as Value>::AsBytes<'a>
where 'b: 'a, - Hash: 'a + 'b,

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type

§

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<T> Any for T
where + Hash: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
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§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<A, T> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

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: Hash

The hash

§format: BlobFormat

The 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 more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for HashAndFormat

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for HashAndFormat

§

fn deserialize<D>( +

Implementations§

source§

impl HashAndFormat

source

pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat

Create a new hash and format pair.

+
source

pub fn raw(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the default (raw) format.

+
source

pub 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 more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for HashAndFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
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

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
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

§

type Err = Error

The associated error which can be returned from parsing.
§

fn from_str(s: &str) -> Result<HashAndFormat, <HashAndFormat as FromStr>::Err>

Parses a string s to return a value of this type. Read more
§

impl Hash for HashAndFormat

§

fn hash<__H>(&self, state: &mut __H)
where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for HashAndFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
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

§

type Err = Error

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<HashAndFormat, <HashAndFormat as FromStr>::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for HashAndFormat

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

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

§

fn cmp(&self, other: &HashAndFormat) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
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

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for HashAndFormat

§

fn eq(&self, other: &HashAndFormat) -> bool

This method tests for self and other values to be equal, and is used + Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

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 ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for HashAndFormat

§

fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
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 <= +sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for HashAndFormat

source§

fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= -operator. Read more
§

impl Serialize for HashAndFormat

§

fn serialize<S>( +operator. Read more

source§

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 more
source§

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 width
source§

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 type
§

fn as_bytes<'a, 'b>( +Implementations may return a view over data, or an owned type

source§

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
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for HashAndFormat

§

impl Eq for HashAndFormat

§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + HashAndFormat: 'a + 'b,

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type
source§

impl Copy for HashAndFormat

source§

impl Eq for HashAndFormat

source§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where 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: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a dyn Any)>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
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: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Metrics

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Iterable for Metrics

source§

fn iter<'a>(&'a self) -> IntoIter<(&'static str, &'a dyn Any)>

Returns an iterator over the struct’s fields as tuples. Read more
source§

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

fn new(registry: &mut Registry) -> Self

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where F: FnOnce(&Self) -> T,

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§

Blanket Implementations§

source§

impl<T> Any for T
where +Only records if this metric is registered in the global registry.

§

fn try_get() -> Option<&'static Self>

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where 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