diff --git a/pr/2612/docs/iroh_blobs/downloader/struct.DownloadRequest.html b/pr/2612/docs/iroh_blobs/downloader/struct.DownloadRequest.html index b1c1915713..8b5e715e84 100644 --- a/pr/2612/docs/iroh_blobs/downloader/struct.DownloadRequest.html +++ b/pr/2612/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/2612/docs/iroh_blobs/downloader/struct.Downloader.html b/pr/2612/docs/iroh_blobs/downloader/struct.Downloader.html index 88d2e7f7c0..1c6762c576 100644 --- a/pr/2612/docs/iroh_blobs/downloader/struct.Downloader.html +++ b/pr/2612/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§

§

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 T
where diff --git a/pr/2612/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2612/docs/iroh_blobs/downloader/trait.Dialer.html index 2dfc99bd33..d23576a87e 100644 --- a/pr/2612/docs/iroh_blobs/downloader/trait.Dialer.html +++ b/pr/2612/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/2612/docs/iroh_blobs/enum.BlobFormat.html b/pr/2612/docs/iroh_blobs/enum.BlobFormat.html index c3efc176d4..6c73cb94bb 100644 --- a/pr/2612/docs/iroh_blobs/enum.BlobFormat.html +++ b/pr/2612/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/2612/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2612/docs/iroh_blobs/export/enum.ExportProgress.html index b7ed98104e..4b75ec988b 100644 --- a/pr/2612/docs/iroh_blobs/export/enum.ExportProgress.html +++ b/pr/2612/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/2612/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2612/docs/iroh_blobs/get/db/enum.DownloadProgress.html index 36d0d471ba..ee27dc5703 100644 --- a/pr/2612/docs/iroh_blobs/get/db/enum.DownloadProgress.html +++ b/pr/2612/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/2612/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2612/docs/iroh_blobs/metrics/struct.Metrics.html index b0f6a2bbf7..ed6579be27 100644 --- a/pr/2612/docs/iroh_blobs/metrics/struct.Metrics.html +++ b/pr/2612/docs/iroh_blobs/metrics/struct.Metrics.html @@ -1,20 +1,20 @@ Metrics in iroh_blobs::metrics - Rust

Struct iroh_blobs::metrics::Metrics

source ·
pub struct Metrics {
-    pub download_bytes_total: Counter,
-    pub download_time_total: Counter,
-    pub downloads_success: Counter,
-    pub downloads_error: Counter,
-    pub downloads_notfound: Counter,
-    pub downloader_tick_main: Counter,
-    pub downloader_tick_connection_ready: Counter,
-    pub downloader_tick_message_received: Counter,
-    pub downloader_tick_transfer_completed: Counter,
-    pub downloader_tick_transfer_failed: Counter,
-    pub downloader_tick_retry_node: Counter,
-    pub downloader_tick_goodbye_node: Counter,
+    pub download_bytes_total: Counter,
+    pub download_time_total: Counter,
+    pub downloads_success: Counter,
+    pub downloads_error: Counter,
+    pub downloads_notfound: Counter,
+    pub downloader_tick_main: Counter,
+    pub downloader_tick_connection_ready: Counter,
+    pub downloader_tick_message_received: Counter,
+    pub downloader_tick_transfer_completed: Counter,
+    pub downloader_tick_transfer_failed: Counter,
+    pub downloader_tick_retry_node: Counter,
+    pub downloader_tick_goodbye_node: Counter,
 }
Expand description

Enum of metrics for the module

-

Fields§

§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: 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 +

Fields§

§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: 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 F: FnOnce(&Self) -> T,

Access to this metrics group to record a metric. -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 +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 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/2612/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2612/docs/iroh_blobs/provider/enum.AddProgress.html index 4d8bd0e023..b75f639a3e 100644 --- a/pr/2612/docs/iroh_blobs/provider/enum.AddProgress.html +++ b/pr/2612/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/2612/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2612/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html index a02d787cb8..78120c7523 100644 --- a/pr/2612/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html +++ b/pr/2612/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/2612/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2612/docs/iroh_blobs/store/enum.ValidateProgress.html index 75baf8d96b..60a86461ff 100644 --- a/pr/2612/docs/iroh_blobs/store/enum.ValidateProgress.html +++ b/pr/2612/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/2612/docs/iroh_blobs/struct.Hash.html b/pr/2612/docs/iroh_blobs/struct.Hash.html index c3bab58851..1a1bcaba85 100644 --- a/pr/2612/docs/iroh_blobs/struct.Hash.html +++ b/pr/2612/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/2612/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2612/docs/iroh_blobs/struct.HashAndFormat.html index b46be55fd2..4f72a83723 100644 --- a/pr/2612/docs/iroh_blobs/struct.HashAndFormat.html +++ b/pr/2612/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§

§

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

§

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 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/2612/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2612/docs/iroh_docs/actor/struct.SyncHandle.html index cfd29c2ce8..6c70a0ff39 100644 --- a/pr/2612/docs/iroh_docs/actor/struct.SyncHandle.html +++ b/pr/2612/docs/iroh_docs/actor/struct.SyncHandle.html @@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that namespace: NamespaceId, author: AuthorId, key: Bytes, - hash: Hash, + hash: Hash, len: u64 ) -> Result<()>

source

pub async fn delete_prefix( &self, diff --git a/pr/2612/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2612/docs/iroh_docs/engine/enum.LiveEvent.html index 5b67512912..bb74b62f4d 100644 --- a/pr/2612/docs/iroh_docs/engine/enum.LiveEvent.html +++ b/pr/2612/docs/iroh_docs/engine/enum.LiveEvent.html @@ -3,34 +3,34 @@ entry: Entry, }, InsertRemote { - from: PublicKey, + from: PublicKey, entry: Entry, content_status: ContentStatus, }, ContentReady { - hash: Hash, + hash: Hash, }, PendingContentReady, - NeighborUp(PublicKey), - NeighborDown(PublicKey), + NeighborUp(PublicKey), + NeighborDown(PublicKey), SyncFinished(SyncEvent), }
Expand description

Events informing about actions of the live sync progress.

Variants§

§

InsertLocal

A local insertion.

Fields

§entry: Entry

The inserted entry.

§

InsertRemote

Received a remote insert.

-

Fields

§from: PublicKey

The peer that sent us the entry.

+

Fields

§from: PublicKey

The peer that sent us the entry.

§entry: Entry

The inserted entry.

§content_status: ContentStatus

If the content is available at the local node

§

ContentReady

The content of an entry was downloaded and is now available at the local node

-

Fields

§hash: Hash

The content hash of the newly available entry content

+

Fields

§hash: Hash

The content hash of the newly available entry content

§

PendingContentReady

All pending content is now ready.

This event signals that all queued content downloads from the last sync run have either completed or failed.

It will only be emitted after a Self::SyncFinished event, never before.

Receiving this event does not guarantee that all content in the document is available. If blobs failed to download, this event will still be emitted after all operations completed.

-
§

NeighborUp(PublicKey)

We have a new neighbor in the swarm.

-
§

NeighborDown(PublicKey)

We lost a neighbor in the swarm.

+
§

NeighborUp(PublicKey)

We have a new neighbor in the swarm.

+
§

NeighborDown(PublicKey)

We lost a neighbor in the swarm.

§

SyncFinished(SyncEvent)

A set-reconciliation sync finished.

Trait Implementations§

source§

impl Clone for LiveEvent

source§

fn clone(&self) -> LiveEvent

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 LiveEvent

source§

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

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

impl<'de> Deserialize<'de> for LiveEvent

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 Display for LiveEvent

source§

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

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

impl PartialEq for LiveEvent

source§

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

This method tests for self and other values to be equal, and is used diff --git a/pr/2612/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2612/docs/iroh_docs/engine/fn.entry_to_content_status.html index 459a6719d2..3b39df6428 100644 --- a/pr/2612/docs/iroh_docs/engine/fn.entry_to_content_status.html +++ b/pr/2612/docs/iroh_docs/engine/fn.entry_to_content_status.html @@ -1,2 +1,2 @@ -entry_to_content_status in iroh_docs::engine - Rust

Function iroh_docs::engine::entry_to_content_status

source ·
pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description

Converts an [EntryStatus] into a [‘ContentStatus’].

+entry_to_content_status in iroh_docs::engine - Rust

Function iroh_docs::engine::entry_to_content_status

source ·
pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description

Converts an EntryStatus into a [‘ContentStatus’].

\ No newline at end of file diff --git a/pr/2612/docs/iroh_docs/engine/index.html b/pr/2612/docs/iroh_docs/engine/index.html index 5f78e23386..622ab4b871 100644 --- a/pr/2612/docs/iroh_docs/engine/index.html +++ b/pr/2612/docs/iroh_docs/engine/index.html @@ -1,4 +1,4 @@ iroh_docs::engine - Rust

Module iroh_docs::engine

source ·
Expand description

Handlers and actors to for live syncing replicas.

crate::Replica is also called documents here.

Structs§

  • Persistent default author for a docs engine.
  • The sync engine coordinates actors that manage open documents, set-reconciliation syncs with -peers and a gossip swarm for each syncing document.
  • Event emitted when a sync operation completes

Enums§

Functions§

\ No newline at end of file +peers and a gossip swarm for each syncing document.
  • Event emitted when a sync operation completes
  • Enums§

    Functions§

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_docs/engine/struct.Engine.html b/pr/2612/docs/iroh_docs/engine/struct.Engine.html index 1b88a96726..46cd25179e 100644 --- a/pr/2612/docs/iroh_docs/engine/struct.Engine.html +++ b/pr/2612/docs/iroh_docs/engine/struct.Engine.html @@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.

    Fields§

    §endpoint: Endpoint

    Endpoint used by the engine.

    §sync: SyncHandle

    Handle to the actor thread.

    §default_author: Arc<DefaultAuthor>

    The persistent default author for this engine.

    -

    Implementations§

    source§

    impl Engine

    source

    pub async fn spawn<B: Store>( +

    Implementations§

    source§

    impl Engine

    source

    pub async fn spawn<B: Store>( endpoint: Endpoint, - gossip: Gossip, + gossip: Gossip, replica_store: Store, bao_store: B, - downloader: Downloader, + downloader: Downloader, default_author_storage: DefaultAuthorStorage ) -> Result<Self>

    Start the sync engine.

    This will spawn two tokio tasks for the live sync coordination and gossip actors, and a @@ -21,7 +21,7 @@ thread for the

    source

    pub async fn start_sync( &self, namespace: NamespaceId, - peers: Vec<NodeAddr> + peers: Vec<NodeAddr> ) -> Result<()>

    Start to sync a document.

    If peers is non-empty, it will both do an initial set-reconciliation sync with each peer, and join an iroh-gossip swarm with these peers to receive and broadcast document updates.

    diff --git a/pr/2612/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2612/docs/iroh_docs/engine/struct.SyncEvent.html index 5b713133bd..cce39940b5 100644 --- a/pr/2612/docs/iroh_docs/engine/struct.SyncEvent.html +++ b/pr/2612/docs/iroh_docs/engine/struct.SyncEvent.html @@ -1,11 +1,11 @@ SyncEvent in iroh_docs::engine - Rust

    Struct iroh_docs::engine::SyncEvent

    source ·
    pub struct SyncEvent {
    -    pub peer: PublicKey,
    +    pub peer: PublicKey,
         pub origin: Origin,
         pub finished: SystemTime,
         pub started: SystemTime,
         pub result: Result<SyncDetails, String>,
     }
    Expand description

    Event emitted when a sync operation completes

    -

    Fields§

    §peer: PublicKey

    Peer we synced with

    +

    Fields§

    §peer: PublicKey

    Peer we synced with

    §origin: Origin

    Origin of the sync exchange

    §finished: SystemTime

    Timestamp when the sync started

    §started: SystemTime

    Timestamp when the sync finished

    diff --git a/pr/2612/docs/iroh_docs/index.html b/pr/2612/docs/iroh_docs/index.html index a37d30e2a6..41c792c5e5 100644 --- a/pr/2612/docs/iroh_docs/index.html +++ b/pr/2612/docs/iroh_docs/index.html @@ -1,7 +1,7 @@ iroh_docs - Rust

    Crate iroh_docs

    source ·
    Expand description

    Multi-dimensional key-value documents with an efficient synchronization protocol

    The crate operates on Replicas. A replica contains an unlimited number of Entries. Each entry is identified by a key, its author, and the replica’s -namespace. Its value is the 32-byte BLAKE3 hash +namespace. Its value is the 32-byte BLAKE3 hash of the entry’s content data, the size of this content data, and a timestamp. The content data itself is not stored or transferred through a replica.

    All entries in a replica are signed with two keypairs:

    diff --git a/pr/2612/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2612/docs/iroh_docs/metrics/struct.Metrics.html index 0adab34807..b3db0e4a8f 100644 --- a/pr/2612/docs/iroh_docs/metrics/struct.Metrics.html +++ b/pr/2612/docs/iroh_docs/metrics/struct.Metrics.html @@ -1,27 +1,27 @@ Metrics in iroh_docs::metrics - Rust

    Struct iroh_docs::metrics::Metrics

    source ·
    pub struct Metrics {
    Show 19 fields - pub new_entries_local: Counter, - pub new_entries_remote: Counter, - pub new_entries_local_size: Counter, - pub new_entries_remote_size: Counter, - pub sync_via_connect_success: Counter, - pub sync_via_connect_failure: Counter, - pub sync_via_accept_success: Counter, - pub sync_via_accept_failure: Counter, - pub actor_tick_main: Counter, - pub doc_gossip_tick_main: Counter, - pub doc_gossip_tick_event: Counter, - pub doc_gossip_tick_actor: Counter, - pub doc_gossip_tick_pending_join: Counter, - pub doc_live_tick_main: Counter, - pub doc_live_tick_actor: Counter, - pub doc_live_tick_replica_event: Counter, - pub doc_live_tick_running_sync_connect: Counter, - pub doc_live_tick_running_sync_accept: Counter, - pub doc_live_tick_pending_downloads: Counter, + pub new_entries_local: Counter, + pub new_entries_remote: Counter, + pub new_entries_local_size: Counter, + pub new_entries_remote_size: Counter, + pub sync_via_connect_success: Counter, + pub sync_via_connect_failure: Counter, + pub sync_via_accept_success: Counter, + pub sync_via_accept_failure: Counter, + pub actor_tick_main: Counter, + pub doc_gossip_tick_main: Counter, + pub doc_gossip_tick_event: Counter, + pub doc_gossip_tick_actor: Counter, + pub doc_gossip_tick_pending_join: Counter, + pub doc_live_tick_main: Counter, + pub doc_live_tick_actor: Counter, + pub doc_live_tick_replica_event: Counter, + pub doc_live_tick_running_sync_connect: Counter, + pub doc_live_tick_running_sync_accept: Counter, + pub doc_live_tick_pending_downloads: Counter,
    }
    Expand description

    Metrics for iroh-docs

    -

    Fields§

    §new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: 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 +

    Fields§

    §new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: 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 F: FnOnce(&Self) -> T,

    Access to this metrics group to record a metric. -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 +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 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/2612/docs/iroh_docs/net/enum.AcceptError.html b/pr/2612/docs/iroh_docs/net/enum.AcceptError.html index 25ddfb4593..a4105f098f 100644 --- a/pr/2612/docs/iroh_docs/net/enum.AcceptError.html +++ b/pr/2612/docs/iroh_docs/net/enum.AcceptError.html @@ -3,31 +3,31 @@ error: Error, }, Open { - peer: PublicKey, + peer: PublicKey, error: Error, }, Abort { - peer: PublicKey, + peer: PublicKey, namespace: NamespaceId, reason: AbortReason, }, Sync { - peer: PublicKey, + peer: PublicKey, namespace: Option<NamespaceId>, error: Error, }, Close { - peer: PublicKey, + peer: PublicKey, namespace: Option<NamespaceId>, error: Error, }, }
    Expand description

    Errors that may occur on handling incoming sync connections.

    Variants§

    §

    Connect

    Failed to establish connection

    Fields

    §error: Error
    §

    Open

    Failed to open replica

    -

    Fields

    §peer: PublicKey
    §error: Error
    §

    Abort

    We aborted the sync request.

    -

    Fields

    §peer: PublicKey
    §namespace: NamespaceId
    §

    Sync

    Failed to run sync

    -

    Fields

    §peer: PublicKey
    §namespace: Option<NamespaceId>
    §error: Error
    §

    Close

    Failed to close

    -

    Fields

    §peer: PublicKey
    §namespace: Option<NamespaceId>
    §error: Error

    Implementations§

    source§

    impl AcceptError

    source

    pub fn peer(&self) -> Option<PublicKey>

    Get the peer’s node ID (if available)

    +

    Fields

    §error: Error
    §

    Abort

    We aborted the sync request.

    +

    Fields

    §namespace: NamespaceId
    §

    Sync

    Failed to run sync

    +

    Fields

    §namespace: Option<NamespaceId>
    §error: Error
    §

    Close

    Failed to close

    +

    Fields

    §namespace: Option<NamespaceId>
    §error: Error

    Implementations§

    source§

    impl AcceptError

    source

    pub fn peer(&self) -> Option<PublicKey>

    Get the peer’s node ID (if available)

    source

    pub fn namespace(&self) -> Option<NamespaceId>

    Get the namespace (if available)

    Trait Implementations§

    source§

    impl Debug for AcceptError

    source§

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

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

    impl Display for AcceptError

    source§

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

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

    impl Error for AcceptError

    source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    The lower-level source of this error, if any. Read more
    1.0.0 · source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type based access to context intended for error reports. Read more

    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 diff --git a/pr/2612/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2612/docs/iroh_docs/net/fn.connect_and_sync.html index e4ee4a1d00..055cbf1e3c 100644 --- a/pr/2612/docs/iroh_docs/net/fn.connect_and_sync.html +++ b/pr/2612/docs/iroh_docs/net/fn.connect_and_sync.html @@ -2,6 +2,6 @@ endpoint: &Endpoint, sync: &SyncHandle, namespace: NamespaceId, - peer: NodeAddr + peer: NodeAddr ) -> Result<SyncFinished, ConnectError>
    Expand description

    Connect to a peer and sync a replica

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_docs/net/fn.handle_connection.html b/pr/2612/docs/iroh_docs/net/fn.handle_connection.html index c7e5390970..3dc400f949 100644 --- a/pr/2612/docs/iroh_docs/net/fn.handle_connection.html +++ b/pr/2612/docs/iroh_docs/net/fn.handle_connection.html @@ -3,6 +3,6 @@ connecting: Connecting, accept_cb: F ) -> Result<SyncFinished, AcceptError>
    where - F: Fn(NamespaceId, PublicKey) -> Fut, + F: Fn(NamespaceId, PublicKey) -> Fut, Fut: Future<Output = AcceptOutcome>,
    Expand description

    Handle an iroh-docs connection and sync all shared documents in the replica store.

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2612/docs/iroh_docs/net/struct.SyncFinished.html index 94c5865cd7..761d1cdb9f 100644 --- a/pr/2612/docs/iroh_docs/net/struct.SyncFinished.html +++ b/pr/2612/docs/iroh_docs/net/struct.SyncFinished.html @@ -1,11 +1,11 @@ SyncFinished in iroh_docs::net - Rust

    Struct iroh_docs::net::SyncFinished

    source ·
    pub struct SyncFinished {
         pub namespace: NamespaceId,
    -    pub peer: PublicKey,
    +    pub peer: PublicKey,
         pub outcome: SyncOutcome,
         pub timings: Timings,
     }
    Expand description

    Details of a finished sync operation.

    Fields§

    §namespace: NamespaceId

    The namespace that was synced.

    -
    §peer: PublicKey

    The peer we syned with.

    +
    §peer: PublicKey

    The peer we syned with.

    §outcome: SyncOutcome

    The outcome of the sync operation

    §timings: Timings

    The time this operation took

    Trait Implementations§

    source§

    impl Clone for SyncFinished

    source§

    fn clone(&self) -> SyncFinished

    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 SyncFinished

    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/2612/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2612/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html index 8bebf68ec6..df1fc8865f 100644 --- a/pr/2612/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html +++ b/pr/2612/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html @@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.

    Implementations§

    source§

    impl ContentHashesIterator

    source

    pub fn all( table: &ReadOnlyTable<(&'static [u8; 32], &'static [u8; 32], &'static [u8]), (u64, &'static [u8; 64], &'static [u8; 64], u64, &'static [u8; 32])> ) -> Result<Self>

    Create a new iterator over all content hashes.

    -

    Trait Implementations§

    source§

    impl Debug for ContentHashesIterator

    source§

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

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

    impl Iterator for ContentHashesIterator

    §

    type Item = Result<Hash, Error>

    The type of the elements being iterated over.
    source§

    fn next(&mut self) -> Option<Self::Item>

    Advances the iterator and returns the next value. Read more
    source§

    fn next_chunk<const N: usize>( +

    Trait Implementations§

    source§

    impl Debug for ContentHashesIterator

    source§

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

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

    impl Iterator for ContentHashesIterator

    §

    type Item = Result<Hash, Error>

    The type of the elements being iterated over.
    source§

    fn next(&mut self) -> Option<Self::Item>

    Advances the iterator and returns the next value. Read more
    source§

    fn next_chunk<const N: usize>( &mut self ) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
    where Self: Sized,

    🔬This is a nightly-only experimental API. (iter_next_chunk)
    Advances the iterator and returns an array containing the next N values. Read more
    1.0.0 · source§

    fn size_hint(&self) -> (usize, Option<usize>)

    Returns the bounds on the remaining length of the iterator. Read more
    1.0.0 · source§

    fn count(self) -> usize
    where diff --git a/pr/2612/docs/iroh_docs/struct.AuthorId.html b/pr/2612/docs/iroh_docs/struct.AuthorId.html index ea34d595da..41e3b7d0a5 100644 --- a/pr/2612/docs/iroh_docs/struct.AuthorId.html +++ b/pr/2612/docs/iroh_docs/struct.AuthorId.html @@ -156,6 +156,6 @@ letters are used (e.g. F9B4CA)

    Into<Dispatch>,
    Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
    source§

    fn with_current_subscriber(self) -> WithDispatch<Self>

    Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
    source§

    impl<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> PeerIdentity for T
    where + T: for<'de> Deserialize<'de>,

    source§

    impl<T> PeerIdentity for T

    source§

    impl<T> RuleType for T
    where T: Copy + Debug + Eq + Hash + Ord,

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_docs/struct.AuthorPublicKey.html b/pr/2612/docs/iroh_docs/struct.AuthorPublicKey.html index 223f3b3f5d..4cfbe555fd 100644 --- a/pr/2612/docs/iroh_docs/struct.AuthorPublicKey.html +++ b/pr/2612/docs/iroh_docs/struct.AuthorPublicKey.html @@ -148,6 +148,6 @@ builds.
    Into<Dispatch>,
    Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
    source§

    fn with_current_subscriber(self) -> WithDispatch<Self>

    Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
    source§

    impl<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> PeerIdentity for T
    where + T: for<'de> Deserialize<'de>,

    source§

    impl<T> PeerIdentity for T

    source§

    impl<T> RuleType for T
    where T: Copy + Debug + Eq + Hash + Ord,

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_docs/struct.DocTicket.html b/pr/2612/docs/iroh_docs/struct.DocTicket.html index 221ba0b238..ccecd30225 100644 --- a/pr/2612/docs/iroh_docs/struct.DocTicket.html +++ b/pr/2612/docs/iroh_docs/struct.DocTicket.html @@ -1,13 +1,13 @@ DocTicket in iroh_docs - Rust

    Struct iroh_docs::DocTicket

    source ·
    pub struct DocTicket {
         pub capability: Capability,
    -    pub nodes: Vec<NodeAddr>,
    +    pub nodes: Vec<NodeAddr>,
     }
    Expand description

    Contains both a key (either secret or public) to a document, and a list of peers to join.

    Fields§

    §capability: Capability

    either a public or private key

    -
    §nodes: Vec<NodeAddr>

    A list of nodes to contact.

    -

    Implementations§

    source§

    impl DocTicket

    source

    pub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self

    Create a new doc ticket

    +
    §nodes: Vec<NodeAddr>

    A list of nodes to contact.

    +

    Implementations§

    source§

    impl DocTicket

    source

    pub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self

    Create a new doc ticket

    Trait Implementations§

    source§

    impl Clone for DocTicket

    source§

    fn clone(&self) -> DocTicket

    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 DocTicket

    source§

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

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

    impl<'de> Deserialize<'de> for DocTicket

    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 Display for DocTicket

    source§

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

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

    impl FromStr for DocTicket

    §

    type Err = Error

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

    fn from_str(s: &str) -> Result<Self, Self::Err>

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

    impl Serialize for DocTicket

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

    impl Ticket for DocTicket

    source§

    const KIND: &'static str = "doc"

    String prefix describing the kind of iroh ticket. Read more
    source§

    fn to_bytes(&self) -> Vec<u8> ⓘ

    Serialize to bytes used in the base32 string representation.
    source§

    fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

    Deserialize from the base32 string representation bytes.
    §

    fn serialize(&self) -> String

    Serialize to string.
    §

    fn deserialize(str: &str) -> Result<Self, Error>

    Deserialize from a string.

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where + __D: Deserializer<'de>,

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

    impl Display for DocTicket

    source§

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

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

    impl FromStr for DocTicket

    §

    type Err = Error

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

    fn from_str(s: &str) -> Result<Self, Self::Err>

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

    impl Serialize for DocTicket

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

    impl Ticket for DocTicket

    source§

    const KIND: &'static str = "doc"

    String prefix describing the kind of iroh ticket. Read more
    source§

    fn to_bytes(&self) -> Vec<u8> ⓘ

    Serialize to bytes used in the base32 string representation.
    source§

    fn from_bytes(bytes: &[u8]) -> Result<Self, Error>

    Deserialize from the base32 string representation bytes.
    source§

    fn serialize(&self) -> String

    Serialize to string.
    source§

    fn deserialize(str: &str) -> Result<Self, Error>

    Deserialize from a string.

    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/2612/docs/iroh_docs/struct.NamespaceId.html b/pr/2612/docs/iroh_docs/struct.NamespaceId.html index ca7df463f0..5fcc0bcfaa 100644 --- a/pr/2612/docs/iroh_docs/struct.NamespaceId.html +++ b/pr/2612/docs/iroh_docs/struct.NamespaceId.html @@ -156,6 +156,6 @@ letters are used (e.g. F9B4CA)

    Into<Dispatch>,
    Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
    source§

    fn with_current_subscriber(self) -> WithDispatch<Self>

    Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
    source§

    impl<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> PeerIdentity for T
    where + T: for<'de> Deserialize<'de>,

    source§

    impl<T> PeerIdentity for T

    source§

    impl<T> RuleType for T
    where T: Copy + Debug + Eq + Hash + Ord,

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_docs/struct.NamespacePublicKey.html b/pr/2612/docs/iroh_docs/struct.NamespacePublicKey.html index 19de258698..ba6ca15cdf 100644 --- a/pr/2612/docs/iroh_docs/struct.NamespacePublicKey.html +++ b/pr/2612/docs/iroh_docs/struct.NamespacePublicKey.html @@ -147,6 +147,6 @@ builds.
    Into<Dispatch>,
    Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
    source§

    fn with_current_subscriber(self) -> WithDispatch<Self>

    Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
    source§

    impl<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> PeerIdentity for T
    where + T: for<'de> Deserialize<'de>,

    source§

    impl<T> PeerIdentity for T

    source§

    impl<T> RuleType for T
    where T: Copy + Debug + Eq + Hash + Ord,

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_docs/sync/struct.Entry.html b/pr/2612/docs/iroh_docs/sync/struct.Entry.html index 06a256d8a3..d1fb1faa87 100644 --- a/pr/2612/docs/iroh_docs/sync/struct.Entry.html +++ b/pr/2612/docs/iroh_docs/sync/struct.Entry.html @@ -1,6 +1,6 @@ Entry in iroh_docs::sync - Rust

    Struct iroh_docs::sync::Entry

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

    A single entry in a Replica

    An entry is identified by a key, its Author, and the Replica’s -NamespaceSecret. Its value is the 32-byte BLAKE3 hash +NamespaceSecret. Its value is the 32-byte BLAKE3 hash of the entry’s content data, the size of this content data, and a timestamp.

    Implementations§

    source§

    impl Entry

    source

    pub fn new(id: RecordIdentifier, record: Record) -> Self

    Create a new entry

    source

    pub fn new_empty(id: RecordIdentifier) -> Self

    Create a new empty entry with the current timestamp.

    @@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
    source

    pub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry

    Sign this entry with a NamespaceSecret and Author.

    Methods from Deref<Target = Record>§

    source

    pub fn is_empty(&self) -> bool

    Return true if the entry is empty.

    source

    pub fn content_len(&self) -> u64

    Get the length of the data addressed by this record’s content hash.

    -
    source

    pub fn content_hash(&self) -> Hash

    Get the [struct@Hash] of the content data of this record.

    +
    source

    pub fn content_hash(&self) -> Hash

    Get the Hash of the content data of this record.

    source

    pub fn timestamp(&self) -> u64

    Get the timestamp of this record.

    Trait Implementations§

    source§

    impl Clone for Entry

    source§

    fn clone(&self) -> Entry

    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 Entry

    source§

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

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

    impl Deref for Entry

    §

    type Target = Record

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    source§

    impl<'de> Deserialize<'de> for Entry

    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 From<SignedEntry> for Entry

    source§

    fn from(value: SignedEntry) -> Self

    Converts to this type from the input type.
    source§

    impl Ord for Entry

    source§

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

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

    fn max(self, other: Self) -> Self
    where diff --git a/pr/2612/docs/iroh_docs/sync/struct.Record.html b/pr/2612/docs/iroh_docs/sync/struct.Record.html index 64887e1d89..9848e9b7d7 100644 --- a/pr/2612/docs/iroh_docs/sync/struct.Record.html +++ b/pr/2612/docs/iroh_docs/sync/struct.Record.html @@ -1,11 +1,11 @@ Record in iroh_docs::sync - Rust

    Struct iroh_docs::sync::Record

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

    The data part of an entry in a Replica.

    -

    Implementations§

    source§

    impl Record

    source

    pub fn new(hash: Hash, len: u64, timestamp: u64) -> Self

    Create a new record.

    +

    Implementations§

    source§

    impl Record

    source

    pub fn new(hash: Hash, len: u64, timestamp: u64) -> Self

    Create a new record.

    source

    pub fn empty(timestamp: u64) -> Self

    Create a tombstone record (empty content)

    source

    pub fn empty_current() -> Self

    Create a tombstone record with the timestamp set to now.

    source

    pub fn is_empty(&self) -> bool

    Return true if the entry is empty.

    -
    source

    pub fn new_current(hash: Hash, len: u64) -> Self

    Create a new Record with the timestamp set to now.

    +
    source

    pub fn new_current(hash: Hash, len: u64) -> Self

    Create a new Record with the timestamp set to now.

    source

    pub fn content_len(&self) -> u64

    Get the length of the data addressed by this record’s content hash.

    -
    source

    pub fn content_hash(&self) -> Hash

    Get the [struct@Hash] of the content data of this record.

    +
    source

    pub fn content_hash(&self) -> Hash

    Get the Hash of the content data of this record.

    source

    pub fn timestamp(&self) -> u64

    Get the timestamp of this record.

    Trait Implementations§

    source§

    impl Clone for Record

    source§

    fn clone(&self) -> Record

    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 Record

    source§

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

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

    impl<'de> Deserialize<'de> for Record

    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 Ord for Record

    Ordering for entry values.

    diff --git a/pr/2612/docs/iroh_docs/sync/struct.Replica.html b/pr/2612/docs/iroh_docs/sync/struct.Replica.html index 23a9798651..c4e161f3c3 100644 --- a/pr/2612/docs/iroh_docs/sync/struct.Replica.html +++ b/pr/2612/docs/iroh_docs/sync/struct.Replica.html @@ -5,7 +5,7 @@ &mut self, key: impl AsRef<[u8]>, author: &Author, - hash: Hash, + hash: Hash, len: u64 ) -> Result<usize, InsertError>

    Insert a new record at the given key.

    The entry will by signed by the provided author. @@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.

    key: impl AsRef<[u8]>, author: &Author, data: impl AsRef<[u8]> -) -> Result<Hash, InsertError>

    Hashes the given data and inserts it.

    +) -> Result<Hash, InsertError>

    Hashes the given data and inserts it.

    This does not store the content, just the record of it. Returns the calculated hash.

    source

    pub fn record_id( diff --git a/pr/2612/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2612/docs/iroh_docs/sync/struct.SignedEntry.html index b03a4db008..d588c9a0fd 100644 --- a/pr/2612/docs/iroh_docs/sync/struct.SignedEntry.html +++ b/pr/2612/docs/iroh_docs/sync/struct.SignedEntry.html @@ -14,7 +14,7 @@

    source

    pub fn signature(&self) -> &EntrySignature

    Get the signature.

    source

    pub fn validate_empty(&self) -> Result<(), ValidationFailure>

    Validate that the entry has the empty hash if the length is 0, or a non-zero length.

    source

    pub fn entry(&self) -> &Entry

    Get the Entry.

    -
    source

    pub fn content_hash(&self) -> Hash

    Get the content [struct@Hash] of the entry.

    +
    source

    pub fn content_hash(&self) -> Hash

    Get the content Hash of the entry.

    source

    pub fn content_len(&self) -> u64

    Get the content length of the entry.

    source

    pub fn author_bytes(&self) -> AuthorId

    Get the author bytes of this entry.

    source

    pub fn key(&self) -> &[u8] ⓘ

    Get the key of the entry.

    @@ -29,7 +29,7 @@
    source

    pub fn to_vec(&self) -> Vec<u8> ⓘ

    Serialize this entry into a new vector with its canonical byte representation.

    Methods from Deref<Target = Record>§

    source

    pub fn is_empty(&self) -> bool

    Return true if the entry is empty.

    source

    pub fn content_len(&self) -> u64

    Get the length of the data addressed by this record’s content hash.

    -
    source

    pub fn content_hash(&self) -> Hash

    Get the [struct@Hash] of the content data of this record.

    +
    source

    pub fn content_hash(&self) -> Hash

    Get the Hash of the content data of this record.

    source

    pub fn timestamp(&self) -> u64

    Get the timestamp of this record.

    Trait Implementations§

    source§

    impl Clone for SignedEntry

    source§

    fn clone(&self) -> SignedEntry

    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 SignedEntry

    source§

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

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

    impl Deref for SignedEntry

    §

    type Target = Entry

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    source§

    impl<'de> Deserialize<'de> for SignedEntry

    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 From<SignedEntry> for Entry

    source§

    fn from(value: SignedEntry) -> Self

    Converts to this type from the input type.
    source§

    impl Ord for SignedEntry

    source§

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

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

    fn max(self, other: Self) -> Self
    where diff --git a/pr/2612/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2612/docs/iroh_docs/sync/type.ContentStatusCallback.html index 46d5a5a49c..84ffdbe8ee 100644 --- a/pr/2612/docs/iroh_docs/sync/type.ContentStatusCallback.html +++ b/pr/2612/docs/iroh_docs/sync/type.ContentStatusCallback.html @@ -1,2 +1,2 @@ -ContentStatusCallback in iroh_docs::sync - Rust

    Type Alias iroh_docs::sync::ContentStatusCallback

    source ·
    pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
    Expand description

    Callback that may be set on a replica to determine the availability status for a content hash.

    +ContentStatusCallback in iroh_docs::sync - Rust

    Type Alias iroh_docs::sync::ContentStatusCallback

    source ·
    pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
    Expand description

    Callback that may be set on a replica to determine the availability status for a content hash.

    Aliased Type§

    struct ContentStatusCallback { /* private fields */ }
    \ No newline at end of file diff --git a/pr/2612/docs/iroh_net/endpoint/struct.AddrInfo.html b/pr/2612/docs/iroh_net/endpoint/struct.AddrInfo.html index c73cd018d4..c679e7d6c1 100644 --- a/pr/2612/docs/iroh_net/endpoint/struct.AddrInfo.html +++ b/pr/2612/docs/iroh_net/endpoint/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh_net::endpoint - Rust

    Struct iroh_net::endpoint::AddrInfo

    pub struct AddrInfo {
    +AddrInfo in iroh_net::endpoint - Rust

    Struct iroh_net::endpoint::AddrInfo

    source ·
    pub struct AddrInfo {
         pub relay_url: Option<RelayUrl>,
         pub direct_addresses: BTreeSet<SocketAddr>,
     }
    Expand description

    Network paths to contact an iroh-net node.

    @@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to other node, see NodeAddr for details.

    Fields§

    §relay_url: Option<RelayUrl>

    The node’s home relay url.

    §direct_addresses: BTreeSet<SocketAddr>

    Socket addresses where the peer might be reached directly.

    -

    Implementations§

    §

    impl AddrInfo

    pub fn is_empty(&self) -> bool

    Returns whether this addressing information is empty.

    -

    pub fn apply_options(&mut self, opts: AddrInfoOptions)

    Applies the options to self.

    +

    Implementations§

    source§

    impl AddrInfo

    source

    pub fn is_empty(&self) -> bool

    Returns whether this addressing information is empty.

    +
    source

    pub fn apply_options(&mut self, opts: AddrInfoOptions)

    Applies the options to self.

    This is used to more tightly control the information stored in ab AddrInfo received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

    -

    Trait Implementations§

    §

    impl Clone for AddrInfo

    §

    fn clone(&self) -> AddrInfo

    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 AddrInfo

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for AddrInfo

    §

    fn default() -> AddrInfo

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

    impl<'de> Deserialize<'de> for AddrInfo

    §

    fn deserialize<__D>( +

    Trait Implementations§

    source§

    impl Clone for AddrInfo

    source§

    fn clone(&self) -> AddrInfo

    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 AddrInfo

    source§

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

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

    impl Default for AddrInfo

    source§

    fn default() -> AddrInfo

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

    impl<'de> Deserialize<'de> for AddrInfo

    source§

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

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

    impl From<NodeInfo> for AddrInfo

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    §

    impl Ord for AddrInfo

    §

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

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

    fn max(self, other: Self) -> Self
    where + __D: Deserializer<'de>,

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

    impl From<NodeInfo> for AddrInfo

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl Ord for AddrInfo

    source§

    fn cmp(&self, other: &AddrInfo) -> 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 AddrInfo

    §

    fn eq(&self, other: &AddrInfo) -> 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 AddrInfo

    source§

    fn eq(&self, other: &AddrInfo) -> 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 AddrInfo

    §

    fn partial_cmp(&self, other: &AddrInfo) -> 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 AddrInfo

    source§

    fn partial_cmp(&self, other: &AddrInfo) -> 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 AddrInfo

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for AddrInfo

    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 Eq for AddrInfo

    §

    impl StructuralPartialEq for AddrInfo

    Auto Trait Implementations§

    §

    impl Freeze for AddrInfo

    §

    impl RefUnwindSafe for AddrInfo

    §

    impl Send for AddrInfo

    §

    impl Sync for AddrInfo

    §

    impl Unpin for AddrInfo

    §

    impl UnwindSafe for AddrInfo

    Blanket Implementations§

    source§

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

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

    impl Eq for AddrInfo

    source§

    impl StructuralPartialEq for AddrInfo

    Auto Trait Implementations§

    §

    impl Freeze for AddrInfo

    §

    impl RefUnwindSafe for AddrInfo

    §

    impl Send for AddrInfo

    §

    impl Sync for AddrInfo

    §

    impl Unpin for AddrInfo

    §

    impl UnwindSafe for AddrInfo

    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/2612/docs/iroh_net/endpoint/struct.NodeAddr.html b/pr/2612/docs/iroh_net/endpoint/struct.NodeAddr.html index 1b15b299dc..4509091d6a 100644 --- a/pr/2612/docs/iroh_net/endpoint/struct.NodeAddr.html +++ b/pr/2612/docs/iroh_net/endpoint/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh_net::endpoint - Rust

    Struct iroh_net::endpoint::NodeAddr

    pub struct NodeAddr {
    +NodeAddr in iroh_net::endpoint - Rust

    Struct iroh_net::endpoint::NodeAddr

    source ·
    pub struct NodeAddr {
         pub node_id: PublicKey,
         pub info: AddrInfo,
     }
    Expand description

    Network-level addressing information for an iroh-net node.

    @@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type whenever a connection to other nodes needs to be established.

    Fields§

    §node_id: PublicKey

    The node’s identifier.

    §info: AddrInfo

    Addressing information to connect to Self::node_id.

    -

    Implementations§

    §

    impl NodeAddr

    pub fn new(node_id: PublicKey) -> NodeAddr

    Creates a new NodeAddr with empty AddrInfo.

    -

    pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

    Adds a relay url to the node’s AddrInfo.

    -

    pub fn with_direct_addresses( +

    Implementations§

    source§

    impl NodeAddr

    source

    pub fn new(node_id: PublicKey) -> NodeAddr

    Creates a new NodeAddr with empty AddrInfo.

    +
    source

    pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

    Adds a relay url to the node’s AddrInfo.

    +
    source

    pub fn with_direct_addresses( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

    Adds the given direct addresses to the peer’s AddrInfo.

    -

    pub fn from_parts( +

    source

    pub fn from_parts( node_id: PublicKey, relay_url: Option<RelayUrl>, direct_addresses: Vec<SocketAddr> ) -> NodeAddr

    Creates a new NodeAddr from its parts.

    -

    pub fn apply_options(&mut self, opts: AddrInfoOptions)

    Applies the options to self.

    +
    source

    pub fn apply_options(&mut self, opts: AddrInfoOptions)

    Applies the options to self.

    This is used to more tightly control the information stored in a NodeAddr received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

    -

    pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

    Returns the direct addresses of this peer.

    -

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay url of this peer.

    -

    Trait Implementations§

    §

    impl Clone for NodeAddr

    §

    fn clone(&self) -> NodeAddr

    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 NodeAddr

    §

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

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for NodeAddr

    §

    fn deserialize<__D>( +

    source

    pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

    Returns the direct addresses of this peer.

    +
    source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay url of this peer.

    +

    Trait Implementations§

    source§

    impl Clone for NodeAddr

    source§

    fn clone(&self) -> NodeAddr

    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 NodeAddr

    source§

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

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

    impl<'de> Deserialize<'de> for NodeAddr

    source§

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

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

    impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

    §

    fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(info: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    §

    impl From<PublicKey> for NodeAddr

    §

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    §

    impl Ord for NodeAddr

    §

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

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

    fn max(self, other: Self) -> Self
    where + __D: Deserializer<'de>,

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

    impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

    source§

    fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(info: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl From<PublicKey> for NodeAddr

    source§

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl Ord for NodeAddr

    source§

    fn cmp(&self, other: &NodeAddr) -> 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 NodeAddr

    §

    fn eq(&self, other: &NodeAddr) -> 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 NodeAddr

    source§

    fn eq(&self, other: &NodeAddr) -> 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 NodeAddr

    §

    fn partial_cmp(&self, other: &NodeAddr) -> 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 NodeAddr

    source§

    fn partial_cmp(&self, other: &NodeAddr) -> 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 NodeAddr

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for NodeAddr

    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 Eq for NodeAddr

    §

    impl StructuralPartialEq for NodeAddr

    Auto Trait Implementations§

    §

    impl Freeze for NodeAddr

    §

    impl RefUnwindSafe for NodeAddr

    §

    impl Send for NodeAddr

    §

    impl Sync for NodeAddr

    §

    impl Unpin for NodeAddr

    §

    impl UnwindSafe for NodeAddr

    Blanket Implementations§

    source§

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

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

    impl Eq for NodeAddr

    source§

    impl StructuralPartialEq for NodeAddr

    Auto Trait Implementations§

    §

    impl Freeze for NodeAddr

    §

    impl RefUnwindSafe for NodeAddr

    §

    impl Send for NodeAddr

    §

    impl Sync for NodeAddr

    §

    impl Unpin for NodeAddr

    §

    impl UnwindSafe for NodeAddr

    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/2612/docs/iroh_net/key/enum.KeyParsingError.html b/pr/2612/docs/iroh_net/key/enum.KeyParsingError.html index 5c3418374c..c1bd54a029 100644 --- a/pr/2612/docs/iroh_net/key/enum.KeyParsingError.html +++ b/pr/2612/docs/iroh_net/key/enum.KeyParsingError.html @@ -1,10 +1,10 @@ -KeyParsingError in iroh_net::key - Rust

    Enum iroh_net::key::KeyParsingError

    pub enum KeyParsingError {
    -    Base32(HexOrBase32ParseError),
    +KeyParsingError in iroh_net::key - Rust

    Enum iroh_net::key::KeyParsingError

    source ·
    pub enum KeyParsingError {
    +    Base32(HexOrBase32ParseError),
         Key(Error),
     }
    Expand description

    Error when deserialising a PublicKey or a SecretKey.

    -

    Variants§

    §

    Base32(HexOrBase32ParseError)

    Error when decoding the base32.

    +

    Variants§

    §

    Base32(HexOrBase32ParseError)

    Error when decoding the base32.

    §

    Key(Error)

    Error when decoding the public key.

    -

    Trait Implementations§

    §

    impl Debug for KeyParsingError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for KeyParsingError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for KeyParsingError

    §

    fn source(&self) -> Option<&(dyn Error + 'static)>

    The lower-level source of this error, if any. Read more
    1.0.0 · source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type based access to context intended for error reports. Read more
    §

    impl From<Error> for KeyParsingError

    §

    fn from(source: Error) -> KeyParsingError

    Converts to this type from the input type.
    §

    impl From<HexOrBase32ParseError> for KeyParsingError

    §

    fn from(source: HexOrBase32ParseError) -> KeyParsingError

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +

    Trait Implementations§

    source§

    impl Debug for KeyParsingError

    source§

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

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

    impl Display for KeyParsingError

    source§

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

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

    impl Error for KeyParsingError

    source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    The lower-level source of this error, if any. Read more
    1.0.0 · source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    1.0.0 · source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    source§

    fn provide<'a>(&'a self, request: &mut Request<'a>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type based access to context intended for error reports. Read more
    source§

    impl From<Error> for KeyParsingError

    source§

    fn from(source: Error) -> KeyParsingError

    Converts to this type from the input type.
    source§

    impl From<HexOrBase32ParseError> for KeyParsingError

    source§

    fn from(source: HexOrBase32ParseError) -> KeyParsingError

    Converts to this type from the input type.

    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/2612/docs/iroh_net/key/index.html b/pr/2612/docs/iroh_net/key/index.html index f8a86b539b..fed9e6656d 100644 --- a/pr/2612/docs/iroh_net/key/index.html +++ b/pr/2612/docs/iroh_net/key/index.html @@ -1,2 +1,2 @@ -iroh_net::key - Rust

    Module iroh_net::key

    Expand description

    Cryptographic key handling for iroh-net.

    +iroh_net::key - Rust

    Module iroh_net::key

    source ·
    Expand description

    Cryptographic key handling for iroh-net.

    Structs§

    Enums§

    Constants§

    Type Aliases§

    • The identifier for a node in the (iroh) network.
    \ No newline at end of file diff --git a/pr/2612/docs/iroh_net/key/struct.PublicKey.html b/pr/2612/docs/iroh_net/key/struct.PublicKey.html index 633db2c5de..43d6a7b857 100644 --- a/pr/2612/docs/iroh_net/key/struct.PublicKey.html +++ b/pr/2612/docs/iroh_net/key/struct.PublicKey.html @@ -1,45 +1,45 @@ -PublicKey in iroh_net::key - Rust

    Struct iroh_net::key::PublicKey

    pub struct PublicKey(/* private fields */);
    Expand description

    A public key.

    +PublicKey in iroh_net::key - Rust

    Struct iroh_net::key::PublicKey

    source ·
    pub struct PublicKey(/* private fields */);
    Expand description

    A public key.

    The key itself is just a 32 byte array, but a key has associated crypto information that is cached for performance reasons.

    The cache item will be refreshed every time a crypto operation is performed, or when a key is deserialised or created from a byte array.

    Serialisation or creation from a byte array is cheap if the key is already in the cache, but expensive if it is not.

    -

    Implementations§

    §

    impl PublicKey

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

    Get this public key as a byte array.

    -

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    +

    Implementations§

    source§

    impl PublicKey

    source

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

    Get this public key as a byte array.

    +
    source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    §Warning

    This will return a [SignatureError] if the bytes passed into this method do not represent a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes. See [VerifyingKey::from_bytes] for details.

    -

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    +
    source

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    §Return

    Returns Ok(()) if the signature is valid, and Err otherwise.

    -

    pub fn fmt_short(&self) -> String

    Convert to a base32 string limited to the first 10 bytes for a friendly 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 key.

    -

    Trait Implementations§

    §

    impl AsRef<[u8]> for PublicKey

    §

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

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

    impl Clone for PublicKey

    §

    fn clone(&self) -> PublicKey

    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 PublicKey

    §

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

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for PublicKey

    §

    fn deserialize<D>( +

    Trait Implementations§

    source§

    impl AsRef<[u8]> for PublicKey

    source§

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

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

    impl Clone for PublicKey

    source§

    fn clone(&self) -> PublicKey

    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 PublicKey

    source§

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

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

    impl<'de> Deserialize<'de> for PublicKey

    source§

    fn deserialize<D>( deserializer: D ) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where - D: Deserializer<'de>,

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

    impl Display for PublicKey

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<PublicKey> for NodeAddr

    §

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    §

    impl From<VerifyingKey> for PublicKey

    §

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    §

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    + D: Deserializer<'de>,

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

    impl Display for PublicKey

    source§

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

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

    impl From<PublicKey> for NodeAddr

    source§

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<VerifyingKey> for PublicKey

    source§

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    Display is capable of serialising this format.

    -
    §

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    §

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

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

    impl Hash for PublicKey

    §

    fn hash<H>(&self, state: &mut H)
    where +
    §

    type Err = KeyParsingError

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

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

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

    source§

    impl Hash for PublicKey

    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 Ord for PublicKey

    §

    fn cmp(&self, other: &PublicKey) -> 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 Ord for PublicKey

    source§

    fn cmp(&self, other: &PublicKey) -> 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 PublicKey

    §

    fn eq(&self, other: &PublicKey) -> 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 PublicKey

    source§

    fn eq(&self, other: &PublicKey) -> 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 PublicKey

    §

    fn partial_cmp(&self, other: &PublicKey) -> 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 PublicKey

    source§

    fn partial_cmp(&self, other: &PublicKey) -> 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 PublicKey

    §

    fn serialize<S>( +operator. Read more

    source§

    impl Serialize for PublicKey

    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 TryFrom<&[u8]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from( + S: Serializer,

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

    impl TryFrom<&[u8]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    source§

    fn try_from( bytes: &[u8] -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    §

    impl TryFrom<&[u8; 32]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from( +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    source§

    impl TryFrom<&[u8; 32]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    source§

    fn try_from( bytes: &[u8; 32] -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    §

    impl Copy for PublicKey

    §

    impl Eq for PublicKey

    §

    impl StructuralPartialEq for PublicKey

    Auto Trait Implementations§

    §

    impl Freeze for PublicKey

    §

    impl RefUnwindSafe for PublicKey

    §

    impl Send for PublicKey

    §

    impl Sync for PublicKey

    §

    impl Unpin for PublicKey

    §

    impl UnwindSafe for PublicKey

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    source§

    impl Copy for PublicKey

    source§

    impl Eq for PublicKey

    source§

    impl StructuralPartialEq for PublicKey

    Auto Trait Implementations§

    §

    impl Freeze for PublicKey

    §

    impl RefUnwindSafe for PublicKey

    §

    impl Send for PublicKey

    §

    impl Sync for PublicKey

    §

    impl Unpin for PublicKey

    §

    impl UnwindSafe for PublicKey

    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/2612/docs/iroh_net/key/struct.SecretKey.html b/pr/2612/docs/iroh_net/key/struct.SecretKey.html index 7cd87e14d3..c36389d208 100644 --- a/pr/2612/docs/iroh_net/key/struct.SecretKey.html +++ b/pr/2612/docs/iroh_net/key/struct.SecretKey.html @@ -1,24 +1,24 @@ -SecretKey in iroh_net::key - Rust

    Struct iroh_net::key::SecretKey

    pub struct SecretKey { /* private fields */ }
    Expand description

    A secret key.

    -

    Implementations§

    §

    impl SecretKey

    pub fn shared(&self, other: &PublicKey) -> SharedSecret

    Returns the shared key for communication between this key and other.

    -
    §

    impl SecretKey

    pub fn public(&self) -> PublicKey

    The public key of this SecretKey.

    -

    pub fn generate() -> SecretKey

    Generate a new SecretKey with the default randomness generator.

    -

    pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKey
    where +SecretKey in iroh_net::key - Rust

    Struct iroh_net::key::SecretKey

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

    A secret key.

    +

    Implementations§

    source§

    impl SecretKey

    source

    pub fn shared(&self, other: &PublicKey) -> SharedSecret

    Returns the shared key for communication between this key and other.

    +
    source§

    impl SecretKey

    source

    pub fn public(&self) -> PublicKey

    The public key of this SecretKey.

    +
    source

    pub fn generate() -> SecretKey

    Generate a new SecretKey with the default randomness generator.

    +
    source

    pub fn generate_with_rng<R>(csprng: &mut R) -> SecretKey
    where R: CryptoRngCore + ?Sized,

    Generate a new SecretKey with a randomness generator.

    -

    pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>

    Serialise this key to OpenSSH format.

    -

    pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
    where +

    source

    pub fn to_openssh(&self) -> Result<Zeroizing<String>, Error>

    Serialise this key to OpenSSH format.

    +
    source

    pub fn try_from_openssh<T>(data: T) -> Result<SecretKey, Error>
    where T: AsRef<[u8]>,

    Deserialise this key from OpenSSH format.

    -

    pub fn sign(&self, msg: &[u8]) -> Signature

    Sign the given message and return a digital signature

    -

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

    Convert this to the bytes representing the secret part. +

    source

    pub fn sign(&self, msg: &[u8]) -> Signature

    Sign the given message and return a digital signature

    +
    source

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

    Convert this to the bytes representing the secret part. The public part can always be recovered.

    -

    pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

    Create a secret key from its byte representation.

    -

    Trait Implementations§

    §

    impl Clone for SecretKey

    §

    fn clone(&self) -> SecretKey

    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 SecretKey

    §

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

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for SecretKey

    §

    fn deserialize<D>( +

    source

    pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

    Create a secret key from its byte representation.

    +

    Trait Implementations§

    source§

    impl Clone for SecretKey

    source§

    fn clone(&self) -> SecretKey

    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 SecretKey

    source§

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

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

    impl<'de> Deserialize<'de> for SecretKey

    source§

    fn deserialize<D>( deserializer: D ) -> Result<SecretKey, <D as Deserializer<'de>>::Error>
    where - D: Deserializer<'de>,

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

    impl Display for SecretKey

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<[u8; 32]> for SecretKey

    §

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

    Converts to this type from the input type.
    §

    impl From<SigningKey> for SecretKey

    §

    fn from(secret: SigningKey) -> SecretKey

    Converts to this type from the input type.
    §

    impl FromStr for SecretKey

    §

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    §

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

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

    impl Serialize for SecretKey

    §

    fn serialize<S>( + D: Deserializer<'de>,

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

    impl Display for SecretKey

    source§

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

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

    impl From<[u8; 32]> for SecretKey

    source§

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

    Converts to this type from the input type.
    source§

    impl From<SigningKey> for SecretKey

    source§

    fn from(secret: SigningKey) -> SecretKey

    Converts to this type from the input type.
    source§

    impl FromStr for SecretKey

    §

    type Err = KeyParsingError

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

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

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

    impl Serialize for SecretKey

    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 TryFrom<&[u8]> for SecretKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from( + S: Serializer,

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

    impl TryFrom<&[u8]> for SecretKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    source§

    fn try_from( bytes: &[u8] ) -> Result<SecretKey, <SecretKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.

    Auto Trait Implementations§

    §

    impl !Freeze for SecretKey

    §

    impl RefUnwindSafe for SecretKey

    §

    impl Send for SecretKey

    §

    impl Sync for SecretKey

    §

    impl Unpin for SecretKey

    §

    impl UnwindSafe for SecretKey

    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 diff --git a/pr/2612/docs/iroh_net/key/struct.SharedSecret.html b/pr/2612/docs/iroh_net/key/struct.SharedSecret.html index cb60d9fe11..9bb2286597 100644 --- a/pr/2612/docs/iroh_net/key/struct.SharedSecret.html +++ b/pr/2612/docs/iroh_net/key/struct.SharedSecret.html @@ -1,7 +1,7 @@ -SharedSecret in iroh_net::key - Rust

    Struct iroh_net::key::SharedSecret

    pub struct SharedSecret(/* private fields */);
    Expand description

    Shared Secret.

    -

    Implementations§

    §

    impl SharedSecret

    pub fn seal(&self, buffer: &mut dyn Buffer)

    Seals the provided cleartext.

    -

    pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), Error>

    Opens the ciphertext, which must have been created using Self::seal, and places the clear text into the provided buffer.

    -

    Trait Implementations§

    §

    impl Debug for SharedSecret

    §

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

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    source§

    impl<T> Any for T
    where +SharedSecret in iroh_net::key - Rust

    Struct iroh_net::key::SharedSecret

    source ·
    pub struct SharedSecret(/* private fields */);
    Expand description

    Shared Secret.

    +

    Implementations§

    source§

    impl SharedSecret

    source

    pub fn seal(&self, buffer: &mut dyn Buffer)

    Seals the provided cleartext.

    +
    source

    pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), Error>

    Opens the ciphertext, which must have been created using Self::seal, and places the clear text into the provided buffer.

    +

    Trait Implementations§

    source§

    impl Debug for SharedSecret

    source§

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

    Formats the value using the given formatter. Read more

    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/2612/docs/iroh_net/key/type.NodeId.html b/pr/2612/docs/iroh_net/key/type.NodeId.html index fddfe420b0..2ca36f46fe 100644 --- a/pr/2612/docs/iroh_net/key/type.NodeId.html +++ b/pr/2612/docs/iroh_net/key/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh_net::key - Rust

    Type Alias iroh_net::key::NodeId

    pub type NodeId = PublicKey;
    Expand description

    The identifier for a node in the (iroh) network.

    +NodeId in iroh_net::key - Rust

    Type Alias iroh_net::key::NodeId

    source ·
    pub type NodeId = PublicKey;
    Expand description

    The identifier for a node in the (iroh) network.

    Each node in iroh has a unique identifier created as a cryptographic key. This can be used to globally identify a node. Since it is also a cryptographic key it is also the mechanism by which all traffic is always encrypted for a specific node only.

    diff --git a/pr/2612/docs/iroh_net/relay/struct.RelayUrl.html b/pr/2612/docs/iroh_net/relay/struct.RelayUrl.html index f199af1178..2213e5581b 100644 --- a/pr/2612/docs/iroh_net/relay/struct.RelayUrl.html +++ b/pr/2612/docs/iroh_net/relay/struct.RelayUrl.html @@ -1,4 +1,4 @@ -RelayUrl in iroh_net::relay - Rust

    Struct iroh_net::relay::RelayUrl

    pub struct RelayUrl(/* private fields */);
    Expand description

    A URL identifying a relay server.

    +RelayUrl in iroh_net::relay - Rust

    Struct iroh_net::relay::RelayUrl

    source ·
    pub struct RelayUrl(/* private fields */);
    Expand description

    A URL identifying a relay server.

    This is but a wrapper around Url, with a few custom tweaks:

    • @@ -441,30 +441,30 @@ It is the user’s responsibility to check the URL’s scheme before calling thi or if Path::new_opt() returns None. (That is, if the percent-decoded path contains a NUL byte or, for a Windows path, is not UTF-8.)

      -

    Trait Implementations§

    §

    impl Clone for RelayUrl

    §

    fn clone(&self) -> RelayUrl

    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 RelayUrl

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Deref for RelayUrl

    Dereferences to the wrapped Url.

    +

    Trait Implementations§

    source§

    impl Clone for RelayUrl

    source§

    fn clone(&self) -> RelayUrl

    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 RelayUrl

    source§

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

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

    impl Deref for RelayUrl

    Dereferences to the wrapped Url.

    Note that DerefMut is not implemented on purpose, so this type has more flexibility to change the inner later.

    -
    §

    type Target = Url

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<RelayUrl as Deref>::Target

    Dereferences the value.
    §

    impl<'de> Deserialize<'de> for RelayUrl

    §

    fn deserialize<__D>( +

    §

    type Target = Url

    The resulting type after dereferencing.
    source§

    fn deref(&self) -> &<RelayUrl as Deref>::Target

    Dereferences the value.
    source§

    impl<'de> Deserialize<'de> for RelayUrl

    source§

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

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

    impl Display for RelayUrl

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<RelayUrl> for Url

    §

    fn from(value: RelayUrl) -> Url

    Converts to this type from the input type.
    §

    impl From<Url> for RelayUrl

    §

    fn from(url: Url) -> RelayUrl

    Converts to this type from the input type.
    §

    impl FromStr for RelayUrl

    Support for parsing strings directly.

    + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more

    source§

    impl Display for RelayUrl

    source§

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

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

    impl From<RelayUrl> for Url

    source§

    fn from(value: RelayUrl) -> Url

    Converts to this type from the input type.
    source§

    impl From<Url> for RelayUrl

    source§

    fn from(url: Url) -> RelayUrl

    Converts to this type from the input type.
    source§

    impl FromStr for RelayUrl

    Support for parsing strings directly.

    If you need more control over the error first create a Url and use RelayUrl::from instead.

    -
    §

    type Err = Error

    The associated error which can be returned from parsing.
    §

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

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

    impl Hash for RelayUrl

    §

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

    type Err = Error

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

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

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

    source§

    impl Hash for RelayUrl

    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 Ord for RelayUrl

    §

    fn cmp(&self, other: &RelayUrl) -> 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 Ord for RelayUrl

    source§

    fn cmp(&self, other: &RelayUrl) -> 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 RelayUrl

    §

    fn eq(&self, other: &RelayUrl) -> 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 RelayUrl

    source§

    fn eq(&self, other: &RelayUrl) -> 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 RelayUrl

    §

    fn partial_cmp(&self, other: &RelayUrl) -> 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 RelayUrl

    source§

    fn partial_cmp(&self, other: &RelayUrl) -> 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 RelayUrl

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for RelayUrl

    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 Eq for RelayUrl

    §

    impl StructuralPartialEq for RelayUrl

    Auto Trait Implementations§

    §

    impl Freeze for RelayUrl

    §

    impl RefUnwindSafe for RelayUrl

    §

    impl Send for RelayUrl

    §

    impl Sync for RelayUrl

    §

    impl Unpin for RelayUrl

    §

    impl UnwindSafe for RelayUrl

    Blanket Implementations§

    source§

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

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

    impl Eq for RelayUrl

    source§

    impl StructuralPartialEq for RelayUrl

    Auto Trait Implementations§

    §

    impl Freeze for RelayUrl

    §

    impl RefUnwindSafe for RelayUrl

    §

    impl Send for RelayUrl

    §

    impl Sync for RelayUrl

    §

    impl Unpin for RelayUrl

    §

    impl UnwindSafe for RelayUrl

    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/2612/docs/iroh_net/struct.AddrInfo.html b/pr/2612/docs/iroh_net/struct.AddrInfo.html index 96dc0c42ac..30e534b815 100644 --- a/pr/2612/docs/iroh_net/struct.AddrInfo.html +++ b/pr/2612/docs/iroh_net/struct.AddrInfo.html @@ -1,4 +1,4 @@ -AddrInfo in iroh_net - Rust

    Struct iroh_net::AddrInfo

    pub struct AddrInfo {
    +AddrInfo in iroh_net - Rust

    Struct iroh_net::AddrInfo

    source ·
    pub struct AddrInfo {
         pub relay_url: Option<RelayUrl>,
         pub direct_addresses: BTreeSet<SocketAddr>,
     }
    Expand description

    Network paths to contact an iroh-net node.

    @@ -7,26 +7,26 @@ Unless a [discovery service] is used at least one path is required to connect to other node, see NodeAddr for details.

    Fields§

    §relay_url: Option<RelayUrl>

    The node’s home relay url.

    §direct_addresses: BTreeSet<SocketAddr>

    Socket addresses where the peer might be reached directly.

    -

    Implementations§

    §

    impl AddrInfo

    pub fn is_empty(&self) -> bool

    Returns whether this addressing information is empty.

    -

    pub fn apply_options(&mut self, opts: AddrInfoOptions)

    Applies the options to self.

    +

    Implementations§

    source§

    impl AddrInfo

    source

    pub fn is_empty(&self) -> bool

    Returns whether this addressing information is empty.

    +
    source

    pub fn apply_options(&mut self, opts: AddrInfoOptions)

    Applies the options to self.

    This is used to more tightly control the information stored in ab AddrInfo received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

    -

    Trait Implementations§

    §

    impl Clone for AddrInfo

    §

    fn clone(&self) -> AddrInfo

    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 AddrInfo

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for AddrInfo

    §

    fn default() -> AddrInfo

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

    impl<'de> Deserialize<'de> for AddrInfo

    §

    fn deserialize<__D>( +

    Trait Implementations§

    source§

    impl Clone for AddrInfo

    source§

    fn clone(&self) -> AddrInfo

    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 AddrInfo

    source§

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

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

    impl Default for AddrInfo

    source§

    fn default() -> AddrInfo

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

    impl<'de> Deserialize<'de> for AddrInfo

    source§

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

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

    impl From<NodeInfo> for AddrInfo

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    §

    impl Ord for AddrInfo

    §

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

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

    fn max(self, other: Self) -> Self
    where + __D: Deserializer<'de>,

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

    impl From<NodeInfo> for AddrInfo

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl Ord for AddrInfo

    source§

    fn cmp(&self, other: &AddrInfo) -> 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 AddrInfo

    §

    fn eq(&self, other: &AddrInfo) -> 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 AddrInfo

    source§

    fn eq(&self, other: &AddrInfo) -> 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 AddrInfo

    §

    fn partial_cmp(&self, other: &AddrInfo) -> 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 AddrInfo

    source§

    fn partial_cmp(&self, other: &AddrInfo) -> 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 AddrInfo

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for AddrInfo

    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 Eq for AddrInfo

    §

    impl StructuralPartialEq for AddrInfo

    Auto Trait Implementations§

    §

    impl Freeze for AddrInfo

    §

    impl RefUnwindSafe for AddrInfo

    §

    impl Send for AddrInfo

    §

    impl Sync for AddrInfo

    §

    impl Unpin for AddrInfo

    §

    impl UnwindSafe for AddrInfo

    Blanket Implementations§

    source§

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

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

    impl Eq for AddrInfo

    source§

    impl StructuralPartialEq for AddrInfo

    Auto Trait Implementations§

    §

    impl Freeze for AddrInfo

    §

    impl RefUnwindSafe for AddrInfo

    §

    impl Send for AddrInfo

    §

    impl Sync for AddrInfo

    §

    impl Unpin for AddrInfo

    §

    impl UnwindSafe for AddrInfo

    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/2612/docs/iroh_net/struct.NodeAddr.html b/pr/2612/docs/iroh_net/struct.NodeAddr.html index 041135fce3..de0983c6c8 100644 --- a/pr/2612/docs/iroh_net/struct.NodeAddr.html +++ b/pr/2612/docs/iroh_net/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh_net - Rust

    Struct iroh_net::NodeAddr

    pub struct NodeAddr {
    +NodeAddr in iroh_net - Rust

    Struct iroh_net::NodeAddr

    source ·
    pub struct NodeAddr {
         pub node_id: PublicKey,
         pub info: AddrInfo,
     }
    Expand description

    Network-level addressing information for an iroh-net node.

    @@ -25,38 +25,38 @@ number of network-level addressing information. It is a generic addressing type whenever a connection to other nodes needs to be established.

    Fields§

    §node_id: PublicKey

    The node’s identifier.

    §info: AddrInfo

    Addressing information to connect to Self::node_id.

    -

    Implementations§

    §

    impl NodeAddr

    pub fn new(node_id: PublicKey) -> NodeAddr

    Creates a new NodeAddr with empty AddrInfo.

    -

    pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

    Adds a relay url to the node’s AddrInfo.

    -

    pub fn with_direct_addresses( +

    Implementations§

    source§

    impl NodeAddr

    source

    pub fn new(node_id: PublicKey) -> NodeAddr

    Creates a new NodeAddr with empty AddrInfo.

    +
    source

    pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

    Adds a relay url to the node’s AddrInfo.

    +
    source

    pub fn with_direct_addresses( self, addresses: impl IntoIterator<Item = SocketAddr> ) -> NodeAddr

    Adds the given direct addresses to the peer’s AddrInfo.

    -

    pub fn from_parts( +

    source

    pub fn from_parts( node_id: PublicKey, relay_url: Option<RelayUrl>, direct_addresses: Vec<SocketAddr> ) -> NodeAddr

    Creates a new NodeAddr from its parts.

    -

    pub fn apply_options(&mut self, opts: AddrInfoOptions)

    Applies the options to self.

    +
    source

    pub fn apply_options(&mut self, opts: AddrInfoOptions)

    Applies the options to self.

    This is used to more tightly control the information stored in a NodeAddr received from another API. E.g. to ensure a discovery service is used the AddrInfoOptions::Id] option could be used to remove all other addressing details.

    -

    pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

    Returns the direct addresses of this peer.

    -

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay url of this peer.

    -

    Trait Implementations§

    §

    impl Clone for NodeAddr

    §

    fn clone(&self) -> NodeAddr

    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 NodeAddr

    §

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

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for NodeAddr

    §

    fn deserialize<__D>( +

    source

    pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

    Returns the direct addresses of this peer.

    +
    source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay url of this peer.

    +

    Trait Implementations§

    source§

    impl Clone for NodeAddr

    source§

    fn clone(&self) -> NodeAddr

    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 NodeAddr

    source§

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

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

    impl<'de> Deserialize<'de> for NodeAddr

    source§

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

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

    impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

    §

    fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(info: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    §

    impl From<PublicKey> for NodeAddr

    §

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    §

    impl Ord for NodeAddr

    §

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

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

    fn max(self, other: Self) -> Self
    where + __D: Deserializer<'de>,

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

    impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

    source§

    fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(info: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl From<NodeInfo> for NodeAddr

    source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    source§

    impl From<PublicKey> for NodeAddr

    source§

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    source§

    impl Ord for NodeAddr

    source§

    fn cmp(&self, other: &NodeAddr) -> 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 NodeAddr

    §

    fn eq(&self, other: &NodeAddr) -> 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 NodeAddr

    source§

    fn eq(&self, other: &NodeAddr) -> 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 NodeAddr

    §

    fn partial_cmp(&self, other: &NodeAddr) -> 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 NodeAddr

    source§

    fn partial_cmp(&self, other: &NodeAddr) -> 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 NodeAddr

    §

    fn serialize<__S>( +operator. Read more

    source§

    impl Serialize for NodeAddr

    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 Eq for NodeAddr

    §

    impl StructuralPartialEq for NodeAddr

    Auto Trait Implementations§

    §

    impl Freeze for NodeAddr

    §

    impl RefUnwindSafe for NodeAddr

    §

    impl Send for NodeAddr

    §

    impl Sync for NodeAddr

    §

    impl Unpin for NodeAddr

    §

    impl UnwindSafe for NodeAddr

    Blanket Implementations§

    source§

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

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

    impl Eq for NodeAddr

    source§

    impl StructuralPartialEq for NodeAddr

    Auto Trait Implementations§

    §

    impl Freeze for NodeAddr

    §

    impl RefUnwindSafe for NodeAddr

    §

    impl Send for NodeAddr

    §

    impl Sync for NodeAddr

    §

    impl Unpin for NodeAddr

    §

    impl UnwindSafe for NodeAddr

    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/2612/docs/iroh_net/ticket/struct.NodeTicket.html b/pr/2612/docs/iroh_net/ticket/struct.NodeTicket.html index ef1326205f..47b88b4928 100644 --- a/pr/2612/docs/iroh_net/ticket/struct.NodeTicket.html +++ b/pr/2612/docs/iroh_net/ticket/struct.NodeTicket.html @@ -1,17 +1,17 @@ -NodeTicket in iroh_net::ticket - Rust

    Struct iroh_net::ticket::NodeTicket

    pub struct NodeTicket { /* private fields */ }
    Expand description

    A token containing everything to get a file from the provider.

    +NodeTicket in iroh_net::ticket - Rust

    Struct iroh_net::ticket::NodeTicket

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

    A token containing everything to get a file from the provider.

    It is a single item which can be easily serialized and deserialized.

    -

    Implementations§

    §

    impl NodeTicket

    pub fn new(node: NodeAddr) -> Result<NodeTicket, Error>

    Creates a new ticket.

    -

    pub fn node_addr(&self) -> &NodeAddr

    The NodeAddr of the provider for this ticket.

    -

    Trait Implementations§

    §

    impl Clone for NodeTicket

    §

    fn clone(&self) -> NodeTicket

    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 NodeTicket

    §

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

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for NodeTicket

    §

    fn deserialize<D>( +

    Implementations§

    source§

    impl NodeTicket

    source

    pub fn new(node: NodeAddr) -> Result<NodeTicket, Error>

    Creates a new ticket.

    +
    source

    pub fn node_addr(&self) -> &NodeAddr

    The NodeAddr of the provider for this ticket.

    +

    Trait Implementations§

    source§

    impl Clone for NodeTicket

    source§

    fn clone(&self) -> NodeTicket

    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 NodeTicket

    source§

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

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

    impl<'de> Deserialize<'de> for NodeTicket

    source§

    fn deserialize<D>( deserializer: D ) -> Result<NodeTicket, <D as Deserializer<'de>>::Error>
    where - D: Deserializer<'de>,

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

    impl Display for NodeTicket

    §

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

    Formats the value using the given formatter. Read more
    §

    impl FromStr for NodeTicket

    §

    type Err = Error

    The associated error which can be returned from parsing.
    §

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

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

    impl PartialEq for NodeTicket

    §

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

    This method tests for self and other values to be equal, and is used + D: Deserializer<'de>,

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

    impl Display for NodeTicket

    source§

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

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

    impl FromStr for NodeTicket

    §

    type Err = Error

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

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

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

    impl PartialEq for NodeTicket

    source§

    fn eq(&self, other: &NodeTicket) -> 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 Serialize for NodeTicket

    §

    fn serialize<S>( +sufficient, and should not be overridden without very good reason.

    source§

    impl Serialize for NodeTicket

    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 Ticket for NodeTicket

    §

    const KIND: &'static str = "node"

    String prefix describing the kind of iroh ticket. Read more
    §

    fn to_bytes(&self) -> Vec<u8> ⓘ

    Serialize to bytes used in the base32 string representation.
    §

    fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>

    Deserialize from the base32 string representation bytes.
    §

    fn serialize(&self) -> String

    Serialize to string.
    §

    fn deserialize(str: &str) -> Result<Self, Error>

    Deserialize from a string.
    §

    impl Eq for NodeTicket

    §

    impl StructuralPartialEq for NodeTicket

    Auto Trait Implementations§

    §

    impl Freeze for NodeTicket

    §

    impl RefUnwindSafe for NodeTicket

    §

    impl Send for NodeTicket

    §

    impl Sync for NodeTicket

    §

    impl Unpin for NodeTicket

    §

    impl UnwindSafe for NodeTicket

    Blanket Implementations§

    source§

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

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

    impl Ticket for NodeTicket

    source§

    const KIND: &'static str = "node"

    String prefix describing the kind of iroh ticket. Read more
    source§

    fn to_bytes(&self) -> Vec<u8> ⓘ

    Serialize to bytes used in the base32 string representation.
    source§

    fn from_bytes(bytes: &[u8]) -> Result<NodeTicket, Error>

    Deserialize from the base32 string representation bytes.
    source§

    fn serialize(&self) -> String

    Serialize to string.
    source§

    fn deserialize(str: &str) -> Result<Self, Error>

    Deserialize from a string.
    source§

    impl Eq for NodeTicket

    source§

    impl StructuralPartialEq for NodeTicket

    Auto Trait Implementations§

    §

    impl Freeze for NodeTicket

    §

    impl RefUnwindSafe for NodeTicket

    §

    impl Send for NodeTicket

    §

    impl Sync for NodeTicket

    §

    impl Unpin for NodeTicket

    §

    impl UnwindSafe for NodeTicket

    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/2612/docs/iroh_net/type.NodeId.html b/pr/2612/docs/iroh_net/type.NodeId.html index d4cef7e64d..b93dbe8899 100644 --- a/pr/2612/docs/iroh_net/type.NodeId.html +++ b/pr/2612/docs/iroh_net/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh_net - Rust

    Type Alias iroh_net::NodeId

    pub type NodeId = PublicKey;
    Expand description

    The identifier for a node in the (iroh) network.

    +NodeId in iroh_net - Rust

    Type Alias iroh_net::NodeId

    source ·
    pub type NodeId = PublicKey;
    Expand description

    The identifier for a node in the (iroh) network.

    Each node in iroh has a unique identifier created as a cryptographic key. This can be used to globally identify a node. Since it is also a cryptographic key it is also the mechanism by which all traffic is always encrypted for a specific node only.

    diff --git a/pr/2612/docs/iroh_net_bench/iroh/fn.client.html b/pr/2612/docs/iroh_net_bench/iroh/fn.client.html index 7d3ebeea9d..9476cd27b3 100644 --- a/pr/2612/docs/iroh_net_bench/iroh/fn.client.html +++ b/pr/2612/docs/iroh_net_bench/iroh/fn.client.html @@ -1,2 +1,2 @@ -client in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::client

    source ·
    pub async fn client(server_addr: NodeAddr, opt: Opt) -> Result<ClientStats>
    Expand description

    Create and run a client

    +client in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::client

    source ·
    pub async fn client(server_addr: NodeAddr, opt: Opt) -> Result<ClientStats>
    Expand description

    Create and run a client

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_net_bench/iroh/fn.connect_client.html b/pr/2612/docs/iroh_net_bench/iroh/fn.connect_client.html index 989176effa..34a684194f 100644 --- a/pr/2612/docs/iroh_net_bench/iroh/fn.connect_client.html +++ b/pr/2612/docs/iroh_net_bench/iroh/fn.connect_client.html @@ -1,5 +1,5 @@ connect_client in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::connect_client

    source ·
    pub async fn connect_client(
    -    server_addr: NodeAddr,
    +    server_addr: NodeAddr,
         opt: Opt
     ) -> Result<(Endpoint, Connection)>
    Expand description

    Create a client endpoint and client connection

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_net_bench/iroh/fn.server_endpoint.html b/pr/2612/docs/iroh_net_bench/iroh/fn.server_endpoint.html index 162c033071..5a293fecda 100644 --- a/pr/2612/docs/iroh_net_bench/iroh/fn.server_endpoint.html +++ b/pr/2612/docs/iroh_net_bench/iroh/fn.server_endpoint.html @@ -1,2 +1,2 @@ -server_endpoint in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::server_endpoint

    source ·
    pub fn server_endpoint(rt: &Runtime, opt: &Opt) -> (NodeAddr, Endpoint)
    Expand description

    Creates a server endpoint which runs on the given runtime

    +server_endpoint in iroh_net_bench::iroh - Rust

    Function iroh_net_bench::iroh::server_endpoint

    source ·
    pub fn server_endpoint(rt: &Runtime, opt: &Opt) -> (NodeAddr, Endpoint)
    Expand description

    Creates a server endpoint which runs on the given runtime

    \ No newline at end of file diff --git a/pr/2612/docs/iroh_relay/struct.Config.html b/pr/2612/docs/iroh_relay/struct.Config.html index f1c8e5e550..9b70c6042a 100644 --- a/pr/2612/docs/iroh_relay/struct.Config.html +++ b/pr/2612/docs/iroh_relay/struct.Config.html @@ -1,5 +1,5 @@ Config in iroh_relay - Rust

    Struct iroh_relay::Config

    source ·
    pub(crate) struct Config {
    -    pub(crate) secret_key: SecretKey,
    +    pub(crate) secret_key: SecretKey,
         pub(crate) enable_relay: bool,
         pub(crate) http_bind_addr: Option<SocketAddr>,
         pub(crate) tls: Option<TlsConfig>,
    @@ -10,7 +10,7 @@
         pub(crate) metrics_bind_addr: Option<SocketAddr>,
     }
    Expand description

    Configuration for the relay-server.

    This is (de)serialised to/from a TOML config file.

    -

    Fields§

    §secret_key: SecretKey

    The iroh [SecretKey] for this relay server.

    +

    Fields§

    §secret_key: SecretKey

    The iroh SecretKey for this relay server.

    If not specified a new key will be generated and the config file will be re-written using it.

    §enable_relay: bool

    Whether to enable the Relay server.

    diff --git a/pr/2612/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html b/pr/2612/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html index 7377998f08..791d42e54f 100644 --- a/pr/2612/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html +++ b/pr/2612/docs/src/iroh_net/discovery/local_swarm_discovery.rs.html @@ -536,7 +536,7 @@ .map(|(ipaddr, port)| SocketAddr::new(*ipaddr, *port)) .collect(); sender - .send(NodeAddr::from_parts(public_key.clone().into(), None, addrs)) + .send(NodeAddr::from_parts(*public_key, None, addrs)) .await .ok(); } diff --git a/pr/2612/docs/trait.impl/iroh_base/ticket/trait.Ticket.js b/pr/2612/docs/trait.impl/iroh_base/ticket/trait.Ticket.js index 12fa1e3ee5..5d209fabd2 100644 --- a/pr/2612/docs/trait.impl/iroh_base/ticket/trait.Ticket.js +++ b/pr/2612/docs/trait.impl/iroh_base/ticket/trait.Ticket.js @@ -1,5 +1,5 @@ (function() {var implementors = { "iroh":[], "iroh_base":[], -"iroh_docs":[["impl Ticket for DocTicket"]] +"iroh_docs":[["impl Ticket for DocTicket"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/pr/2612/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2612/docs/trait.impl/iroh_metrics/core/trait.Metric.js index 8902586109..b6339d8222 100644 --- a/pr/2612/docs/trait.impl/iroh_metrics/core/trait.Metric.js +++ b/pr/2612/docs/trait.impl/iroh_metrics/core/trait.Metric.js @@ -1,8 +1,8 @@ (function() {var implementors = { "iroh":[["impl Metric for Metrics"]], -"iroh_blobs":[["impl Metric for Metrics"]], +"iroh_blobs":[["impl Metric for Metrics"]], "iroh_dns_server":[["impl Metric for Metrics"]], -"iroh_docs":[["impl Metric for Metrics"]], +"iroh_docs":[["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"]] diff --git a/pr/2612/docs/type.impl/iroh_net/key/struct.PublicKey.js b/pr/2612/docs/type.impl/iroh_net/key/struct.PublicKey.js index bbff1af8fe..2fcaac350a 100644 --- a/pr/2612/docs/type.impl/iroh_net/key/struct.PublicKey.js +++ b/pr/2612/docs/type.impl/iroh_net/key/struct.PublicKey.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"iroh_net":[["
    §

    impl AsRef<[u8]> for PublicKey

    §

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

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[u8]>","iroh_net::NodeId"],["
    §

    impl Clone for PublicKey

    §

    fn clone(&self) -> PublicKey

    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
    ","Clone","iroh_net::NodeId"],["
    §

    impl Debug for PublicKey

    §

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

    Formats the value using the given formatter. Read more
    ","Debug","iroh_net::NodeId"],["
    §

    impl<'de> Deserialize<'de> for PublicKey

    §

    fn deserialize<D>(\n deserializer: D\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh_net::NodeId"],["
    §

    impl Display for PublicKey

    §

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

    Formats the value using the given formatter. Read more
    ","Display","iroh_net::NodeId"],["
    §

    impl From<VerifyingKey> for PublicKey

    §

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    ","From","iroh_net::NodeId"],["
    §

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    §

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    §

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

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh_net::NodeId"],["
    §

    impl Hash for PublicKey

    §

    fn hash<H>(&self, state: &mut H)
    where\n 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\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh_net::NodeId"],["
    §

    impl Ord for PublicKey

    §

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

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

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

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

    fn min(self, other: Self) -> Self
    where\n 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\n Self: Sized + PartialOrd,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh_net::NodeId"],["
    §

    impl PartialEq for PublicKey

    §

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

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

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

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq","iroh_net::NodeId"],["
    §

    impl PartialOrd for PublicKey

    §

    fn partial_cmp(&self, other: &PublicKey) -> 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 <=\noperator. 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 >=\noperator. Read more
    ","PartialOrd","iroh_net::NodeId"],["
    §

    impl PublicKey

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

    Get this public key as a byte array.

    \n

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    \n
    §Warning
    \n

    This will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

    \n

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    \n
    §Return
    \n

    Returns Ok(()) if the signature is valid, and Err otherwise.

    \n

    pub fn fmt_short(&self) -> String

    Convert to a base32 string limited to the first 10 bytes for a friendly string\nrepresentation of the key.

    \n
    ",0,"iroh_net::NodeId"],["
    §

    impl Serialize for PublicKey

    §

    fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh_net::NodeId"],["
    §

    impl TryFrom<&[u8]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from(\n bytes: &[u8]\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8]>","iroh_net::NodeId"],["
    §

    impl TryFrom<&[u8; 32]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from(\n bytes: &[u8; 32]\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8; 32]>","iroh_net::NodeId"],["
    §

    impl Copy for PublicKey

    ","Copy","iroh_net::NodeId"],["
    §

    impl Eq for PublicKey

    ","Eq","iroh_net::NodeId"],["
    §

    impl StructuralPartialEq for PublicKey

    ","StructuralPartialEq","iroh_net::NodeId"]] +"iroh_net":[["
    source§

    impl AsRef<[u8]> for PublicKey

    source§

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

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[u8]>","iroh_net::NodeId"],["
    source§

    impl Clone for PublicKey

    source§

    fn clone(&self) -> PublicKey

    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
    ","Clone","iroh_net::NodeId"],["
    source§

    impl Debug for PublicKey

    source§

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

    Formats the value using the given formatter. Read more
    ","Debug","iroh_net::NodeId"],["
    source§

    impl<'de> Deserialize<'de> for PublicKey

    source§

    fn deserialize<D>(\n deserializer: D\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh_net::NodeId"],["
    source§

    impl Display for PublicKey

    source§

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

    Formats the value using the given formatter. Read more
    ","Display","iroh_net::NodeId"],["
    source§

    impl From<VerifyingKey> for PublicKey

    source§

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    ","From","iroh_net::NodeId"],["
    source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    §

    type Err = KeyParsingError

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

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

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh_net::NodeId"],["
    source§

    impl Hash for PublicKey

    source§

    fn hash<H>(&self, state: &mut H)
    where\n 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\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh_net::NodeId"],["
    source§

    impl Ord for PublicKey

    source§

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

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

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

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

    fn min(self, other: Self) -> Self
    where\n 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\n Self: Sized + PartialOrd,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh_net::NodeId"],["
    source§

    impl PartialEq for PublicKey

    source§

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

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

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

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq","iroh_net::NodeId"],["
    source§

    impl PartialOrd for PublicKey

    source§

    fn partial_cmp(&self, other: &PublicKey) -> 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 <=\noperator. 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 >=\noperator. Read more
    ","PartialOrd","iroh_net::NodeId"],["
    source§

    impl PublicKey

    source

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

    Get this public key as a byte array.

    \n
    source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    \n
    §Warning
    \n

    This will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

    \n
    source

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    \n
    §Return
    \n

    Returns Ok(()) if the signature is valid, and Err otherwise.

    \n
    source

    pub fn fmt_short(&self) -> String

    Convert to a base32 string limited to the first 10 bytes for a friendly string\nrepresentation of the key.

    \n
    ",0,"iroh_net::NodeId"],["
    source§

    impl Serialize for PublicKey

    source§

    fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh_net::NodeId"],["
    source§

    impl TryFrom<&[u8]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    source§

    fn try_from(\n bytes: &[u8]\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8]>","iroh_net::NodeId"],["
    source§

    impl TryFrom<&[u8; 32]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    source§

    fn try_from(\n bytes: &[u8; 32]\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8; 32]>","iroh_net::NodeId"],["
    source§

    impl Copy for PublicKey

    ","Copy","iroh_net::NodeId"],["
    source§

    impl Eq for PublicKey

    ","Eq","iroh_net::NodeId"],["
    source§

    impl StructuralPartialEq for PublicKey

    ","StructuralPartialEq","iroh_net::NodeId"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/pr/2612/docs/type.impl/std/primitive.array.js b/pr/2612/docs/type.impl/std/primitive.array.js index 3f9a615647..4d4303e493 100644 --- a/pr/2612/docs/type.impl/std/primitive.array.js +++ b/pr/2612/docs/type.impl/std/primitive.array.js @@ -1,4 +1,4 @@ (function() {var type_impls = { "iroh":[["
    source§

    impl<T, const N: usize> [T; N]

    1.55.0 · source

    pub fn map<F, U>(self, f: F) -> [U; N]
    where\n F: FnMut(T) -> U,

    Returns an array of the same size as self, with function f applied to each element\nin order.

    \n

    If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

    \n
    §Note on performance and stack usage
    \n

    Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

    \n

    Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

    \n

    In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

    \n
    §Examples
    \n
    let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
    \n
    source

    pub fn try_map<F, R>(\n self,\n f: F\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
    where\n F: FnMut(T) -> R,\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

    🔬This is a nightly-only experimental API. (array_try_map)

    A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

    \n

    The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

    \n
    §Examples
    \n
    #![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
    \n
    1.57.0 (const: 1.57.0) · source

    pub const fn as_slice(&self) -> &[T]

    Returns a slice containing the entire array. Equivalent to &s[..].

    \n
    1.57.0 · source

    pub fn as_mut_slice(&mut self) -> &mut [T]

    Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

    \n
    1.77.0 · source

    pub fn each_ref(&self) -> [&T; N]

    Borrows each element and returns an array of references with the same\nsize as self.

    \n
    §Example
    \n
    let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
    \n

    This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

    \n\n
    let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
    \n
    1.77.0 · source

    pub fn each_mut(&mut self) -> [&mut T; N]

    Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

    \n
    §Example
    \n
    \nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
    \n
    source

    pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one array reference into two at an index.

    \n

    The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
    \n
    source

    pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one mutable array reference into two at an index.

    \n

    The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
    \n
    source

    pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one array reference into two at an index from the end.

    \n

    The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
    \n
    source

    pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one mutable array reference into two at an index from the end.

    \n

    The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
    \n
    ",0,"iroh::docs::PeerIdBytes"],["
    source§

    impl<const N: usize> [u8; N]

    source

    pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

    \n
    §Examples
    \n
    #![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
    \n
    source

    pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

    \n
    §Safety
    \n

    Every byte in the array must be in 0..=127, or else this is UB.

    \n
    ",0,"iroh::docs::PeerIdBytes"],["
    §

    impl<T> Array for [T; 32]
    where\n T: Default,

    §

    type Item = T

    The type of the items in the thing.
    §

    const CAPACITY: usize = 32usize

    The number of slots in the thing.
    §

    fn as_slice(&self) -> &[T]

    Gives a shared slice over the whole thing. Read more
    §

    fn as_slice_mut(&mut self) -> &mut [T]

    Gives a unique slice over the whole thing. Read more
    §

    fn default() -> [T; 32]

    Create a default-initialized instance of ourself, similar to the\nDefault trait, but implemented for the same range of sizes as\n[Array].
    ","Array","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> Array for [T; N]

    §

    type Item = T

    The type of the array’s elements.
    §

    fn size() -> usize

    Returns the number of items the array can hold.
    ","Array","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize, T> AsBytes for [T; N]
    where\n T: AsBytes,

    §

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

    Gets the bytes of this value. Read more
    §

    fn write_to(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to bytes. Read more
    §

    fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to the prefix of bytes. Read more
    §

    fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to the suffix of bytes. Read more
    ","AsBytes","iroh::docs::PeerIdBytes"],["
    §

    impl AsBytes for [u8; 32]

    §

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

    Casts the input type to a byte slice
    ","AsBytes","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> AsMut<[T]> for [T; N]

    source§

    fn as_mut(&mut self) -> &mut [T]

    Converts this type into a mutable reference of the (usually inferred) input type.
    ","AsMut<[T]>","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> AsRef<[T]> for [T; N]

    source§

    fn as_ref(&self) -> &[T]

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[T]>","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> BitView for [T; N]
    where\n T: BitStore,

    Note that overly-large arrays may cause the conversions to fail.

    \n
    §

    type Store = T

    The underlying element type.
    §

    fn view_bits<O>(&self) -> &BitSlice<T, O>
    where\n O: BitOrder,

    Views a memory region as an immutable bit-slice.
    §

    fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
    where\n O: BitOrder,

    Attempts to view a memory region as an immutable bit-slice. Read more
    §

    fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O>
    where\n O: BitOrder,

    Views a memory region as a mutable bit-slice.
    §

    fn try_view_bits_mut<O>(\n &mut self\n) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
    where\n O: BitOrder,

    Attempts to view a memory region as a mutable bit-slice. Read more
    ","BitView","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> BitViewSized for [T; N]
    where\n T: BitStore,

    §

    const ZERO: [T; N] = _

    The zero constant.
    §

    fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]

    Views the type as a slice of its elements.
    §

    fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]

    Views the type as a mutable slice of its elements.
    §

    fn into_bitarray<O>(self) -> BitArray<Self, O>
    where\n O: BitOrder,

    Wraps self in a BitArray.
    ","BitViewSized","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T, const N: usize> Borrow<[T]> for [T; N]

    source§

    fn borrow(&self) -> &[T]

    Immutably borrows from an owned value. Read more
    ","Borrow<[T]>","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T, const N: usize> BorrowMut<[T]> for [T; N]

    source§

    fn borrow_mut(&mut self) -> &mut [T]

    Mutably borrows from an owned value. Read more
    ","BorrowMut<[T]>","iroh::docs::PeerIdBytes"],["
    §

    impl<S, const N: usize> Chain for [S; N]
    where\n S: Stream,

    §

    type Item = <S as Stream>::Item

    What’s the return type of our stream?
    §

    type Stream = Chain<S, N>

    What stream do we return?
    §

    fn chain(self) -> <[S; N] as Chain>::Stream

    Combine multiple streams into a single stream.
    ","Chain","iroh::docs::PeerIdBytes"],["
    1.58.0 · source§

    impl<T, const N: usize> Clone for [T; N]
    where\n T: Clone,

    source§

    fn clone(&self) -> [T; N]

    Returns a copy of the value. Read more
    source§

    fn clone_from(&mut self, other: &[T; N])

    Performs copy-assignment from source. Read more
    ","Clone","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Debug for [T; N]
    where\n T: Debug,

    source§

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

    Formats the value using the given formatter. Read more
    ","Debug","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize> Decode for [u8; N]

    Decodes a byte array from byte[n] as described in RFC4251 § 5:

    \n
    \n

    A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

    \n
    \n
    §

    type Error = Error

    Type returned in the event of a decoding error.
    §

    fn decode(reader: &mut impl Reader) -> Result<[u8; N], Error>

    Attempt to decode a value of this type using the provided [Reader].
    ","Decode","iroh::docs::PeerIdBytes"],["
    §

    impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
    where\n T: Decode<'a>,

    §

    fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
    where\n R: Reader<'a>,

    Attempt to decode this message using the provided [Reader].
    ","DecodeValue<'a>","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 32]
    where\n T: Default,

    source§

    fn default() -> [T; 32]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 31]
    where\n T: Default,

    source§

    fn default() -> [T; 31]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 30]
    where\n T: Default,

    source§

    fn default() -> [T; 30]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 29]
    where\n T: Default,

    source§

    fn default() -> [T; 29]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 28]
    where\n T: Default,

    source§

    fn default() -> [T; 28]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 27]
    where\n T: Default,

    source§

    fn default() -> [T; 27]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 26]
    where\n T: Default,

    source§

    fn default() -> [T; 26]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 25]
    where\n T: Default,

    source§

    fn default() -> [T; 25]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 24]
    where\n T: Default,

    source§

    fn default() -> [T; 24]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 23]
    where\n T: Default,

    source§

    fn default() -> [T; 23]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 22]
    where\n T: Default,

    source§

    fn default() -> [T; 22]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 21]
    where\n T: Default,

    source§

    fn default() -> [T; 21]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 20]
    where\n T: Default,

    source§

    fn default() -> [T; 20]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 19]
    where\n T: Default,

    source§

    fn default() -> [T; 19]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 18]
    where\n T: Default,

    source§

    fn default() -> [T; 18]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 17]
    where\n T: Default,

    source§

    fn default() -> [T; 17]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 16]
    where\n T: Default,

    source§

    fn default() -> [T; 16]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 15]
    where\n T: Default,

    source§

    fn default() -> [T; 15]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 14]
    where\n T: Default,

    source§

    fn default() -> [T; 14]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 13]
    where\n T: Default,

    source§

    fn default() -> [T; 13]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 12]
    where\n T: Default,

    source§

    fn default() -> [T; 12]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 11]
    where\n T: Default,

    source§

    fn default() -> [T; 11]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 10]
    where\n T: Default,

    source§

    fn default() -> [T; 10]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 9]
    where\n T: Default,

    source§

    fn default() -> [T; 9]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 8]
    where\n T: Default,

    source§

    fn default() -> [T; 8]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 7]
    where\n T: Default,

    source§

    fn default() -> [T; 7]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 6]
    where\n T: Default,

    source§

    fn default() -> [T; 6]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 5]
    where\n T: Default,

    source§

    fn default() -> [T; 5]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 4]
    where\n T: Default,

    source§

    fn default() -> [T; 4]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 3]
    where\n T: Default,

    source§

    fn default() -> [T; 3]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 2]
    where\n T: Default,

    source§

    fn default() -> [T; 2]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 1]
    where\n T: Default,

    source§

    fn default() -> [T; 1]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 0]

    source§

    fn default() -> [T; 0]

    Returns the “default value” for a type. Read more
    ","Default","iroh::docs::PeerIdBytes"],["
    source§

    impl<'de, T> Deserialize<'de> for [T; 32]
    where\n T: Deserialize<'de>,

    source§

    fn deserialize<D>(\n deserializer: D\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh::docs::PeerIdBytes"],["
    source§

    impl<'de, const N: usize> Deserialize<'de> for [u8; N]

    source§

    fn deserialize<D>(\n deserializer: D\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    ","Deserialize<'de>","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize> Encode for [u8; N]

    Encodes [u8; N] into byte[n] as described in RFC4251 § 5:

    \n
    \n

    A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

    \n
    \n
    §

    fn encoded_len(&self) -> Result<usize, Error>

    Get the length of this type encoded in bytes, prior to Base64 encoding.
    §

    fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode this value using the provided [Writer].
    §

    fn encoded_len_prefixed(&self) -> Result<usize, Error>

    Return the length of this type after encoding when prepended with a\nuint32 length prefix.
    §

    fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode this value, first prepending a uint32 length prefix\nset to [Encode::encoded_len].
    ","Encode","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> EncodeLabelSet for [T; N]
    where\n T: EncodeLabel,

    §

    fn encode(&self, encoder: LabelSetEncoder<'_>) -> Result<(), Error>

    Encode oneself into the given encoder.
    ","EncodeLabelSet","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> EncodeValue for [T; N]
    where\n T: Encode,

    §

    fn value_len(&self) -> Result<Length, Error>

    Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
    §

    fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
    §

    fn header(&self) -> Result<Header, Error>
    where\n Self: Tagged,

    Get the [Header] used to encode this value.
    ","EncodeValue","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 32]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 31]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 30]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 29]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 28]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 27]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 26]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 25]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 24]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 23]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 22]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 21]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 20]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 19]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 18]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 17]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 16]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 15]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 14]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 13]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 12]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 11]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 10]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 9]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 8]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 7]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 6]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 5]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 4]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 3]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 2]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 1]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 0]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 2048]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 1024]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 512]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 256]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 128]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 64]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh::docs::PeerIdBytes"],["
    §

    impl<'a> FindToken<&'a u8> for [u8; 32]

    §

    fn find_token(&self, token: &u8) -> bool

    Returns true if self contains the token
    ","FindToken<&'a u8>","iroh::docs::PeerIdBytes"],["
    §

    impl FindToken<u8> for [u8; 32]

    §

    fn find_token(&self, token: u8) -> bool

    Returns true if self contains the token
    ","FindToken","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> FixedTag for [T; N]

    §

    const TAG: Tag = Tag::Sequence

    ASN.1 tag
    ","FixedTag","iroh::docs::PeerIdBytes"],["
    §

    impl From<&Signature> for [u8; 64]

    §

    fn from(sig: &Signature) -> [u8; 64]

    Converts to this type from the input type.
    ","From<&Signature>","iroh::docs::PeerIdBytes"],["
    source§

    impl From<AuthorId> for [u8; 32]

    source§

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

    Converts to this type from the input type.
    ","From","iroh::docs::PeerIdBytes"],["
    §

    impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

    §

    fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>\n) -> [T; 32]

    Converts to this type from the input type.
    ","From, B0>, B0>, B0>, B0>, B0>>>","iroh::docs::PeerIdBytes"],["
    source§

    impl From<Hash> for [u8; 32]

    source§

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

    Converts to this type from the input type.
    ","From","iroh::docs::PeerIdBytes"],["
    §

    impl From<Hash> for [u8; 32]

    §

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

    Converts to this type from the input type.
    ","From","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize, const UPPERCASE: bool> From<HexOrBin<N, UPPERCASE>> for [u8; N]

    §

    fn from(hex_or_bin: HexOrBin<N, UPPERCASE>) -> [u8; N]

    Converts to this type from the input type.
    ","From>","iroh::docs::PeerIdBytes"],["
    §

    impl From<MacAddr> for [u8; 6]

    §

    fn from(addr: MacAddr) -> [u8; 6]

    Converts to this type from the input type.
    ","From","iroh::docs::PeerIdBytes"],["
    source§

    impl From<NamespaceId> for [u8; 32]

    source§

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

    Converts to this type from the input type.
    ","From","iroh::docs::PeerIdBytes"],["
    §

    impl From<Signature> for [u8; 64]

    §

    fn from(sig: Signature) -> [u8; 64]

    Converts to this type from the input type.
    ","From","iroh::docs::PeerIdBytes"],["
    source§

    impl<T, const N: usize> From<Simd<T, N>> for [T; N]

    source§

    fn from(vector: Simd<T, N>) -> [T; N]

    Converts to this type from the input type.
    ","From>","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize, T> FromBytes for [T; N]
    where\n T: FromBytes,

    §

    fn ref_from(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the given bytes as a &Self without copying. Read more
    §

    fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the prefix of the given bytes as a &Self without copying. Read more
    §

    fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the suffix of the given bytes as a &Self without copying. Read more
    §

    fn slice_from(bytes: &[u8]) -> Option<&[Self]>
    where\n Self: Sized,

    Interprets the given bytes as a &[Self] without copying. Read more
    §

    fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
    where\n Self: Sized,

    Interprets the prefix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
    §

    fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
    where\n Self: Sized,

    Interprets the suffix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
    §

    fn read_from(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from bytes. Read more
    §

    fn read_from_prefix(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from the prefix of bytes. Read more
    §

    fn read_from_suffix(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from the suffix of bytes. Read more
    ","FromBytes","iroh::docs::PeerIdBytes"],["
    source§

    impl FromHex for [u8; 32]

    §

    type Error = FromHexError

    source§

    fn from_hex<T>(hex: T) -> Result<[u8; 32], <[u8; 32] as FromHex>::Error>
    where\n T: AsRef<[u8]>,

    Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
    ","FromHex","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize, T> FromZeroes for [T; N]
    where\n T: FromZeroes,

    §

    fn zero(&mut self)

    Overwrites self with zeroes. Read more
    §

    fn new_zeroed() -> Self
    where\n Self: Sized,

    Creates an instance of Self from zeroed bytes. Read more
    ","FromZeroes","iroh::docs::PeerIdBytes"],["
    §

    impl<T> Hash for [T; 32]
    where\n T: Hash,

    §

    fn hash<H>(&self, state: &mut H)
    where\n H: Hasher,

    Feeds this value into the given Hasher.
    §

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

    Feeds a slice of this type into the given Hasher.
    ","Hash","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Hash for [T; N]
    where\n T: Hash,

    The hash of an array is the same as that of the corresponding slice,\nas required by the Borrow implementation.

    \n\n
    use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet a: [u8; 3] = [0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(a), b.hash_one(s));
    \n
    source§

    fn hash<H>(&self, state: &mut H)
    where\n 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\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh::docs::PeerIdBytes"],["
    1.50.0 · source§

    impl<T, I, const N: usize> Index<I> for [T; N]
    where\n [T]: Index<I>,

    §

    type Output = <[T] as Index<I>>::Output

    The returned type after indexing.
    source§

    fn index(&self, index: I) -> &<[T; N] as Index<I>>::Output

    Performs the indexing (container[index]) operation. Read more
    ","Index","iroh::docs::PeerIdBytes"],["
    1.50.0 · source§

    impl<T, I, const N: usize> IndexMut<I> for [T; N]
    where\n [T]: IndexMut<I>,

    source§

    fn index_mut(&mut self, index: I) -> &mut <[T; N] as Index<I>>::Output

    Performs the mutable indexing (container[index]) operation. Read more
    ","IndexMut","iroh::docs::PeerIdBytes"],["
    §

    impl InputLength for [u8; 32]

    §

    fn input_len(&self) -> usize

    Calculates the input length, as indicated by its name,\nand the name of the trait itself
    ","InputLength","iroh::docs::PeerIdBytes"],["
    1.53.0 · source§

    impl<T, const N: usize> IntoIterator for [T; N]

    source§

    fn into_iter(self) -> <[T; N] as IntoIterator>::IntoIter

    Creates a consuming iterator, that is, one that moves each value out of\nthe array (from start to end). The array cannot be used after calling\nthis unless T implements Copy, so the whole array is copied.

    \n

    Arrays have special behavior when calling .into_iter() prior to the\n2021 edition – see the array Editions section for more information.

    \n
    §

    type Item = T

    The type of the elements being iterated over.
    §

    type IntoIter = IntoIter<T, N>

    Which kind of iterator are we turning this into?
    ","IntoIterator","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize> IntoResponse for [u8; N]

    §

    fn into_response(self) -> Response<Body>

    Create a response.
    ","IntoResponse","iroh::docs::PeerIdBytes"],["
    §

    impl<Fut, const N: usize> Join for [Fut; N]
    where\n Fut: IntoFuture,

    §

    type Output = [<Fut as IntoFuture>::Output; N]

    The resulting output type.
    §

    type Future = Join<<Fut as IntoFuture>::IntoFuture, N>

    The Future implementation returned by this method.
    §

    fn join(self) -> <[Fut; N] as Join>::Future

    Waits for multiple futures to complete. Read more
    ","Join","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize, T> Key for [T; N]
    where\n T: Key,

    §

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

    Compare data1 with data2
    ","Key","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> MaxSize for [T; N]
    where\n T: MaxSize,

    §

    const POSTCARD_MAX_SIZE: usize = _

    The maximum possible size that the serialization of this\ntype can have, in bytes.
    ","MaxSize","iroh::docs::PeerIdBytes"],["
    §

    impl<S, const N: usize> Merge for [S; N]
    where\n S: IntoStream,

    §

    type Item = <Merge<<S as IntoStream>::IntoStream, N> as Stream>::Item

    The resulting output type.
    §

    type Stream = Merge<<S as IntoStream>::IntoStream, N>

    The stream type.
    §

    fn merge(self) -> <[S; N] as Merge>::Stream

    Combine multiple streams into a single stream.
    ","Merge","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Ord for [T; N]
    where\n T: Ord,

    Implements comparison of arrays lexicographically.

    \n
    source§

    fn cmp(&self, other: &[T; N]) -> Ordering

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

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

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

    fn min(self, other: Self) -> Self
    where\n 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\n Self: Sized + PartialOrd,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &&[U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &&[U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<&[U]>","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &&mut [U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &&mut [U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<&mut [U]>","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &[U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &[U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<[U]>","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &[U; N]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &[U; N]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<[U; N]>","iroh::docs::PeerIdBytes"],["
    §

    impl PartialEq<Cookie> for [u8; 4]

    §

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

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

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

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq","iroh::docs::PeerIdBytes"],["
    §

    impl<A, B, const N: usize, const M: usize> PartialEq<Vec<A, N>> for [B; M]
    where\n A: PartialEq<B>,

    §

    fn eq(&self, other: &Vec<A, N>) -> bool

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

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

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq>","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> PartialOrd for [T; N]
    where\n T: PartialOrd,

    Implements comparison of arrays lexicographically.

    \n
    source§

    fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering>

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

    fn lt(&self, other: &[T; N]) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    source§

    fn le(&self, other: &[T; N]) -> bool

    This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
    source§

    fn ge(&self, other: &[T; N]) -> bool

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

    fn gt(&self, other: &[T; N]) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    ","PartialOrd","iroh::docs::PeerIdBytes"],["
    §

    impl<Fut, const N: usize> Race for [Fut; N]
    where\n Fut: IntoFuture,

    §

    type Output = <Fut as IntoFuture>::Output

    The resulting output type.
    §

    type Future = Race<<Fut as IntoFuture>::IntoFuture, N>

    Which kind of future are we turning this into?
    §

    fn race(self) -> <[Fut; N] as Race>::Future

    Wait for the first future to complete. Read more
    ","Race","iroh::docs::PeerIdBytes"],["
    §

    impl<Fut, T, E, const N: usize> RaceOk for [Fut; N]
    where\n Fut: IntoFuture<Output = Result<T, E>>,

    §

    type Output = T

    The resulting output type.
    §

    type Error = AggregateError<E, N>

    The resulting error type.
    §

    type Future = RaceOk<<Fut as IntoFuture>::IntoFuture, T, E, N>

    Which kind of future are we turning this into?
    §

    fn race_ok(self) -> <[Fut; N] as RaceOk>::Future

    Waits for the first successful future to complete.
    ","RaceOk","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> Schema for [T; N]
    where\n T: Schema,

    §

    const SCHEMA: &'static NamedType = _

    A recursive data structure that describes the schema of the given\ntype.
    ","Schema","iroh::docs::PeerIdBytes"],["
    source§

    impl<T> Serialize for [T; 32]
    where\n T: Serialize,

    source§

    fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh::docs::PeerIdBytes"],["
    source§

    impl<const N: usize> Serialize for [u8; N]

    source§

    fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    ","Serialize","iroh::docs::PeerIdBytes"],["
    1.51.0 · source§

    impl<T, const N: usize> SlicePattern for [T; N]

    §

    type Item = T

    🔬This is a nightly-only experimental API. (slice_pattern)
    The element type of the slice being matched on.
    source§

    fn as_slice(&self) -> &[<[T; N] as SlicePattern>::Item]

    🔬This is a nightly-only experimental API. (slice_pattern)
    Currently, the consumers of SlicePattern need a slice.
    ","SlicePattern","iroh::docs::PeerIdBytes"],["
    1.34.0 · source§

    impl<T, const N: usize> TryFrom<&[T]> for [T; N]
    where\n T: Copy,

    Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if\nslice.len() == N.

    \n\n
    let bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
    \n
    §

    type Error = TryFromSliceError

    The type returned in the event of a conversion error.
    source§

    fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError>

    Performs the conversion.
    ","TryFrom<&[T]>","iroh::docs::PeerIdBytes"],["
    1.59.0 · source§

    impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
    where\n T: Copy,

    Tries to create an array [T; N] by copying from a mutable slice &mut [T].\nSucceeds if slice.len() == N.

    \n\n
    let mut bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
    \n
    §

    type Error = TryFromSliceError

    The type returned in the event of a conversion error.
    source§

    fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError>

    Performs the conversion.
    ","TryFrom<&mut [T]>","iroh::docs::PeerIdBytes"],["
    §

    impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
    where\n A: Allocator,

    §

    fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

    Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

    \n
    §Examples
    \n
    assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
    \n

    If the length doesn’t match, the input comes back in Err:

    \n\n
    let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
    \n

    If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

    \n\n
    let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
    \n
    §

    type Error = Vec<T, A>

    The type returned in the event of a conversion error.
    ","TryFrom>","iroh::docs::PeerIdBytes"],["
    1.48.0 · source§

    impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
    where\n A: Allocator,

    source§

    fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

    Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

    \n
    §Examples
    \n
    assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
    \n

    If the length doesn’t match, the input comes back in Err:

    \n\n
    let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
    \n

    If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

    \n\n
    let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
    \n
    §

    type Error = Vec<T, A>

    The type returned in the event of a conversion error.
    ","TryFrom>","iroh::docs::PeerIdBytes"],["
    §

    impl<Fut, T, E, const N: usize> TryJoin for [Fut; N]
    where\n Fut: IntoFuture<Output = Result<T, E>>,

    §

    type Output = [T; N]

    The resulting output type.
    §

    type Error = E

    The resulting error type.
    §

    type Future = TryJoin<<Fut as IntoFuture>::IntoFuture, T, E, N>

    Which kind of future are we turning this into?
    §

    fn try_join(self) -> <[Fut; N] as TryJoin>::Future

    Waits for multiple futures to complete, either returning when all\nfutures complete successfully, or return early when any future completes\nwith an error.
    ","TryJoin","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize, T> Value for [T; N]
    where\n T: Value,

    §

    type SelfType<'a> = [<T as Value>::SelfType<'a>; N]\nwhere\n [T; N]: 'a

    SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
    §

    type AsBytes<'a> = Vec<u8>\nwhere\n [T; N]: 'a

    §

    fn fixed_width() -> Option<usize>

    Width of a fixed type, or None for variable width
    §

    fn from_bytes<'a>(data: &'a [u8]) -> [<T as Value>::SelfType<'a>; N]
    where\n [T; N]: 'a,

    Deserializes data\nImplementations may return a view over data, or an owned type
    §

    fn as_bytes<'a, 'b>(value: &'a <[T; N] as Value>::SelfType<'b>) -> Vec<u8> ⓘ
    where\n 'b: 'a,\n [T; N]: 'a + 'b,

    Serialize the value to a slice
    §

    fn type_name() -> TypeName

    Globally unique identifier for this type
    ","Value","iroh::docs::PeerIdBytes"],["
    §

    impl<T, const N: usize> ValueOrd for [T; N]
    where\n T: DerOrd,

    §

    fn value_cmp(&self, other: &[T; N]) -> Result<Ordering, Error>

    Return an Ordering between value portion of TLV-encoded self and\nother when serialized as ASN.1 DER.
    ","ValueOrd","iroh::docs::PeerIdBytes"],["
    §

    impl<Z, const N: usize> Zeroize for [Z; N]
    where\n Z: Zeroize,

    Impl [Zeroize] on arrays of types that impl [Zeroize].

    \n
    §

    fn zeroize(&mut self)

    Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
    ","Zeroize","iroh::docs::PeerIdBytes"],["
    §

    impl<S, const N: usize> Zip for [S; N]
    where\n S: IntoStream,

    §

    type Item = <Zip<<S as IntoStream>::IntoStream, N> as Stream>::Item

    What’s the return type of our stream?
    §

    type Stream = Zip<<S as IntoStream>::IntoStream, N>

    What stream do we return?
    §

    fn zip(self) -> <[S; N] as Zip>::Stream

    Combine multiple streams into a single stream.
    ","Zip","iroh::docs::PeerIdBytes"],["
    source§

    impl<T, const N: usize> ConstParamTy for [T; N]
    where\n T: ConstParamTy,

    ","ConstParamTy","iroh::docs::PeerIdBytes"],["
    1.58.0 · source§

    impl<T, const N: usize> Copy for [T; N]
    where\n T: Copy,

    ","Copy","iroh::docs::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Eq for [T; N]
    where\n T: Eq,

    ","Eq","iroh::docs::PeerIdBytes"],["
    source§

    impl<T, const N: usize> StructuralPartialEq for [T; N]

    ","StructuralPartialEq","iroh::docs::PeerIdBytes"],["
    §

    impl<const N: usize, T> Unaligned for [T; N]
    where\n T: Unaligned,

    ","Unaligned","iroh::docs::PeerIdBytes"],["
    §

    impl<Z, const N: usize> ZeroizeOnDrop for [Z; N]
    where\n Z: ZeroizeOnDrop,

    Impl [ZeroizeOnDrop] on arrays of types that impl [ZeroizeOnDrop].

    \n
    ","ZeroizeOnDrop","iroh::docs::PeerIdBytes"]], -"iroh_docs":[["
    source§

    impl<T, const N: usize> [T; N]

    1.55.0 · source

    pub fn map<F, U>(self, f: F) -> [U; N]
    where\n F: FnMut(T) -> U,

    Returns an array of the same size as self, with function f applied to each element\nin order.

    \n

    If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

    \n
    §Note on performance and stack usage
    \n

    Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

    \n

    Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

    \n

    In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

    \n
    §Examples
    \n
    let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
    \n
    source

    pub fn try_map<F, R>(\n self,\n f: F\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
    where\n F: FnMut(T) -> R,\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

    🔬This is a nightly-only experimental API. (array_try_map)

    A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

    \n

    The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

    \n
    §Examples
    \n
    #![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
    \n
    1.57.0 (const: 1.57.0) · source

    pub const fn as_slice(&self) -> &[T]

    Returns a slice containing the entire array. Equivalent to &s[..].

    \n
    1.57.0 · source

    pub fn as_mut_slice(&mut self) -> &mut [T]

    Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

    \n
    1.77.0 · source

    pub fn each_ref(&self) -> [&T; N]

    Borrows each element and returns an array of references with the same\nsize as self.

    \n
    §Example
    \n
    let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
    \n

    This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

    \n\n
    let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
    \n
    1.77.0 · source

    pub fn each_mut(&mut self) -> [&mut T; N]

    Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

    \n
    §Example
    \n
    \nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
    \n
    source

    pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one array reference into two at an index.

    \n

    The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
    \n
    source

    pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one mutable array reference into two at an index.

    \n

    The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
    \n
    source

    pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one array reference into two at an index from the end.

    \n

    The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
    \n
    source

    pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one mutable array reference into two at an index from the end.

    \n

    The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
    \n
    ",0,"iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<const N: usize> [u8; N]

    source

    pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

    \n
    §Examples
    \n
    #![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
    \n
    source

    pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

    \n
    §Safety
    \n

    Every byte in the array must be in 0..=127, or else this is UB.

    \n
    ",0,"iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T> Array for [T; 32]
    where\n T: Default,

    §

    type Item = T

    The type of the items in the thing.
    §

    const CAPACITY: usize = 32usize

    The number of slots in the thing.
    §

    fn as_slice(&self) -> &[T]

    Gives a shared slice over the whole thing. Read more
    §

    fn as_slice_mut(&mut self) -> &mut [T]

    Gives a unique slice over the whole thing. Read more
    §

    fn default() -> [T; 32]

    Create a default-initialized instance of ourself, similar to the\nDefault trait, but implemented for the same range of sizes as\n[Array].
    ","Array","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> Array for [T; N]

    §

    type Item = T

    The type of the array’s elements.
    §

    fn size() -> usize

    Returns the number of items the array can hold.
    ","Array","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> AsBytes for [T; N]
    where\n T: AsBytes,

    §

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

    Gets the bytes of this value. Read more
    §

    fn write_to(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to bytes. Read more
    §

    fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to the prefix of bytes. Read more
    §

    fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to the suffix of bytes. Read more
    ","AsBytes","iroh_docs::sync::PeerIdBytes"],["
    §

    impl AsBytes for [u8; 32]

    §

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

    Casts the input type to a byte slice
    ","AsBytes","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> AsMut<[T]> for [T; N]

    source§

    fn as_mut(&mut self) -> &mut [T]

    Converts this type into a mutable reference of the (usually inferred) input type.
    ","AsMut<[T]>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> AsRef<[T]> for [T; N]

    source§

    fn as_ref(&self) -> &[T]

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[T]>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> BitView for [T; N]
    where\n T: BitStore,

    Note that overly-large arrays may cause the conversions to fail.

    \n
    §

    type Store = T

    The underlying element type.
    §

    fn view_bits<O>(&self) -> &BitSlice<T, O>
    where\n O: BitOrder,

    Views a memory region as an immutable bit-slice.
    §

    fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
    where\n O: BitOrder,

    Attempts to view a memory region as an immutable bit-slice. Read more
    §

    fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O>
    where\n O: BitOrder,

    Views a memory region as a mutable bit-slice.
    §

    fn try_view_bits_mut<O>(\n &mut self\n) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
    where\n O: BitOrder,

    Attempts to view a memory region as a mutable bit-slice. Read more
    ","BitView","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> BitViewSized for [T; N]
    where\n T: BitStore,

    §

    const ZERO: [T; N] = _

    The zero constant.
    §

    fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]

    Views the type as a slice of its elements.
    §

    fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]

    Views the type as a mutable slice of its elements.
    §

    fn into_bitarray<O>(self) -> BitArray<Self, O>
    where\n O: BitOrder,

    Wraps self in a BitArray.
    ","BitViewSized","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T, const N: usize> Borrow<[T]> for [T; N]

    source§

    fn borrow(&self) -> &[T]

    Immutably borrows from an owned value. Read more
    ","Borrow<[T]>","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T, const N: usize> BorrowMut<[T]> for [T; N]

    source§

    fn borrow_mut(&mut self) -> &mut [T]

    Mutably borrows from an owned value. Read more
    ","BorrowMut<[T]>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<S, const N: usize> Chain for [S; N]
    where\n S: Stream,

    §

    type Item = <S as Stream>::Item

    What’s the return type of our stream?
    §

    type Stream = Chain<S, N>

    What stream do we return?
    §

    fn chain(self) -> <[S; N] as Chain>::Stream

    Combine multiple streams into a single stream.
    ","Chain","iroh_docs::sync::PeerIdBytes"],["
    1.58.0 · source§

    impl<T, const N: usize> Clone for [T; N]
    where\n T: Clone,

    source§

    fn clone(&self) -> [T; N]

    Returns a copy of the value. Read more
    source§

    fn clone_from(&mut self, other: &[T; N])

    Performs copy-assignment from source. Read more
    ","Clone","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Debug for [T; N]
    where\n T: Debug,

    source§

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

    Formats the value using the given formatter. Read more
    ","Debug","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize> Decode for [u8; N]

    Decodes a byte array from byte[n] as described in RFC4251 § 5:

    \n
    \n

    A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

    \n
    \n
    §

    type Error = Error

    Type returned in the event of a decoding error.
    §

    fn decode(reader: &mut impl Reader) -> Result<[u8; N], Error>

    Attempt to decode a value of this type using the provided [Reader].
    ","Decode","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
    where\n T: Decode<'a>,

    §

    fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
    where\n R: Reader<'a>,

    Attempt to decode this message using the provided [Reader].
    ","DecodeValue<'a>","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 32]
    where\n T: Default,

    source§

    fn default() -> [T; 32]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 31]
    where\n T: Default,

    source§

    fn default() -> [T; 31]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 30]
    where\n T: Default,

    source§

    fn default() -> [T; 30]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 29]
    where\n T: Default,

    source§

    fn default() -> [T; 29]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 28]
    where\n T: Default,

    source§

    fn default() -> [T; 28]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 27]
    where\n T: Default,

    source§

    fn default() -> [T; 27]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 26]
    where\n T: Default,

    source§

    fn default() -> [T; 26]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 25]
    where\n T: Default,

    source§

    fn default() -> [T; 25]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 24]
    where\n T: Default,

    source§

    fn default() -> [T; 24]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 23]
    where\n T: Default,

    source§

    fn default() -> [T; 23]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 22]
    where\n T: Default,

    source§

    fn default() -> [T; 22]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 21]
    where\n T: Default,

    source§

    fn default() -> [T; 21]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 20]
    where\n T: Default,

    source§

    fn default() -> [T; 20]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 19]
    where\n T: Default,

    source§

    fn default() -> [T; 19]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 18]
    where\n T: Default,

    source§

    fn default() -> [T; 18]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 17]
    where\n T: Default,

    source§

    fn default() -> [T; 17]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 16]
    where\n T: Default,

    source§

    fn default() -> [T; 16]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 15]
    where\n T: Default,

    source§

    fn default() -> [T; 15]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 14]
    where\n T: Default,

    source§

    fn default() -> [T; 14]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 13]
    where\n T: Default,

    source§

    fn default() -> [T; 13]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 12]
    where\n T: Default,

    source§

    fn default() -> [T; 12]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 11]
    where\n T: Default,

    source§

    fn default() -> [T; 11]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 10]
    where\n T: Default,

    source§

    fn default() -> [T; 10]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 9]
    where\n T: Default,

    source§

    fn default() -> [T; 9]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 8]
    where\n T: Default,

    source§

    fn default() -> [T; 8]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 7]
    where\n T: Default,

    source§

    fn default() -> [T; 7]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 6]
    where\n T: Default,

    source§

    fn default() -> [T; 6]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 5]
    where\n T: Default,

    source§

    fn default() -> [T; 5]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 4]
    where\n T: Default,

    source§

    fn default() -> [T; 4]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 3]
    where\n T: Default,

    source§

    fn default() -> [T; 3]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 2]
    where\n T: Default,

    source§

    fn default() -> [T; 2]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 1]
    where\n T: Default,

    source§

    fn default() -> [T; 1]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 0]

    source§

    fn default() -> [T; 0]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<'de, T> Deserialize<'de> for [T; 32]
    where\n T: Deserialize<'de>,

    source§

    fn deserialize<D>(\n deserializer: D\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<'de, const N: usize> Deserialize<'de> for [u8; N]

    source§

    fn deserialize<D>(\n deserializer: D\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    ","Deserialize<'de>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize> Encode for [u8; N]

    Encodes [u8; N] into byte[n] as described in RFC4251 § 5:

    \n
    \n

    A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

    \n
    \n
    §

    fn encoded_len(&self) -> Result<usize, Error>

    Get the length of this type encoded in bytes, prior to Base64 encoding.
    §

    fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode this value using the provided [Writer].
    §

    fn encoded_len_prefixed(&self) -> Result<usize, Error>

    Return the length of this type after encoding when prepended with a\nuint32 length prefix.
    §

    fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode this value, first prepending a uint32 length prefix\nset to [Encode::encoded_len].
    ","Encode","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> EncodeLabelSet for [T; N]
    where\n T: EncodeLabel,

    §

    fn encode(&self, encoder: LabelSetEncoder<'_>) -> Result<(), Error>

    Encode oneself into the given encoder.
    ","EncodeLabelSet","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> EncodeValue for [T; N]
    where\n T: Encode,

    §

    fn value_len(&self) -> Result<Length, Error>

    Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
    §

    fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
    §

    fn header(&self) -> Result<Header, Error>
    where\n Self: Tagged,

    Get the [Header] used to encode this value.
    ","EncodeValue","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 32]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 31]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 30]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 29]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 28]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 27]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 26]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 25]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 24]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 23]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 22]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 21]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 20]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 19]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 18]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 17]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 16]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 15]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 14]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 13]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 12]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 11]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 10]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 9]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 8]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 7]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 6]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 5]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 4]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 3]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 2]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 1]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 0]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 2048]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 1024]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 512]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 256]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 128]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 64]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<'a> FindToken<&'a u8> for [u8; 32]

    §

    fn find_token(&self, token: &u8) -> bool

    Returns true if self contains the token
    ","FindToken<&'a u8>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl FindToken<u8> for [u8; 32]

    §

    fn find_token(&self, token: u8) -> bool

    Returns true if self contains the token
    ","FindToken","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> FixedTag for [T; N]

    §

    const TAG: Tag = Tag::Sequence

    ASN.1 tag
    ","FixedTag","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<&Signature> for [u8; 64]

    §

    fn from(sig: &Signature) -> [u8; 64]

    Converts to this type from the input type.
    ","From<&Signature>","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl From<AuthorId> for [u8; 32]

    source§

    fn from(value: AuthorId) -> Self

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

    §

    fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>\n) -> [T; 32]

    Converts to this type from the input type.
    ","From, B0>, B0>, B0>, B0>, B0>>>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<Hash> for [u8; 32]

    §

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

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<Hash> for [u8; 32]

    §

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

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, const UPPERCASE: bool> From<HexOrBin<N, UPPERCASE>> for [u8; N]

    §

    fn from(hex_or_bin: HexOrBin<N, UPPERCASE>) -> [u8; N]

    Converts to this type from the input type.
    ","From>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<MacAddr> for [u8; 6]

    §

    fn from(addr: MacAddr) -> [u8; 6]

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl From<NamespaceId> for [u8; 32]

    source§

    fn from(value: NamespaceId) -> Self

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<Signature> for [u8; 64]

    §

    fn from(sig: Signature) -> [u8; 64]

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T, const N: usize> From<Simd<T, N>> for [T; N]

    source§

    fn from(vector: Simd<T, N>) -> [T; N]

    Converts to this type from the input type.
    ","From>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> FromBytes for [T; N]
    where\n T: FromBytes,

    §

    fn ref_from(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the given bytes as a &Self without copying. Read more
    §

    fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the prefix of the given bytes as a &Self without copying. Read more
    §

    fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the suffix of the given bytes as a &Self without copying. Read more
    §

    fn slice_from(bytes: &[u8]) -> Option<&[Self]>
    where\n Self: Sized,

    Interprets the given bytes as a &[Self] without copying. Read more
    §

    fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
    where\n Self: Sized,

    Interprets the prefix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
    §

    fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
    where\n Self: Sized,

    Interprets the suffix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
    §

    fn read_from(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from bytes. Read more
    §

    fn read_from_prefix(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from the prefix of bytes. Read more
    §

    fn read_from_suffix(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from the suffix of bytes. Read more
    ","FromBytes","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl FromHex for [u8; 32]

    §

    type Error = FromHexError

    source§

    fn from_hex<T>(hex: T) -> Result<[u8; 32], <[u8; 32] as FromHex>::Error>
    where\n T: AsRef<[u8]>,

    Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
    ","FromHex","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> FromZeroes for [T; N]
    where\n T: FromZeroes,

    §

    fn zero(&mut self)

    Overwrites self with zeroes. Read more
    §

    fn new_zeroed() -> Self
    where\n Self: Sized,

    Creates an instance of Self from zeroed bytes. Read more
    ","FromZeroes","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T> Hash for [T; 32]
    where\n T: Hash,

    §

    fn hash<H>(&self, state: &mut H)
    where\n H: Hasher,

    Feeds this value into the given Hasher.
    §

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

    Feeds a slice of this type into the given Hasher.
    ","Hash","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Hash for [T; N]
    where\n T: Hash,

    The hash of an array is the same as that of the corresponding slice,\nas required by the Borrow implementation.

    \n\n
    use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet a: [u8; 3] = [0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(a), b.hash_one(s));
    \n
    source§

    fn hash<H>(&self, state: &mut H)
    where\n 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\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh_docs::sync::PeerIdBytes"],["
    1.50.0 · source§

    impl<T, I, const N: usize> Index<I> for [T; N]
    where\n [T]: Index<I>,

    §

    type Output = <[T] as Index<I>>::Output

    The returned type after indexing.
    source§

    fn index(&self, index: I) -> &<[T; N] as Index<I>>::Output

    Performs the indexing (container[index]) operation. Read more
    ","Index","iroh_docs::sync::PeerIdBytes"],["
    1.50.0 · source§

    impl<T, I, const N: usize> IndexMut<I> for [T; N]
    where\n [T]: IndexMut<I>,

    source§

    fn index_mut(&mut self, index: I) -> &mut <[T; N] as Index<I>>::Output

    Performs the mutable indexing (container[index]) operation. Read more
    ","IndexMut","iroh_docs::sync::PeerIdBytes"],["
    §

    impl InputLength for [u8; 32]

    §

    fn input_len(&self) -> usize

    Calculates the input length, as indicated by its name,\nand the name of the trait itself
    ","InputLength","iroh_docs::sync::PeerIdBytes"],["
    1.53.0 · source§

    impl<T, const N: usize> IntoIterator for [T; N]

    source§

    fn into_iter(self) -> <[T; N] as IntoIterator>::IntoIter

    Creates a consuming iterator, that is, one that moves each value out of\nthe array (from start to end). The array cannot be used after calling\nthis unless T implements Copy, so the whole array is copied.

    \n

    Arrays have special behavior when calling .into_iter() prior to the\n2021 edition – see the array Editions section for more information.

    \n
    §

    type Item = T

    The type of the elements being iterated over.
    §

    type IntoIter = IntoIter<T, N>

    Which kind of iterator are we turning this into?
    ","IntoIterator","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize> IntoResponse for [u8; N]

    §

    fn into_response(self) -> Response<Body>

    Create a response.
    ","IntoResponse","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Fut, const N: usize> Join for [Fut; N]
    where\n Fut: IntoFuture,

    §

    type Output = [<Fut as IntoFuture>::Output; N]

    The resulting output type.
    §

    type Future = Join<<Fut as IntoFuture>::IntoFuture, N>

    The Future implementation returned by this method.
    §

    fn join(self) -> <[Fut; N] as Join>::Future

    Waits for multiple futures to complete. Read more
    ","Join","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> Key for [T; N]
    where\n T: Key,

    §

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

    Compare data1 with data2
    ","Key","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> MaxSize for [T; N]
    where\n T: MaxSize,

    §

    const POSTCARD_MAX_SIZE: usize = _

    The maximum possible size that the serialization of this\ntype can have, in bytes.
    ","MaxSize","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<S, const N: usize> Merge for [S; N]
    where\n S: IntoStream,

    §

    type Item = <Merge<<S as IntoStream>::IntoStream, N> as Stream>::Item

    The resulting output type.
    §

    type Stream = Merge<<S as IntoStream>::IntoStream, N>

    The stream type.
    §

    fn merge(self) -> <[S; N] as Merge>::Stream

    Combine multiple streams into a single stream.
    ","Merge","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Ord for [T; N]
    where\n T: Ord,

    Implements comparison of arrays lexicographically.

    \n
    source§

    fn cmp(&self, other: &[T; N]) -> Ordering

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

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

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

    fn min(self, other: Self) -> Self
    where\n 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\n Self: Sized + PartialOrd,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &&[U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &&[U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<&[U]>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &&mut [U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &&mut [U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<&mut [U]>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &[U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &[U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<[U]>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &[U; N]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &[U; N]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<[U; N]>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl PartialEq<Cookie> for [u8; 4]

    §

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

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

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

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<A, B, const N: usize, const M: usize> PartialEq<Vec<A, N>> for [B; M]
    where\n A: PartialEq<B>,

    §

    fn eq(&self, other: &Vec<A, N>) -> bool

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

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

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> PartialOrd for [T; N]
    where\n T: PartialOrd,

    Implements comparison of arrays lexicographically.

    \n
    source§

    fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering>

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

    fn lt(&self, other: &[T; N]) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    source§

    fn le(&self, other: &[T; N]) -> bool

    This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
    source§

    fn ge(&self, other: &[T; N]) -> bool

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

    fn gt(&self, other: &[T; N]) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    ","PartialOrd","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Fut, const N: usize> Race for [Fut; N]
    where\n Fut: IntoFuture,

    §

    type Output = <Fut as IntoFuture>::Output

    The resulting output type.
    §

    type Future = Race<<Fut as IntoFuture>::IntoFuture, N>

    Which kind of future are we turning this into?
    §

    fn race(self) -> <[Fut; N] as Race>::Future

    Wait for the first future to complete. Read more
    ","Race","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Fut, T, E, const N: usize> RaceOk for [Fut; N]
    where\n Fut: IntoFuture<Output = Result<T, E>>,

    §

    type Output = T

    The resulting output type.
    §

    type Error = AggregateError<E, N>

    The resulting error type.
    §

    type Future = RaceOk<<Fut as IntoFuture>::IntoFuture, T, E, N>

    Which kind of future are we turning this into?
    §

    fn race_ok(self) -> <[Fut; N] as RaceOk>::Future

    Waits for the first successful future to complete.
    ","RaceOk","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> Schema for [T; N]
    where\n T: Schema,

    §

    const SCHEMA: &'static NamedType = _

    A recursive data structure that describes the schema of the given\ntype.
    ","Schema","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Serialize for [T; 32]
    where\n T: Serialize,

    source§

    fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<const N: usize> Serialize for [u8; N]

    source§

    fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    ","Serialize","iroh_docs::sync::PeerIdBytes"],["
    1.51.0 · source§

    impl<T, const N: usize> SlicePattern for [T; N]

    §

    type Item = T

    🔬This is a nightly-only experimental API. (slice_pattern)
    The element type of the slice being matched on.
    source§

    fn as_slice(&self) -> &[<[T; N] as SlicePattern>::Item]

    🔬This is a nightly-only experimental API. (slice_pattern)
    Currently, the consumers of SlicePattern need a slice.
    ","SlicePattern","iroh_docs::sync::PeerIdBytes"],["
    1.34.0 · source§

    impl<T, const N: usize> TryFrom<&[T]> for [T; N]
    where\n T: Copy,

    Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if\nslice.len() == N.

    \n\n
    let bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
    \n
    §

    type Error = TryFromSliceError

    The type returned in the event of a conversion error.
    source§

    fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError>

    Performs the conversion.
    ","TryFrom<&[T]>","iroh_docs::sync::PeerIdBytes"],["
    1.59.0 · source§

    impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
    where\n T: Copy,

    Tries to create an array [T; N] by copying from a mutable slice &mut [T].\nSucceeds if slice.len() == N.

    \n\n
    let mut bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
    \n
    §

    type Error = TryFromSliceError

    The type returned in the event of a conversion error.
    source§

    fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError>

    Performs the conversion.
    ","TryFrom<&mut [T]>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
    where\n A: Allocator,

    §

    fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

    Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

    \n
    §Examples
    \n
    assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
    \n

    If the length doesn’t match, the input comes back in Err:

    \n\n
    let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
    \n

    If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

    \n\n
    let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
    \n
    §

    type Error = Vec<T, A>

    The type returned in the event of a conversion error.
    ","TryFrom>","iroh_docs::sync::PeerIdBytes"],["
    1.48.0 · source§

    impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
    where\n A: Allocator,

    source§

    fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

    Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

    \n
    §Examples
    \n
    assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
    \n

    If the length doesn’t match, the input comes back in Err:

    \n\n
    let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
    \n

    If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

    \n\n
    let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
    \n
    §

    type Error = Vec<T, A>

    The type returned in the event of a conversion error.
    ","TryFrom>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Fut, T, E, const N: usize> TryJoin for [Fut; N]
    where\n Fut: IntoFuture<Output = Result<T, E>>,

    §

    type Output = [T; N]

    The resulting output type.
    §

    type Error = E

    The resulting error type.
    §

    type Future = TryJoin<<Fut as IntoFuture>::IntoFuture, T, E, N>

    Which kind of future are we turning this into?
    §

    fn try_join(self) -> <[Fut; N] as TryJoin>::Future

    Waits for multiple futures to complete, either returning when all\nfutures complete successfully, or return early when any future completes\nwith an error.
    ","TryJoin","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> Value for [T; N]
    where\n T: Value,

    §

    type SelfType<'a> = [<T as Value>::SelfType<'a>; N]\nwhere\n [T; N]: 'a

    SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
    §

    type AsBytes<'a> = Vec<u8>\nwhere\n [T; N]: 'a

    §

    fn fixed_width() -> Option<usize>

    Width of a fixed type, or None for variable width
    §

    fn from_bytes<'a>(data: &'a [u8]) -> [<T as Value>::SelfType<'a>; N]
    where\n [T; N]: 'a,

    Deserializes data\nImplementations may return a view over data, or an owned type
    §

    fn as_bytes<'a, 'b>(value: &'a <[T; N] as Value>::SelfType<'b>) -> Vec<u8> ⓘ
    where\n 'b: 'a,\n [T; N]: 'a + 'b,

    Serialize the value to a slice
    §

    fn type_name() -> TypeName

    Globally unique identifier for this type
    ","Value","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> ValueOrd for [T; N]
    where\n T: DerOrd,

    §

    fn value_cmp(&self, other: &[T; N]) -> Result<Ordering, Error>

    Return an Ordering between value portion of TLV-encoded self and\nother when serialized as ASN.1 DER.
    ","ValueOrd","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Z, const N: usize> Zeroize for [Z; N]
    where\n Z: Zeroize,

    Impl [Zeroize] on arrays of types that impl [Zeroize].

    \n
    §

    fn zeroize(&mut self)

    Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
    ","Zeroize","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<S, const N: usize> Zip for [S; N]
    where\n S: IntoStream,

    §

    type Item = <Zip<<S as IntoStream>::IntoStream, N> as Stream>::Item

    What’s the return type of our stream?
    §

    type Stream = Zip<<S as IntoStream>::IntoStream, N>

    What stream do we return?
    §

    fn zip(self) -> <[S; N] as Zip>::Stream

    Combine multiple streams into a single stream.
    ","Zip","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T, const N: usize> ConstParamTy for [T; N]
    where\n T: ConstParamTy,

    ","ConstParamTy","iroh_docs::sync::PeerIdBytes"],["
    1.58.0 · source§

    impl<T, const N: usize> Copy for [T; N]
    where\n T: Copy,

    ","Copy","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Eq for [T; N]
    where\n T: Eq,

    ","Eq","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T, const N: usize> StructuralPartialEq for [T; N]

    ","StructuralPartialEq","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> Unaligned for [T; N]
    where\n T: Unaligned,

    ","Unaligned","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Z, const N: usize> ZeroizeOnDrop for [Z; N]
    where\n Z: ZeroizeOnDrop,

    Impl [ZeroizeOnDrop] on arrays of types that impl [ZeroizeOnDrop].

    \n
    ","ZeroizeOnDrop","iroh_docs::sync::PeerIdBytes"]] +"iroh_docs":[["
    source§

    impl<T, const N: usize> [T; N]

    1.55.0 · source

    pub fn map<F, U>(self, f: F) -> [U; N]
    where\n F: FnMut(T) -> U,

    Returns an array of the same size as self, with function f applied to each element\nin order.

    \n

    If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

    \n
    §Note on performance and stack usage
    \n

    Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

    \n

    Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

    \n

    In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

    \n
    §Examples
    \n
    let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
    \n
    source

    pub fn try_map<F, R>(\n self,\n f: F\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
    where\n F: FnMut(T) -> R,\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

    🔬This is a nightly-only experimental API. (array_try_map)

    A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

    \n

    The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

    \n
    §Examples
    \n
    #![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
    \n
    1.57.0 (const: 1.57.0) · source

    pub const fn as_slice(&self) -> &[T]

    Returns a slice containing the entire array. Equivalent to &s[..].

    \n
    1.57.0 · source

    pub fn as_mut_slice(&mut self) -> &mut [T]

    Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

    \n
    1.77.0 · source

    pub fn each_ref(&self) -> [&T; N]

    Borrows each element and returns an array of references with the same\nsize as self.

    \n
    §Example
    \n
    let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
    \n

    This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

    \n\n
    let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
    \n
    1.77.0 · source

    pub fn each_mut(&mut self) -> [&mut T; N]

    Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

    \n
    §Example
    \n
    \nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
    \n
    source

    pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one array reference into two at an index.

    \n

    The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
    \n
    source

    pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one mutable array reference into two at an index.

    \n

    The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
    \n
    source

    pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one array reference into two at an index from the end.

    \n

    The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
    \n
    source

    pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

    🔬This is a nightly-only experimental API. (split_array)

    Divides one mutable array reference into two at an index from the end.

    \n

    The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

    \n
    §Panics
    \n

    Panics if M > N.

    \n
    §Examples
    \n
    #![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
    \n
    ",0,"iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<const N: usize> [u8; N]

    source

    pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

    \n
    §Examples
    \n
    #![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
    \n
    source

    pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

    🔬This is a nightly-only experimental API. (ascii_char)

    Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

    \n
    §Safety
    \n

    Every byte in the array must be in 0..=127, or else this is UB.

    \n
    ",0,"iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T> Array for [T; 32]
    where\n T: Default,

    §

    type Item = T

    The type of the items in the thing.
    §

    const CAPACITY: usize = 32usize

    The number of slots in the thing.
    §

    fn as_slice(&self) -> &[T]

    Gives a shared slice over the whole thing. Read more
    §

    fn as_slice_mut(&mut self) -> &mut [T]

    Gives a unique slice over the whole thing. Read more
    §

    fn default() -> [T; 32]

    Create a default-initialized instance of ourself, similar to the\nDefault trait, but implemented for the same range of sizes as\n[Array].
    ","Array","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> Array for [T; N]

    §

    type Item = T

    The type of the array’s elements.
    §

    fn size() -> usize

    Returns the number of items the array can hold.
    ","Array","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> AsBytes for [T; N]
    where\n T: AsBytes,

    §

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

    Gets the bytes of this value. Read more
    §

    fn write_to(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to bytes. Read more
    §

    fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to the prefix of bytes. Read more
    §

    fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

    Writes a copy of self to the suffix of bytes. Read more
    ","AsBytes","iroh_docs::sync::PeerIdBytes"],["
    §

    impl AsBytes for [u8; 32]

    §

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

    Casts the input type to a byte slice
    ","AsBytes","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> AsMut<[T]> for [T; N]

    source§

    fn as_mut(&mut self) -> &mut [T]

    Converts this type into a mutable reference of the (usually inferred) input type.
    ","AsMut<[T]>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> AsRef<[T]> for [T; N]

    source§

    fn as_ref(&self) -> &[T]

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[T]>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> BitView for [T; N]
    where\n T: BitStore,

    Note that overly-large arrays may cause the conversions to fail.

    \n
    §

    type Store = T

    The underlying element type.
    §

    fn view_bits<O>(&self) -> &BitSlice<T, O>
    where\n O: BitOrder,

    Views a memory region as an immutable bit-slice.
    §

    fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
    where\n O: BitOrder,

    Attempts to view a memory region as an immutable bit-slice. Read more
    §

    fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O>
    where\n O: BitOrder,

    Views a memory region as a mutable bit-slice.
    §

    fn try_view_bits_mut<O>(\n &mut self\n) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
    where\n O: BitOrder,

    Attempts to view a memory region as a mutable bit-slice. Read more
    ","BitView","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> BitViewSized for [T; N]
    where\n T: BitStore,

    §

    const ZERO: [T; N] = _

    The zero constant.
    §

    fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]

    Views the type as a slice of its elements.
    §

    fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]

    Views the type as a mutable slice of its elements.
    §

    fn into_bitarray<O>(self) -> BitArray<Self, O>
    where\n O: BitOrder,

    Wraps self in a BitArray.
    ","BitViewSized","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T, const N: usize> Borrow<[T]> for [T; N]

    source§

    fn borrow(&self) -> &[T]

    Immutably borrows from an owned value. Read more
    ","Borrow<[T]>","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T, const N: usize> BorrowMut<[T]> for [T; N]

    source§

    fn borrow_mut(&mut self) -> &mut [T]

    Mutably borrows from an owned value. Read more
    ","BorrowMut<[T]>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<S, const N: usize> Chain for [S; N]
    where\n S: Stream,

    §

    type Item = <S as Stream>::Item

    What’s the return type of our stream?
    §

    type Stream = Chain<S, N>

    What stream do we return?
    §

    fn chain(self) -> <[S; N] as Chain>::Stream

    Combine multiple streams into a single stream.
    ","Chain","iroh_docs::sync::PeerIdBytes"],["
    1.58.0 · source§

    impl<T, const N: usize> Clone for [T; N]
    where\n T: Clone,

    source§

    fn clone(&self) -> [T; N]

    Returns a copy of the value. Read more
    source§

    fn clone_from(&mut self, other: &[T; N])

    Performs copy-assignment from source. Read more
    ","Clone","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Debug for [T; N]
    where\n T: Debug,

    source§

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

    Formats the value using the given formatter. Read more
    ","Debug","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize> Decode for [u8; N]

    Decodes a byte array from byte[n] as described in RFC4251 § 5:

    \n
    \n

    A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

    \n
    \n
    §

    type Error = Error

    Type returned in the event of a decoding error.
    §

    fn decode(reader: &mut impl Reader) -> Result<[u8; N], Error>

    Attempt to decode a value of this type using the provided [Reader].
    ","Decode","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
    where\n T: Decode<'a>,

    §

    fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
    where\n R: Reader<'a>,

    Attempt to decode this message using the provided [Reader].
    ","DecodeValue<'a>","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 32]
    where\n T: Default,

    source§

    fn default() -> [T; 32]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 31]
    where\n T: Default,

    source§

    fn default() -> [T; 31]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 30]
    where\n T: Default,

    source§

    fn default() -> [T; 30]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 29]
    where\n T: Default,

    source§

    fn default() -> [T; 29]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 28]
    where\n T: Default,

    source§

    fn default() -> [T; 28]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 27]
    where\n T: Default,

    source§

    fn default() -> [T; 27]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 26]
    where\n T: Default,

    source§

    fn default() -> [T; 26]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 25]
    where\n T: Default,

    source§

    fn default() -> [T; 25]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 24]
    where\n T: Default,

    source§

    fn default() -> [T; 24]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 23]
    where\n T: Default,

    source§

    fn default() -> [T; 23]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 22]
    where\n T: Default,

    source§

    fn default() -> [T; 22]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 21]
    where\n T: Default,

    source§

    fn default() -> [T; 21]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 20]
    where\n T: Default,

    source§

    fn default() -> [T; 20]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 19]
    where\n T: Default,

    source§

    fn default() -> [T; 19]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 18]
    where\n T: Default,

    source§

    fn default() -> [T; 18]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 17]
    where\n T: Default,

    source§

    fn default() -> [T; 17]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 16]
    where\n T: Default,

    source§

    fn default() -> [T; 16]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 15]
    where\n T: Default,

    source§

    fn default() -> [T; 15]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 14]
    where\n T: Default,

    source§

    fn default() -> [T; 14]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 13]
    where\n T: Default,

    source§

    fn default() -> [T; 13]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 12]
    where\n T: Default,

    source§

    fn default() -> [T; 12]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 11]
    where\n T: Default,

    source§

    fn default() -> [T; 11]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 10]
    where\n T: Default,

    source§

    fn default() -> [T; 10]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 9]
    where\n T: Default,

    source§

    fn default() -> [T; 9]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 8]
    where\n T: Default,

    source§

    fn default() -> [T; 8]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 7]
    where\n T: Default,

    source§

    fn default() -> [T; 7]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 6]
    where\n T: Default,

    source§

    fn default() -> [T; 6]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 5]
    where\n T: Default,

    source§

    fn default() -> [T; 5]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 4]
    where\n T: Default,

    source§

    fn default() -> [T; 4]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 3]
    where\n T: Default,

    source§

    fn default() -> [T; 3]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 2]
    where\n T: Default,

    source§

    fn default() -> [T; 2]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 1]
    where\n T: Default,

    source§

    fn default() -> [T; 1]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    1.4.0 · source§

    impl<T> Default for [T; 0]

    source§

    fn default() -> [T; 0]

    Returns the “default value” for a type. Read more
    ","Default","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<'de, T> Deserialize<'de> for [T; 32]
    where\n T: Deserialize<'de>,

    source§

    fn deserialize<D>(\n deserializer: D\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<'de, const N: usize> Deserialize<'de> for [u8; N]

    source§

    fn deserialize<D>(\n deserializer: D\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    ","Deserialize<'de>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize> Encode for [u8; N]

    Encodes [u8; N] into byte[n] as described in RFC4251 § 5:

    \n
    \n

    A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

    \n
    \n
    §

    fn encoded_len(&self) -> Result<usize, Error>

    Get the length of this type encoded in bytes, prior to Base64 encoding.
    §

    fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode this value using the provided [Writer].
    §

    fn encoded_len_prefixed(&self) -> Result<usize, Error>

    Return the length of this type after encoding when prepended with a\nuint32 length prefix.
    §

    fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode this value, first prepending a uint32 length prefix\nset to [Encode::encoded_len].
    ","Encode","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> EncodeLabelSet for [T; N]
    where\n T: EncodeLabel,

    §

    fn encode(&self, encoder: LabelSetEncoder<'_>) -> Result<(), Error>

    Encode oneself into the given encoder.
    ","EncodeLabelSet","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> EncodeValue for [T; N]
    where\n T: Encode,

    §

    fn value_len(&self) -> Result<Length, Error>

    Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
    §

    fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
    §

    fn header(&self) -> Result<Header, Error>
    where\n Self: Tagged,

    Get the [Header] used to encode this value.
    ","EncodeValue","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 32]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 31]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 30]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 29]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 28]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 27]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 26]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 25]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 24]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 23]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 22]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 21]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 20]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 19]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 18]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 17]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 16]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 15]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 14]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 13]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 12]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 11]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 10]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 9]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 8]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 7]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 6]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 5]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 4]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 3]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 2]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 1]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 0]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 2048]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 1024]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 512]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 256]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 128]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Fill for [T; 64]
    where\n [T]: Fill,

    source§

    fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
    where\n R: Rng + ?Sized,

    Fill self with random data
    ","Fill","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<'a> FindToken<&'a u8> for [u8; 32]

    §

    fn find_token(&self, token: &u8) -> bool

    Returns true if self contains the token
    ","FindToken<&'a u8>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl FindToken<u8> for [u8; 32]

    §

    fn find_token(&self, token: u8) -> bool

    Returns true if self contains the token
    ","FindToken","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> FixedTag for [T; N]

    §

    const TAG: Tag = Tag::Sequence

    ASN.1 tag
    ","FixedTag","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<&Signature> for [u8; 64]

    §

    fn from(sig: &Signature) -> [u8; 64]

    Converts to this type from the input type.
    ","From<&Signature>","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl From<AuthorId> for [u8; 32]

    source§

    fn from(value: AuthorId) -> Self

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

    §

    fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>\n) -> [T; 32]

    Converts to this type from the input type.
    ","From, B0>, B0>, B0>, B0>, B0>>>","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl From<Hash> for [u8; 32]

    source§

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

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<Hash> for [u8; 32]

    §

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

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, const UPPERCASE: bool> From<HexOrBin<N, UPPERCASE>> for [u8; N]

    §

    fn from(hex_or_bin: HexOrBin<N, UPPERCASE>) -> [u8; N]

    Converts to this type from the input type.
    ","From>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<MacAddr> for [u8; 6]

    §

    fn from(addr: MacAddr) -> [u8; 6]

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl From<NamespaceId> for [u8; 32]

    source§

    fn from(value: NamespaceId) -> Self

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    §

    impl From<Signature> for [u8; 64]

    §

    fn from(sig: Signature) -> [u8; 64]

    Converts to this type from the input type.
    ","From","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T, const N: usize> From<Simd<T, N>> for [T; N]

    source§

    fn from(vector: Simd<T, N>) -> [T; N]

    Converts to this type from the input type.
    ","From>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> FromBytes for [T; N]
    where\n T: FromBytes,

    §

    fn ref_from(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the given bytes as a &Self without copying. Read more
    §

    fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the prefix of the given bytes as a &Self without copying. Read more
    §

    fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>
    where\n Self: Sized,

    Interprets the suffix of the given bytes as a &Self without copying. Read more
    §

    fn slice_from(bytes: &[u8]) -> Option<&[Self]>
    where\n Self: Sized,

    Interprets the given bytes as a &[Self] without copying. Read more
    §

    fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>
    where\n Self: Sized,

    Interprets the prefix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
    §

    fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>
    where\n Self: Sized,

    Interprets the suffix of the given bytes as a &[Self] with length\nequal to count without copying. Read more
    §

    fn read_from(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from bytes. Read more
    §

    fn read_from_prefix(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from the prefix of bytes. Read more
    §

    fn read_from_suffix(bytes: &[u8]) -> Option<Self>
    where\n Self: Sized,

    Reads a copy of Self from the suffix of bytes. Read more
    ","FromBytes","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl FromHex for [u8; 32]

    §

    type Error = FromHexError

    source§

    fn from_hex<T>(hex: T) -> Result<[u8; 32], <[u8; 32] as FromHex>::Error>
    where\n T: AsRef<[u8]>,

    Creates an instance of type Self from the given hex string, or fails\nwith a custom error type. Read more
    ","FromHex","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> FromZeroes for [T; N]
    where\n T: FromZeroes,

    §

    fn zero(&mut self)

    Overwrites self with zeroes. Read more
    §

    fn new_zeroed() -> Self
    where\n Self: Sized,

    Creates an instance of Self from zeroed bytes. Read more
    ","FromZeroes","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T> Hash for [T; 32]
    where\n T: Hash,

    §

    fn hash<H>(&self, state: &mut H)
    where\n H: Hasher,

    Feeds this value into the given Hasher.
    §

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

    Feeds a slice of this type into the given Hasher.
    ","Hash","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Hash for [T; N]
    where\n T: Hash,

    The hash of an array is the same as that of the corresponding slice,\nas required by the Borrow implementation.

    \n\n
    use std::hash::BuildHasher;\n\nlet b = std::hash::RandomState::new();\nlet a: [u8; 3] = [0xa8, 0x3c, 0x09];\nlet s: &[u8] = &[0xa8, 0x3c, 0x09];\nassert_eq!(b.hash_one(a), b.hash_one(s));
    \n
    source§

    fn hash<H>(&self, state: &mut H)
    where\n 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\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh_docs::sync::PeerIdBytes"],["
    1.50.0 · source§

    impl<T, I, const N: usize> Index<I> for [T; N]
    where\n [T]: Index<I>,

    §

    type Output = <[T] as Index<I>>::Output

    The returned type after indexing.
    source§

    fn index(&self, index: I) -> &<[T; N] as Index<I>>::Output

    Performs the indexing (container[index]) operation. Read more
    ","Index","iroh_docs::sync::PeerIdBytes"],["
    1.50.0 · source§

    impl<T, I, const N: usize> IndexMut<I> for [T; N]
    where\n [T]: IndexMut<I>,

    source§

    fn index_mut(&mut self, index: I) -> &mut <[T; N] as Index<I>>::Output

    Performs the mutable indexing (container[index]) operation. Read more
    ","IndexMut","iroh_docs::sync::PeerIdBytes"],["
    §

    impl InputLength for [u8; 32]

    §

    fn input_len(&self) -> usize

    Calculates the input length, as indicated by its name,\nand the name of the trait itself
    ","InputLength","iroh_docs::sync::PeerIdBytes"],["
    1.53.0 · source§

    impl<T, const N: usize> IntoIterator for [T; N]

    source§

    fn into_iter(self) -> <[T; N] as IntoIterator>::IntoIter

    Creates a consuming iterator, that is, one that moves each value out of\nthe array (from start to end). The array cannot be used after calling\nthis unless T implements Copy, so the whole array is copied.

    \n

    Arrays have special behavior when calling .into_iter() prior to the\n2021 edition – see the array Editions section for more information.

    \n
    §

    type Item = T

    The type of the elements being iterated over.
    §

    type IntoIter = IntoIter<T, N>

    Which kind of iterator are we turning this into?
    ","IntoIterator","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize> IntoResponse for [u8; N]

    §

    fn into_response(self) -> Response<Body>

    Create a response.
    ","IntoResponse","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Fut, const N: usize> Join for [Fut; N]
    where\n Fut: IntoFuture,

    §

    type Output = [<Fut as IntoFuture>::Output; N]

    The resulting output type.
    §

    type Future = Join<<Fut as IntoFuture>::IntoFuture, N>

    The Future implementation returned by this method.
    §

    fn join(self) -> <[Fut; N] as Join>::Future

    Waits for multiple futures to complete. Read more
    ","Join","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> Key for [T; N]
    where\n T: Key,

    §

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

    Compare data1 with data2
    ","Key","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> MaxSize for [T; N]
    where\n T: MaxSize,

    §

    const POSTCARD_MAX_SIZE: usize = _

    The maximum possible size that the serialization of this\ntype can have, in bytes.
    ","MaxSize","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<S, const N: usize> Merge for [S; N]
    where\n S: IntoStream,

    §

    type Item = <Merge<<S as IntoStream>::IntoStream, N> as Stream>::Item

    The resulting output type.
    §

    type Stream = Merge<<S as IntoStream>::IntoStream, N>

    The stream type.
    §

    fn merge(self) -> <[S; N] as Merge>::Stream

    Combine multiple streams into a single stream.
    ","Merge","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Ord for [T; N]
    where\n T: Ord,

    Implements comparison of arrays lexicographically.

    \n
    source§

    fn cmp(&self, other: &[T; N]) -> Ordering

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

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

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

    fn min(self, other: Self) -> Self
    where\n 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\n Self: Sized + PartialOrd,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<&[U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &&[U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &&[U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<&[U]>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<&mut [U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &&mut [U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &&mut [U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<&mut [U]>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<[U]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &[U]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &[U]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<[U]>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, U, const N: usize> PartialEq<[U; N]> for [T; N]
    where\n T: PartialEq<U>,

    source§

    fn eq(&self, other: &[U; N]) -> bool

    This method tests for self and other values to be equal, and is used\nby ==.
    source§

    fn ne(&self, other: &[U; N]) -> bool

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq<[U; N]>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl PartialEq<Cookie> for [u8; 4]

    §

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

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

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

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<A, B, const N: usize, const M: usize> PartialEq<Vec<A, N>> for [B; M]
    where\n A: PartialEq<B>,

    §

    fn eq(&self, other: &Vec<A, N>) -> bool

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

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

    This method tests for !=. The default implementation is almost always\nsufficient, and should not be overridden without very good reason.
    ","PartialEq>","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> PartialOrd for [T; N]
    where\n T: PartialOrd,

    Implements comparison of arrays lexicographically.

    \n
    source§

    fn partial_cmp(&self, other: &[T; N]) -> Option<Ordering>

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

    fn lt(&self, other: &[T; N]) -> bool

    This method tests less than (for self and other) and is used by the < operator. Read more
    source§

    fn le(&self, other: &[T; N]) -> bool

    This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
    source§

    fn ge(&self, other: &[T; N]) -> bool

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

    fn gt(&self, other: &[T; N]) -> bool

    This method tests greater than (for self and other) and is used by the > operator. Read more
    ","PartialOrd","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Fut, const N: usize> Race for [Fut; N]
    where\n Fut: IntoFuture,

    §

    type Output = <Fut as IntoFuture>::Output

    The resulting output type.
    §

    type Future = Race<<Fut as IntoFuture>::IntoFuture, N>

    Which kind of future are we turning this into?
    §

    fn race(self) -> <[Fut; N] as Race>::Future

    Wait for the first future to complete. Read more
    ","Race","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Fut, T, E, const N: usize> RaceOk for [Fut; N]
    where\n Fut: IntoFuture<Output = Result<T, E>>,

    §

    type Output = T

    The resulting output type.
    §

    type Error = AggregateError<E, N>

    The resulting error type.
    §

    type Future = RaceOk<<Fut as IntoFuture>::IntoFuture, T, E, N>

    Which kind of future are we turning this into?
    §

    fn race_ok(self) -> <[Fut; N] as RaceOk>::Future

    Waits for the first successful future to complete.
    ","RaceOk","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> Schema for [T; N]
    where\n T: Schema,

    §

    const SCHEMA: &'static NamedType = _

    A recursive data structure that describes the schema of the given\ntype.
    ","Schema","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T> Serialize for [T; 32]
    where\n T: Serialize,

    source§

    fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<const N: usize> Serialize for [u8; N]

    source§

    fn serialize<S>(\n &self,\n serializer: S\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    ","Serialize","iroh_docs::sync::PeerIdBytes"],["
    1.51.0 · source§

    impl<T, const N: usize> SlicePattern for [T; N]

    §

    type Item = T

    🔬This is a nightly-only experimental API. (slice_pattern)
    The element type of the slice being matched on.
    source§

    fn as_slice(&self) -> &[<[T; N] as SlicePattern>::Item]

    🔬This is a nightly-only experimental API. (slice_pattern)
    Currently, the consumers of SlicePattern need a slice.
    ","SlicePattern","iroh_docs::sync::PeerIdBytes"],["
    1.34.0 · source§

    impl<T, const N: usize> TryFrom<&[T]> for [T; N]
    where\n T: Copy,

    Tries to create an array [T; N] by copying from a slice &[T]. Succeeds if\nslice.len() == N.

    \n\n
    let bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = bytes[1..3].try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
    \n
    §

    type Error = TryFromSliceError

    The type returned in the event of a conversion error.
    source§

    fn try_from(slice: &[T]) -> Result<[T; N], TryFromSliceError>

    Performs the conversion.
    ","TryFrom<&[T]>","iroh_docs::sync::PeerIdBytes"],["
    1.59.0 · source§

    impl<T, const N: usize> TryFrom<&mut [T]> for [T; N]
    where\n T: Copy,

    Tries to create an array [T; N] by copying from a mutable slice &mut [T].\nSucceeds if slice.len() == N.

    \n\n
    let mut bytes: [u8; 3] = [1, 0, 2];\n\nlet bytes_head: [u8; 2] = <[u8; 2]>::try_from(&mut bytes[0..2]).unwrap();\nassert_eq!(1, u16::from_le_bytes(bytes_head));\n\nlet bytes_tail: [u8; 2] = (&mut bytes[1..3]).try_into().unwrap();\nassert_eq!(512, u16::from_le_bytes(bytes_tail));
    \n
    §

    type Error = TryFromSliceError

    The type returned in the event of a conversion error.
    source§

    fn try_from(slice: &mut [T]) -> Result<[T; N], TryFromSliceError>

    Performs the conversion.
    ","TryFrom<&mut [T]>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
    where\n A: Allocator,

    §

    fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

    Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

    \n
    §Examples
    \n
    assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
    \n

    If the length doesn’t match, the input comes back in Err:

    \n\n
    let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
    \n

    If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

    \n\n
    let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
    \n
    §

    type Error = Vec<T, A>

    The type returned in the event of a conversion error.
    ","TryFrom>","iroh_docs::sync::PeerIdBytes"],["
    1.48.0 · source§

    impl<T, A, const N: usize> TryFrom<Vec<T, A>> for [T; N]
    where\n A: Allocator,

    source§

    fn try_from(vec: Vec<T, A>) -> Result<[T; N], Vec<T, A>>

    Gets the entire contents of the Vec<T> as an array,\nif its size exactly matches that of the requested array.

    \n
    §Examples
    \n
    assert_eq!(vec![1, 2, 3].try_into(), Ok([1, 2, 3]));\nassert_eq!(<Vec<i32>>::new().try_into(), Ok([]));
    \n

    If the length doesn’t match, the input comes back in Err:

    \n\n
    let r: Result<[i32; 4], _> = (0..10).collect::<Vec<_>>().try_into();\nassert_eq!(r, Err(vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]));
    \n

    If you’re fine with just getting a prefix of the Vec<T>,\nyou can call .truncate(N) first.

    \n\n
    let mut v = String::from(\"hello world\").into_bytes();\nv.sort();\nv.truncate(2);\nlet [a, b]: [_; 2] = v.try_into().unwrap();\nassert_eq!(a, b' ');\nassert_eq!(b, b'd');
    \n
    §

    type Error = Vec<T, A>

    The type returned in the event of a conversion error.
    ","TryFrom>","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Fut, T, E, const N: usize> TryJoin for [Fut; N]
    where\n Fut: IntoFuture<Output = Result<T, E>>,

    §

    type Output = [T; N]

    The resulting output type.
    §

    type Error = E

    The resulting error type.
    §

    type Future = TryJoin<<Fut as IntoFuture>::IntoFuture, T, E, N>

    Which kind of future are we turning this into?
    §

    fn try_join(self) -> <[Fut; N] as TryJoin>::Future

    Waits for multiple futures to complete, either returning when all\nfutures complete successfully, or return early when any future completes\nwith an error.
    ","TryJoin","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> Value for [T; N]
    where\n T: Value,

    §

    type SelfType<'a> = [<T as Value>::SelfType<'a>; N]\nwhere\n [T; N]: 'a

    SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
    §

    type AsBytes<'a> = Vec<u8>\nwhere\n [T; N]: 'a

    §

    fn fixed_width() -> Option<usize>

    Width of a fixed type, or None for variable width
    §

    fn from_bytes<'a>(data: &'a [u8]) -> [<T as Value>::SelfType<'a>; N]
    where\n [T; N]: 'a,

    Deserializes data\nImplementations may return a view over data, or an owned type
    §

    fn as_bytes<'a, 'b>(value: &'a <[T; N] as Value>::SelfType<'b>) -> Vec<u8> ⓘ
    where\n 'b: 'a,\n [T; N]: 'a + 'b,

    Serialize the value to a slice
    §

    fn type_name() -> TypeName

    Globally unique identifier for this type
    ","Value","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<T, const N: usize> ValueOrd for [T; N]
    where\n T: DerOrd,

    §

    fn value_cmp(&self, other: &[T; N]) -> Result<Ordering, Error>

    Return an Ordering between value portion of TLV-encoded self and\nother when serialized as ASN.1 DER.
    ","ValueOrd","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Z, const N: usize> Zeroize for [Z; N]
    where\n Z: Zeroize,

    Impl [Zeroize] on arrays of types that impl [Zeroize].

    \n
    §

    fn zeroize(&mut self)

    Zero out this object from memory using Rust intrinsics which ensure the\nzeroization operation is not “optimized away” by the compiler.
    ","Zeroize","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<S, const N: usize> Zip for [S; N]
    where\n S: IntoStream,

    §

    type Item = <Zip<<S as IntoStream>::IntoStream, N> as Stream>::Item

    What’s the return type of our stream?
    §

    type Stream = Zip<<S as IntoStream>::IntoStream, N>

    What stream do we return?
    §

    fn zip(self) -> <[S; N] as Zip>::Stream

    Combine multiple streams into a single stream.
    ","Zip","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T, const N: usize> ConstParamTy for [T; N]
    where\n T: ConstParamTy,

    ","ConstParamTy","iroh_docs::sync::PeerIdBytes"],["
    1.58.0 · source§

    impl<T, const N: usize> Copy for [T; N]
    where\n T: Copy,

    ","Copy","iroh_docs::sync::PeerIdBytes"],["
    1.0.0 · source§

    impl<T, const N: usize> Eq for [T; N]
    where\n T: Eq,

    ","Eq","iroh_docs::sync::PeerIdBytes"],["
    source§

    impl<T, const N: usize> StructuralPartialEq for [T; N]

    ","StructuralPartialEq","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<const N: usize, T> Unaligned for [T; N]
    where\n T: Unaligned,

    ","Unaligned","iroh_docs::sync::PeerIdBytes"],["
    §

    impl<Z, const N: usize> ZeroizeOnDrop for [Z; N]
    where\n Z: ZeroizeOnDrop,

    Impl [ZeroizeOnDrop] on arrays of types that impl [ZeroizeOnDrop].

    \n
    ","ZeroizeOnDrop","iroh_docs::sync::PeerIdBytes"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file