From d38eb7be256c1de0eafc6fd7255caebd152b9033 Mon Sep 17 00:00:00 2001 From: matheus23 Date: Fri, 26 Jul 2024 09:25:45 +0000 Subject: [PATCH] deploy: 04a647158448c032782f46e7f2fb6f7b4f3b0a78 --- .../docs/iroh/base/ticket/trait.Ticket.html | 2 +- .../docs/iroh/client/docs/enum.Origin.html | 10 +-- .../iroh/client/docs/enum.SyncReason.html | 10 +-- .../iroh/client/docs/struct.SyncEvent.html | 14 ++-- pr/2547/docs/iroh/docs/actor/index.html | 2 +- .../docs/iroh/docs/actor/struct.OpenOpts.html | 8 +-- .../iroh/docs/actor/struct.OpenState.html | 10 +-- .../iroh/docs/actor/struct.SyncHandle.html | 56 ++++++++-------- .../constant.MAX_TIMESTAMP_FUTURE_SHIFT.html | 2 +- .../engine/enum.DefaultAuthorStorage.html | 8 +-- .../docs/iroh/docs/engine/enum.LiveEvent.html | 10 +-- .../docs/iroh/docs/engine/enum.Origin.html | 10 +-- .../iroh/docs/engine/enum.SyncReason.html | 10 +-- .../engine/fn.entry_to_content_status.html | 2 +- pr/2547/docs/iroh/docs/engine/index.html | 2 +- .../docs/engine/struct.DefaultAuthor.html | 10 +-- .../docs/iroh/docs/engine/struct.Engine.html | 22 +++---- .../iroh/docs/engine/struct.SyncEvent.html | 14 ++-- pr/2547/docs/iroh/docs/enum.Capability.html | 18 +++--- .../docs/iroh/docs/enum.CapabilityError.html | 4 +- .../docs/iroh/docs/enum.CapabilityKind.html | 12 ++-- .../docs/iroh/docs/enum.ContentStatus.html | 10 +-- pr/2547/docs/iroh/docs/enum.Event.html | 4 +- pr/2547/docs/iroh/docs/enum.InsertError.html | 6 +- pr/2547/docs/iroh/docs/enum.InsertOrigin.html | 4 +- .../iroh/docs/enum.ValidationFailure.html | 4 +- pr/2547/docs/iroh/docs/index.html | 2 +- pr/2547/docs/iroh/docs/metrics/index.html | 2 +- .../iroh/docs/metrics/struct.Metrics.html | 4 +- .../iroh/docs/net/constant.DOCS_ALPN.html | 2 +- .../docs/iroh/docs/net/enum.AbortReason.html | 10 +-- .../docs/iroh/docs/net/enum.AcceptError.html | 8 +-- .../iroh/docs/net/enum.AcceptOutcome.html | 4 +- .../docs/iroh/docs/net/enum.ConnectError.html | 4 +- .../iroh/docs/net/fn.connect_and_sync.html | 2 +- .../iroh/docs/net/fn.handle_connection.html | 2 +- pr/2547/docs/iroh/docs/net/index.html | 2 +- .../iroh/docs/net/struct.SyncFinished.html | 4 +- .../docs/iroh/docs/net/struct.Timings.html | 4 +- .../iroh/docs/store/enum.AuthorFilter.html | 12 ++-- .../iroh/docs/store/enum.DownloadPolicy.html | 12 ++-- .../docs/iroh/docs/store/enum.FilterKind.html | 12 ++-- .../store/enum.ImportNamespaceOutcome.html | 4 +- .../docs/iroh/docs/store/enum.KeyFilter.html | 14 ++-- .../docs/iroh/docs/store/enum.OpenError.html | 4 +- pr/2547/docs/iroh/docs/store/enum.SortBy.html | 8 +-- .../iroh/docs/store/enum.SortDirection.html | 8 +-- pr/2547/docs/iroh/docs/store/fs/index.html | 2 +- .../fs/struct.ContentHashesIterator.html | 6 +- .../docs/store/fs/struct.LatestIterator.html | 4 +- .../docs/store/fs/struct.ParentIterator.html | 4 +- .../docs/store/fs/struct.RecordsRange.html | 4 +- .../docs/iroh/docs/store/fs/struct.Store.html | 64 +++++++++---------- .../docs/store/fs/struct.StoreInstance.html | 8 +-- pr/2547/docs/iroh/docs/store/index.html | 2 +- .../iroh/docs/store/struct.FlatQuery.html | 6 +- .../docs/store/struct.MemPublicKeyStore.html | 6 +- .../docs/iroh/docs/store/struct.Query.html | 22 +++---- .../iroh/docs/store/struct.QueryBuilder.html | 28 ++++---- .../store/struct.SingleLatestPerKeyQuery.html | 6 +- .../docs/iroh/docs/store/struct.Store.html | 64 +++++++++---------- .../docs/store/trait.DownloadPolicyStore.html | 10 +-- .../iroh/docs/store/trait.PublicKeyStore.html | 14 ++-- pr/2547/docs/iroh/docs/struct.Author.html | 20 +++--- .../docs/iroh/docs/struct.AuthorHeads.html | 28 ++++---- pr/2547/docs/iroh/docs/struct.AuthorId.html | 28 ++++---- .../iroh/docs/struct.AuthorPublicKey.html | 26 ++++---- pr/2547/docs/iroh/docs/struct.DocTicket.html | 10 +-- pr/2547/docs/iroh/docs/struct.Entry.html | 44 ++++++------- .../docs/iroh/docs/struct.EntrySignature.html | 14 ++-- .../docs/iroh/docs/struct.NamespaceId.html | 28 ++++---- .../iroh/docs/struct.NamespacePublicKey.html | 26 ++++---- .../iroh/docs/struct.NamespaceSecret.html | 22 +++---- pr/2547/docs/iroh/docs/struct.ReadOnly.html | 4 +- pr/2547/docs/iroh/docs/struct.Record.html | 32 +++++----- .../iroh/docs/struct.RecordIdentifier.html | 30 ++++----- pr/2547/docs/iroh/docs/struct.Replica.html | 34 +++++----- .../docs/iroh/docs/struct.ReplicaInfo.html | 24 +++---- .../docs/iroh/docs/struct.SignedEntry.html | 60 ++++++++--------- .../docs/iroh/docs/struct.SyncOutcome.html | 4 +- .../constant.MAX_TIMESTAMP_FUTURE_SHIFT.html | 2 +- .../docs/iroh/docs/sync/enum.Capability.html | 18 +++--- .../iroh/docs/sync/enum.CapabilityError.html | 4 +- .../iroh/docs/sync/enum.CapabilityKind.html | 12 ++-- .../iroh/docs/sync/enum.ContentStatus.html | 10 +-- pr/2547/docs/iroh/docs/sync/enum.Event.html | 4 +- .../docs/iroh/docs/sync/enum.InsertError.html | 6 +- .../iroh/docs/sync/enum.InsertOrigin.html | 4 +- .../docs/sync/enum.ValidationFailure.html | 4 +- pr/2547/docs/iroh/docs/sync/index.html | 2 +- .../iroh/docs/sync/struct.AuthorHeads.html | 28 ++++---- pr/2547/docs/iroh/docs/sync/struct.Entry.html | 44 ++++++------- .../iroh/docs/sync/struct.EntrySignature.html | 14 ++-- .../docs/iroh/docs/sync/struct.ReadOnly.html | 4 +- .../docs/iroh/docs/sync/struct.Record.html | 32 +++++----- .../docs/sync/struct.RecordIdentifier.html | 30 ++++----- .../docs/iroh/docs/sync/struct.Replica.html | 34 +++++----- .../iroh/docs/sync/struct.ReplicaInfo.html | 24 +++---- .../iroh/docs/sync/struct.SignedEntry.html | 60 ++++++++--------- .../iroh/docs/sync/struct.SyncOutcome.html | 4 +- .../docs/sync/type.ContentStatusCallback.html | 2 +- .../docs/iroh/docs/sync/type.PeerIdBytes.html | 2 +- .../iroh/docs/sync/type.ProtocolMessage.html | 6 +- .../iroh/docs/type.ContentStatusCallback.html | 2 +- pr/2547/docs/iroh/docs/type.PeerIdBytes.html | 2 +- .../docs/iroh/docs/type.ProtocolMessage.html | 6 +- .../iroh/node/docs/struct.DocsEngine.html | 10 +-- pr/2547/docs/type.impl/std/primitive.array.js | 2 +- 108 files changed, 722 insertions(+), 722 deletions(-) diff --git a/pr/2547/docs/iroh/base/ticket/trait.Ticket.html b/pr/2547/docs/iroh/base/ticket/trait.Ticket.html index a94e3e3a5d..1115d5444d 100644 --- a/pr/2547/docs/iroh/base/ticket/trait.Ticket.html +++ b/pr/2547/docs/iroh/base/ticket/trait.Ticket.html @@ -23,4 +23,4 @@ to the implementer. We recommend using

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

Deserialize from the base32 string representation bytes.

Provided Methods§

fn serialize(&self) -> String

Serialize to string.

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

Deserialize from a string.

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Ticket for DocTicket

source§

const KIND: &'static str = "doc"

§

impl Ticket for NodeTicket

§

const KIND: &'static str = "node"

§

impl Ticket for BlobTicket

§

const KIND: &'static str = "blob"

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementors§

§

impl Ticket for DocTicket

§

const KIND: &'static str = "doc"

§

impl Ticket for NodeTicket

§

const KIND: &'static str = "node"

§

impl Ticket for BlobTicket

§

const KIND: &'static str = "blob"

\ No newline at end of file diff --git a/pr/2547/docs/iroh/client/docs/enum.Origin.html b/pr/2547/docs/iroh/client/docs/enum.Origin.html index fc38c956e7..fbb686c86c 100644 --- a/pr/2547/docs/iroh/client/docs/enum.Origin.html +++ b/pr/2547/docs/iroh/client/docs/enum.Origin.html @@ -1,19 +1,19 @@ -Origin in iroh::client::docs - Rust

Enum iroh::client::docs::Origin

source ·
pub enum Origin {
+Origin in iroh::client::docs - Rust

Enum iroh::client::docs::Origin

pub enum Origin {
     Connect(SyncReason),
     Accept,
 }
Expand description

Why we performed a sync exchange

Variants§

§

Connect(SyncReason)

We initiated the exchange

§

Accept

A node connected to us and we accepted the exchange

-

Trait Implementations§

source§

impl Clone for Origin

source§

fn clone(&self) -> Origin

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 Origin

source§

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

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

impl<'de> Deserialize<'de> for Origin

Trait Implementations§

§

impl Clone for Origin

§

fn clone(&self) -> Origin

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 Origin

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Origin

§

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

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

impl PartialEq for Origin

source§

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

impl PartialEq for Origin

§

fn eq(&self, other: &Origin) -> 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.
source§

impl Serialize for Origin

source§

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

§

impl Serialize for Origin

§

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

impl Eq for Origin

source§

impl StructuralPartialEq for Origin

Auto Trait Implementations§

§

impl Freeze for Origin

§

impl RefUnwindSafe for Origin

§

impl Send for Origin

§

impl Sync for Origin

§

impl Unpin for Origin

§

impl UnwindSafe for Origin

Blanket Implementations§

source§

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

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

impl Eq for Origin

§

impl StructuralPartialEq for Origin

Auto Trait Implementations§

§

impl Freeze for Origin

§

impl RefUnwindSafe for Origin

§

impl Send for Origin

§

impl Sync for Origin

§

impl Unpin for Origin

§

impl UnwindSafe for Origin

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/2547/docs/iroh/client/docs/enum.SyncReason.html b/pr/2547/docs/iroh/client/docs/enum.SyncReason.html index 69d5fdf032..9094c588fa 100644 --- a/pr/2547/docs/iroh/client/docs/enum.SyncReason.html +++ b/pr/2547/docs/iroh/client/docs/enum.SyncReason.html @@ -1,4 +1,4 @@ -SyncReason in iroh::client::docs - Rust

Enum iroh::client::docs::SyncReason

source ·
pub enum SyncReason {
+SyncReason in iroh::client::docs - Rust

Enum iroh::client::docs::SyncReason

pub enum SyncReason {
     DirectJoin,
     NewNeighbor,
     SyncReport,
@@ -8,16 +8,16 @@
 
§

NewNeighbor

Peer showed up as new neighbor in the gossip swarm

§

SyncReport

We synced after receiving a sync report that indicated news for us

§

Resync

We received a sync report while a sync was running, so run again afterwars

-

Trait Implementations§

source§

impl Clone for SyncReason

source§

fn clone(&self) -> SyncReason

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 SyncReason

source§

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

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

impl<'de> Deserialize<'de> for SyncReason

Trait Implementations§

§

impl Clone for SyncReason

§

fn clone(&self) -> SyncReason

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 SyncReason

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SyncReason

§

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

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

impl PartialEq for SyncReason

source§

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

impl PartialEq for SyncReason

§

fn eq(&self, other: &SyncReason) -> 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.
source§

impl Serialize for SyncReason

source§

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

§

impl Serialize for SyncReason

§

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

impl Copy for SyncReason

source§

impl Eq for SyncReason

source§

impl StructuralPartialEq for SyncReason

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Copy for SyncReason

§

impl Eq for SyncReason

§

impl StructuralPartialEq for SyncReason

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/2547/docs/iroh/client/docs/struct.SyncEvent.html b/pr/2547/docs/iroh/client/docs/struct.SyncEvent.html index b13a4bb664..497bbb807c 100644 --- a/pr/2547/docs/iroh/client/docs/struct.SyncEvent.html +++ b/pr/2547/docs/iroh/client/docs/struct.SyncEvent.html @@ -1,25 +1,25 @@ -SyncEvent in iroh::client::docs - Rust

Struct iroh::client::docs::SyncEvent

source ·
pub struct SyncEvent {
+SyncEvent in iroh::client::docs - Rust

Struct iroh::client::docs::SyncEvent

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

Event emitted when a sync operation completes

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

-
§result: Result<SyncDetails, String>

Result of the sync operation

-

Trait Implementations§

source§

impl Clone for SyncEvent

source§

fn clone(&self) -> SyncEvent

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 SyncEvent

source§

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

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

impl<'de> Deserialize<'de> for SyncEvent

§result: Result<SyncDetails, String>

Result of the sync operation

+

Trait Implementations§

§

impl Clone for SyncEvent

§

fn clone(&self) -> SyncEvent

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 SyncEvent

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SyncEvent

§

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

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

impl PartialEq for SyncEvent

source§

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

impl PartialEq for SyncEvent

§

fn eq(&self, other: &SyncEvent) -> 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.
source§

impl Serialize for SyncEvent

source§

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

§

impl Serialize for SyncEvent

§

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

impl Eq for SyncEvent

source§

impl StructuralPartialEq for SyncEvent

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for SyncEvent

§

impl StructuralPartialEq for SyncEvent

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/2547/docs/iroh/docs/actor/index.html b/pr/2547/docs/iroh/docs/actor/index.html index d50ef48144..b15860b26d 100644 --- a/pr/2547/docs/iroh/docs/actor/index.html +++ b/pr/2547/docs/iroh/docs/actor/index.html @@ -1,2 +1,2 @@ -iroh::docs::actor - Rust

Module iroh::docs::actor

source ·
Expand description

This contains an actor spawned on a separate thread to process replica and store operations.

+iroh::docs::actor - Rust

Module iroh::docs::actor

Expand description

This contains an actor spawned on a separate thread to process replica and store operations.

Structs§

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/actor/struct.OpenOpts.html b/pr/2547/docs/iroh/docs/actor/struct.OpenOpts.html index f1b5a24196..db7d854ee6 100644 --- a/pr/2547/docs/iroh/docs/actor/struct.OpenOpts.html +++ b/pr/2547/docs/iroh/docs/actor/struct.OpenOpts.html @@ -1,12 +1,12 @@ -OpenOpts in iroh::docs::actor - Rust

Struct iroh::docs::actor::OpenOpts

source ·
pub struct OpenOpts {
+OpenOpts in iroh::docs::actor - Rust

Struct iroh::docs::actor::OpenOpts

pub struct OpenOpts {
     pub sync: bool,
     pub subscribe: Option<Sender<Event>>,
 }
Expand description

Options when opening a replica.

Fields§

§sync: bool

Set to true to set sync state to true.

§subscribe: Option<Sender<Event>>

Optionally subscribe to replica events.

-

Implementations§

source§

impl OpenOpts

source

pub fn sync(self) -> OpenOpts

Set sync state to true.

-
source

pub fn subscribe(self, subscribe: Sender<Event>) -> OpenOpts

Subscribe to replica events.

-

Trait Implementations§

source§

impl Debug for OpenOpts

source§

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

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

impl Default for OpenOpts

source§

fn default() -> OpenOpts

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

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Implementations§

§

impl OpenOpts

pub fn sync(self) -> OpenOpts

Set sync state to true.

+

pub fn subscribe(self, subscribe: Sender<Event>) -> OpenOpts

Subscribe to replica events.

+

Trait Implementations§

§

impl Debug for OpenOpts

§

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

Formats the value using the given formatter. Read more
§

impl Default for OpenOpts

§

fn default() -> OpenOpts

Returns the “default value” for a type. 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/2547/docs/iroh/docs/actor/struct.OpenState.html b/pr/2547/docs/iroh/docs/actor/struct.OpenState.html index 12a8f4ac16..6f6e95ace5 100644 --- a/pr/2547/docs/iroh/docs/actor/struct.OpenState.html +++ b/pr/2547/docs/iroh/docs/actor/struct.OpenState.html @@ -1,4 +1,4 @@ -OpenState in iroh::docs::actor - Rust

Struct iroh::docs::actor::OpenState

source ·
pub struct OpenState {
+OpenState in iroh::docs::actor - Rust

Struct iroh::docs::actor::OpenState

pub struct OpenState {
     pub sync: bool,
     pub subscribers: usize,
     pub handles: usize,
@@ -6,16 +6,16 @@
 

Fields§

§sync: bool

Whether to accept sync requests for this replica.

§subscribers: usize

How many event subscriptions are open

§handles: usize

By how many handles the replica is currently held open

-

Trait Implementations§

source§

impl Clone for OpenState

source§

fn clone(&self) -> OpenState

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 OpenState

source§

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

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

impl Default for OpenState

source§

fn default() -> OpenState

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

impl<'de> Deserialize<'de> for OpenState

Trait Implementations§

§

impl Clone for OpenState

§

fn clone(&self) -> OpenState

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 OpenState

§

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

Formats the value using the given formatter. Read more
§

impl Default for OpenState

§

fn default() -> OpenState

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

impl<'de> Deserialize<'de> for OpenState

§

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

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

impl PartialEq for OpenState

source§

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

impl PartialEq for OpenState

§

fn eq(&self, other: &OpenState) -> 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.
source§

impl Serialize for OpenState

source§

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

§

impl Serialize for OpenState

§

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

impl Copy for OpenState

source§

impl Eq for OpenState

source§

impl StructuralPartialEq for OpenState

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Copy for OpenState

§

impl Eq for OpenState

§

impl StructuralPartialEq for OpenState

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/2547/docs/iroh/docs/actor/struct.SyncHandle.html b/pr/2547/docs/iroh/docs/actor/struct.SyncHandle.html index 207314ebaa..27c8f1ad7a 100644 --- a/pr/2547/docs/iroh/docs/actor/struct.SyncHandle.html +++ b/pr/2547/docs/iroh/docs/actor/struct.SyncHandle.html @@ -1,5 +1,5 @@ -SyncHandle in iroh::docs::actor - Rust

Struct iroh::docs::actor::SyncHandle

source ·
pub struct SyncHandle {
-    tx: Sender<Action>,
+SyncHandle in iroh::docs::actor - Rust

Struct iroh::docs::actor::SyncHandle

pub struct SyncHandle {
+    tx: Sender<Action>,
     join_handle: Arc<Option<JoinHandle<()>>>,
 }
Expand description

The SyncHandle controls an actor thread which executes replica and store operations.

The SyncHandle exposes async methods which all send messages into the actor thread, usually @@ -11,109 +11,109 @@ To prevent this last drop from blocking the calling thread, you can call SyncHandle. This ensures that waiting for the actor to finish happens in an async context, and therefore that the final SyncHandle::drop will not block.

-

Fields§

§tx: Sender<Action>§join_handle: Arc<Option<JoinHandle<()>>>

Implementations§

source§

impl SyncHandle

source

pub fn spawn( +

Fields§

§tx: Sender<Action>§join_handle: Arc<Option<JoinHandle<()>>>

Implementations§

§

impl SyncHandle

pub fn spawn( store: Store, content_status_callback: Option<Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>>, me: String ) -> SyncHandle

Spawn a sync actor and return a handle.

-
source

pub async fn open( +

pub async fn open( &self, namespace: NamespaceId, opts: OpenOpts -) -> Result<(), Error>

source

pub async fn close(&self, namespace: NamespaceId) -> Result<bool, Error>

source

pub async fn subscribe( +) -> Result<(), Error>

pub async fn close(&self, namespace: NamespaceId) -> Result<bool, Error>

pub async fn subscribe( &self, namespace: NamespaceId, sender: Sender<Event> -) -> Result<(), Error>

source

pub async fn unsubscribe( +) -> Result<(), Error>

pub async fn unsubscribe( &self, namespace: NamespaceId, sender: Sender<Event> -) -> Result<(), Error>

source

pub async fn set_sync( +) -> Result<(), Error>

pub async fn set_sync( &self, namespace: NamespaceId, sync: bool -) -> Result<(), Error>

source

pub async fn insert_local( +) -> Result<(), Error>

pub async fn insert_local( &self, namespace: NamespaceId, author: AuthorId, key: Bytes, hash: Hash, len: u64 -) -> Result<(), Error>

source

pub async fn delete_prefix( +) -> Result<(), Error>

pub async fn delete_prefix( &self, namespace: NamespaceId, author: AuthorId, key: Bytes -) -> Result<usize, Error>

source

pub async fn insert_remote( +) -> Result<usize, Error>

pub async fn insert_remote( &self, namespace: NamespaceId, entry: SignedEntry, from: [u8; 32], content_status: ContentStatus -) -> Result<(), Error>

source

pub async fn sync_initial_message( +) -> Result<(), Error>

pub async fn sync_initial_message( &self, namespace: NamespaceId -) -> Result<Message<SignedEntry>, Error>

source

pub async fn sync_process_message( +) -> Result<Message<SignedEntry>, Error>

pub async fn sync_process_message( &self, namespace: NamespaceId, - message: Message<SignedEntry>, + message: Message<SignedEntry>, from: [u8; 32], state: SyncOutcome -) -> Result<(Option<Message<SignedEntry>>, SyncOutcome), Error>

source

pub async fn get_sync_peers( +) -> Result<(Option<Message<SignedEntry>>, SyncOutcome), Error>

pub async fn get_sync_peers( &self, namespace: NamespaceId -) -> Result<Option<Vec<[u8; 32]>>, Error>

source

pub async fn register_useful_peer( +) -> Result<Option<Vec<[u8; 32]>>, Error>

pub async fn register_useful_peer( &self, namespace: NamespaceId, peer: [u8; 32] -) -> Result<(), Error>

source

pub async fn has_news_for_us( +) -> Result<(), Error>

pub async fn has_news_for_us( &self, namespace: NamespaceId, heads: AuthorHeads -) -> Result<Option<NonZero<u64>>, Error>

source

pub async fn get_many( +) -> Result<Option<NonZero<u64>>, Error>

pub async fn get_many( &self, namespace: NamespaceId, query: Query, reply: Sender<Result<SignedEntry, Error>> -) -> Result<(), Error>

source

pub async fn get_exact( +) -> Result<(), Error>

pub async fn get_exact( &self, namespace: NamespaceId, author: AuthorId, key: Bytes, include_empty: bool -) -> Result<Option<SignedEntry>, Error>

source

pub async fn drop_replica(&self, namespace: NamespaceId) -> Result<(), Error>

source

pub async fn export_secret_key( +) -> Result<Option<SignedEntry>, Error>

pub async fn drop_replica(&self, namespace: NamespaceId) -> Result<(), Error>

pub async fn export_secret_key( &self, namespace: NamespaceId -) -> Result<NamespaceSecret, Error>

source

pub async fn get_state( +) -> Result<NamespaceSecret, Error>

pub async fn get_state( &self, namespace: NamespaceId -) -> Result<OpenState, Error>

source

pub async fn shutdown(&self) -> Result<Store, Error>

source

pub async fn list_authors( +) -> Result<OpenState, Error>

pub async fn shutdown(&self) -> Result<Store, Error>

pub async fn list_authors( &self, reply: Sender<Result<AuthorId, Error>> -) -> Result<(), Error>

source

pub async fn list_replicas( +) -> Result<(), Error>

pub async fn list_replicas( &self, reply: Sender<Result<(NamespaceId, CapabilityKind), Error>> -) -> Result<(), Error>

source

pub async fn import_author(&self, author: Author) -> Result<AuthorId, Error>

source

pub async fn export_author( +) -> Result<(), Error>

pub async fn import_author(&self, author: Author) -> Result<AuthorId, Error>

pub async fn export_author( &self, author: AuthorId -) -> Result<Option<Author>, Error>

source

pub async fn delete_author(&self, author: AuthorId) -> Result<(), Error>

source

pub async fn import_namespace( +) -> Result<Option<Author>, Error>

pub async fn delete_author(&self, author: AuthorId) -> Result<(), Error>

pub async fn import_namespace( &self, capability: Capability -) -> Result<NamespaceId, Error>

source

pub async fn get_download_policy( +) -> Result<NamespaceId, Error>

pub async fn get_download_policy( &self, namespace: NamespaceId -) -> Result<DownloadPolicy, Error>

source

pub async fn set_download_policy( +) -> Result<DownloadPolicy, Error>

pub async fn set_download_policy( &self, namespace: NamespaceId, policy: DownloadPolicy -) -> Result<(), Error>

source

pub async fn content_hashes(&self) -> Result<ContentHashesIterator, Error>

source

pub async fn flush_store(&self) -> Result<(), Error>

Makes sure that all pending database operations are persisted to disk.

+) -> Result<(), Error>

pub async fn content_hashes(&self) -> Result<ContentHashesIterator, Error>

pub async fn flush_store(&self) -> Result<(), Error>

Makes sure that all pending database operations are persisted to disk.

Otherwise, database operations are batched into bigger transactions for speed. Use this if you need to make sure something is written to the database before another operation, e.g. to make sure sudden process exits don’t corrupt your application state.

It’s not necessary to call this function before shutdown, as shutdown will trigger a flush on its own.

-

Trait Implementations§

source§

impl Clone for SyncHandle

source§

fn clone(&self) -> SyncHandle

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 SyncHandle

source§

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

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

impl Drop for SyncHandle

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for SyncHandle

§

fn clone(&self) -> SyncHandle

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 SyncHandle

§

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

Formats the value using the given formatter. Read more
§

impl Drop for SyncHandle

§

fn drop(&mut self)

Executes the destructor for this type. 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/2547/docs/iroh/docs/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html b/pr/2547/docs/iroh/docs/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html index 93c5559a7b..81ef7f1b68 100644 --- a/pr/2547/docs/iroh/docs/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html +++ b/pr/2547/docs/iroh/docs/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html @@ -1,3 +1,3 @@ -MAX_TIMESTAMP_FUTURE_SHIFT in iroh::docs - Rust

Constant iroh::docs::MAX_TIMESTAMP_FUTURE_SHIFT

source ·
pub const MAX_TIMESTAMP_FUTURE_SHIFT: u64 = _; // 600_000u64
Expand description

Max time in the future from our wall clock time that we accept entries for. +MAX_TIMESTAMP_FUTURE_SHIFT in iroh::docs - Rust

Constant iroh::docs::MAX_TIMESTAMP_FUTURE_SHIFT

pub const MAX_TIMESTAMP_FUTURE_SHIFT: u64 = _; // 600_000u64
Expand description

Max time in the future from our wall clock time that we accept entries for. Value is 10 minutes.

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/engine/enum.DefaultAuthorStorage.html b/pr/2547/docs/iroh/docs/engine/enum.DefaultAuthorStorage.html index 2208588181..61d33bc3d0 100644 --- a/pr/2547/docs/iroh/docs/engine/enum.DefaultAuthorStorage.html +++ b/pr/2547/docs/iroh/docs/engine/enum.DefaultAuthorStorage.html @@ -1,4 +1,4 @@ -DefaultAuthorStorage in iroh::docs::engine - Rust

Enum iroh::docs::engine::DefaultAuthorStorage

source ·
pub enum DefaultAuthorStorage {
+DefaultAuthorStorage in iroh::docs::engine - Rust

Enum iroh::docs::engine::DefaultAuthorStorage

pub enum DefaultAuthorStorage {
     Mem,
     Persistent(PathBuf),
 }
Expand description

Where to persist the default author.

@@ -8,12 +8,12 @@ engine. Changing the default author will not be persisted.

path (as base32 encoded string of the author’s public key).

Variants§

§

Mem

Memory storage.

§

Persistent(PathBuf)

File based persistent storage.

-

Implementations§

source§

impl DefaultAuthorStorage

source

pub async fn load(&self, docs_store: &SyncHandle) -> Result<AuthorId, Error>

Load the default author from the storage.

+

Implementations§

§

impl DefaultAuthorStorage

pub async fn load(&self, docs_store: &SyncHandle) -> Result<AuthorId, Error>

Load the default author from the storage.

Will create and save a new author if the storage is empty.

Returns an error if the author can’t be parsed or if the uathor does not exist in the docs store.

-
source

pub async fn persist(&self, author_id: AuthorId) -> Result<(), Error>

Save a new default author.

-

Trait Implementations§

source§

impl Debug for DefaultAuthorStorage

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 +

pub async fn persist(&self, author_id: AuthorId) -> Result<(), Error>

Save a new default author.

+

Trait Implementations§

§

impl Debug for DefaultAuthorStorage

§

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/2547/docs/iroh/docs/engine/enum.LiveEvent.html b/pr/2547/docs/iroh/docs/engine/enum.LiveEvent.html index f1a04dcbe3..e38d87cfc9 100644 --- a/pr/2547/docs/iroh/docs/engine/enum.LiveEvent.html +++ b/pr/2547/docs/iroh/docs/engine/enum.LiveEvent.html @@ -1,4 +1,4 @@ -LiveEvent in iroh::docs::engine - Rust

Enum iroh::docs::engine::LiveEvent

source ·
pub enum LiveEvent {
+LiveEvent in iroh::docs::engine - Rust

Enum iroh::docs::engine::LiveEvent

pub enum LiveEvent {
     InsertLocal {
         entry: Entry,
     },
@@ -32,16 +32,16 @@ blobs failed to download, this event will still be emitted after all operations
 
§

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<(), Error>

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

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

Trait Implementations§

§

impl Clone for LiveEvent

§

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
§

impl Debug for LiveEvent

§

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

Formats the value using the given formatter. Read more
§

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

§

fn deserialize<__D>( __deserializer: __D ) -> Result<LiveEvent, <__D as Deserializer<'de>>::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 From<Event> for LiveEvent

source§

fn from(ev: Event) -> LiveEvent

Converts to this type from the input type.
source§

impl From<LiveEvent> for LiveEvent

source§

fn from(event: LiveEvent) -> LiveEvent

Converts to this type from the input type.
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 + __D: Deserializer<'de>,

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

impl Display for LiveEvent

§

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

Formats the value using the given formatter. Read more
§

impl From<Event> for LiveEvent

§

fn from(ev: Event) -> LiveEvent

Converts to this type from the input type.
source§

impl From<LiveEvent> for LiveEvent

source§

fn from(event: LiveEvent) -> LiveEvent

Converts to this type from the input type.
§

impl PartialEq for LiveEvent

§

fn eq(&self, other: &LiveEvent) -> 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.
source§

impl Serialize for LiveEvent

source§

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

§

impl Serialize for LiveEvent

§

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

impl Eq for LiveEvent

source§

impl StructuralPartialEq for LiveEvent

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for LiveEvent

§

impl StructuralPartialEq for LiveEvent

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/2547/docs/iroh/docs/engine/enum.Origin.html b/pr/2547/docs/iroh/docs/engine/enum.Origin.html index 72184e31a9..443811d9d4 100644 --- a/pr/2547/docs/iroh/docs/engine/enum.Origin.html +++ b/pr/2547/docs/iroh/docs/engine/enum.Origin.html @@ -1,19 +1,19 @@ -Origin in iroh::docs::engine - Rust

Enum iroh::docs::engine::Origin

source ·
pub enum Origin {
+Origin in iroh::docs::engine - Rust

Enum iroh::docs::engine::Origin

pub enum Origin {
     Connect(SyncReason),
     Accept,
 }
Expand description

Why we performed a sync exchange

Variants§

§

Connect(SyncReason)

We initiated the exchange

§

Accept

A node connected to us and we accepted the exchange

-

Trait Implementations§

source§

impl Clone for Origin

source§

fn clone(&self) -> Origin

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 Origin

source§

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

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

impl<'de> Deserialize<'de> for Origin

Trait Implementations§

§

impl Clone for Origin

§

fn clone(&self) -> Origin

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 Origin

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Origin

§

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

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

impl PartialEq for Origin

source§

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

impl PartialEq for Origin

§

fn eq(&self, other: &Origin) -> 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.
source§

impl Serialize for Origin

source§

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

§

impl Serialize for Origin

§

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

impl Eq for Origin

source§

impl StructuralPartialEq for Origin

Auto Trait Implementations§

§

impl Freeze for Origin

§

impl RefUnwindSafe for Origin

§

impl Send for Origin

§

impl Sync for Origin

§

impl Unpin for Origin

§

impl UnwindSafe for Origin

Blanket Implementations§

source§

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

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

impl Eq for Origin

§

impl StructuralPartialEq for Origin

Auto Trait Implementations§

§

impl Freeze for Origin

§

impl RefUnwindSafe for Origin

§

impl Send for Origin

§

impl Sync for Origin

§

impl Unpin for Origin

§

impl UnwindSafe for Origin

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/2547/docs/iroh/docs/engine/enum.SyncReason.html b/pr/2547/docs/iroh/docs/engine/enum.SyncReason.html index e5d1687023..1ec64e2329 100644 --- a/pr/2547/docs/iroh/docs/engine/enum.SyncReason.html +++ b/pr/2547/docs/iroh/docs/engine/enum.SyncReason.html @@ -1,4 +1,4 @@ -SyncReason in iroh::docs::engine - Rust

Enum iroh::docs::engine::SyncReason

source ·
pub enum SyncReason {
+SyncReason in iroh::docs::engine - Rust

Enum iroh::docs::engine::SyncReason

pub enum SyncReason {
     DirectJoin,
     NewNeighbor,
     SyncReport,
@@ -8,16 +8,16 @@
 
§

NewNeighbor

Peer showed up as new neighbor in the gossip swarm

§

SyncReport

We synced after receiving a sync report that indicated news for us

§

Resync

We received a sync report while a sync was running, so run again afterwars

-

Trait Implementations§

source§

impl Clone for SyncReason

source§

fn clone(&self) -> SyncReason

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 SyncReason

source§

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

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

impl<'de> Deserialize<'de> for SyncReason

Trait Implementations§

§

impl Clone for SyncReason

§

fn clone(&self) -> SyncReason

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 SyncReason

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SyncReason

§

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

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

impl PartialEq for SyncReason

source§

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

impl PartialEq for SyncReason

§

fn eq(&self, other: &SyncReason) -> 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.
source§

impl Serialize for SyncReason

source§

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

§

impl Serialize for SyncReason

§

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

impl Copy for SyncReason

source§

impl Eq for SyncReason

source§

impl StructuralPartialEq for SyncReason

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Copy for SyncReason

§

impl Eq for SyncReason

§

impl StructuralPartialEq for SyncReason

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/2547/docs/iroh/docs/engine/fn.entry_to_content_status.html b/pr/2547/docs/iroh/docs/engine/fn.entry_to_content_status.html index 8513303d1d..bc22f1b005 100644 --- a/pr/2547/docs/iroh/docs/engine/fn.entry_to_content_status.html +++ b/pr/2547/docs/iroh/docs/engine/fn.entry_to_content_status.html @@ -1,4 +1,4 @@ -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_to_content_status in iroh::docs::engine - Rust

Function iroh::docs::engine::entry_to_content_status

pub fn entry_to_content_status(
     entry: Result<EntryStatus, Error>
 ) -> ContentStatus
Expand description

Converts an EntryStatus into a [‘ContentStatus’].

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/engine/index.html b/pr/2547/docs/iroh/docs/engine/index.html index 956434055b..00b93680e3 100644 --- a/pr/2547/docs/iroh/docs/engine/index.html +++ b/pr/2547/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.

+iroh::docs::engine - Rust

Module iroh::docs::engine

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 diff --git a/pr/2547/docs/iroh/docs/engine/struct.DefaultAuthor.html b/pr/2547/docs/iroh/docs/engine/struct.DefaultAuthor.html index 0f6730a9b2..f5cb0284cb 100644 --- a/pr/2547/docs/iroh/docs/engine/struct.DefaultAuthor.html +++ b/pr/2547/docs/iroh/docs/engine/struct.DefaultAuthor.html @@ -1,19 +1,19 @@ -DefaultAuthor in iroh::docs::engine - Rust

Struct iroh::docs::engine::DefaultAuthor

source ·
pub struct DefaultAuthor {
+DefaultAuthor in iroh::docs::engine - Rust

Struct iroh::docs::engine::DefaultAuthor

pub struct DefaultAuthor {
     value: RwLock<AuthorId>,
     storage: DefaultAuthorStorage,
 }
Expand description

Persistent default author for a docs engine.

-

Fields§

§value: RwLock<AuthorId>§storage: DefaultAuthorStorage

Implementations§

source§

impl DefaultAuthor

source

pub async fn load( +

Fields§

§value: RwLock<AuthorId>§storage: DefaultAuthorStorage

Implementations§

§

impl DefaultAuthor

pub async fn load( storage: DefaultAuthorStorage, docs_store: &SyncHandle ) -> Result<DefaultAuthor, Error>

Load the default author from storage.

If the storage is empty creates a new author and persists it.

-
source

pub fn get(&self) -> AuthorId

Get the current default author.

-
source

pub async fn set( +

pub fn get(&self) -> AuthorId

Get the current default author.

+

pub async fn set( &self, author_id: AuthorId, docs_store: &SyncHandle ) -> Result<(), Error>

Set the default author.

-

Trait Implementations§

source§

impl Debug for DefaultAuthor

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 +

Trait Implementations§

§

impl Debug for DefaultAuthor

§

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/2547/docs/iroh/docs/engine/struct.Engine.html b/pr/2547/docs/iroh/docs/engine/struct.Engine.html index 69ba85e3c3..4de51bb219 100644 --- a/pr/2547/docs/iroh/docs/engine/struct.Engine.html +++ b/pr/2547/docs/iroh/docs/engine/struct.Engine.html @@ -1,8 +1,8 @@ -Engine in iroh::docs::engine - Rust

Struct iroh::docs::engine::Engine

source ·
pub struct Engine {
+Engine in iroh::docs::engine - Rust

Struct iroh::docs::engine::Engine

pub struct Engine {
     pub endpoint: Endpoint,
     pub sync: SyncHandle,
     pub default_author: Arc<DefaultAuthor>,
-    to_live_actor: Sender<ToLiveActor>,
+    to_live_actor: Sender<ToLiveActor>,
     actor_handle: SharedAbortingJoinHandle<()>,
     content_status_cb: Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>,
 }
Expand description

The sync engine coordinates actors that manage open documents, set-reconciliation syncs with @@ -10,7 +10,7 @@ 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.

-
§to_live_actor: Sender<ToLiveActor>§actor_handle: SharedAbortingJoinHandle<()>§content_status_cb: Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>

Implementations§

source§

impl Engine

source

pub async fn spawn<B>( +

§to_live_actor: Sender<ToLiveActor>§actor_handle: SharedAbortingJoinHandle<()>§content_status_cb: Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>

Implementations§

§

impl Engine

pub async fn spawn<B>( endpoint: Endpoint, gossip: Gossip, replica_store: Store, @@ -21,32 +21,32 @@ peers and a gossip swarm for each syncing document.

B: Store,

Start the sync engine.

This will spawn two tokio tasks for the live sync coordination and gossip actors, and a thread for the crate::actor::SyncHandle.

-
source

pub async fn start_sync( +

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

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.

-
source

pub async fn leave( +

pub async fn leave( &self, namespace: NamespaceId, kill_subscribers: bool ) -> Result<(), Error>

Stop the live sync for a document and leave the gossip swarm.

If kill_subscribers is true, all existing event subscribers will be dropped. This means they will receive None and no further events in case of rejoining the document.

-
source

pub async fn subscribe( +

pub async fn subscribe( &self, namespace: NamespaceId ) -> Result<impl Stream<Item = Result<LiveEvent, Error>> + Unpin + 'static, Error>

Subscribe to replica and sync progress events.

-
source

pub async fn handle_connection(&self, conn: Connecting) -> Result<(), Error>

Handle an incoming iroh-docs connection.

-
source

pub async fn shutdown(&self) -> Result<(), Error>

Shutdown the engine.

-

Trait Implementations§

source§

impl Clone for Engine

source§

fn clone(&self) -> Engine

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 Engine
where +

pub async fn handle_connection(&self, conn: Connecting) -> Result<(), Error>

Handle an incoming iroh-docs connection.

+

pub async fn shutdown(&self) -> Result<(), Error>

Shutdown the engine.

+

Trait Implementations§

§

impl Clone for Engine

§

fn clone(&self) -> Engine

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 Engine

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Engine

§

impl !RefUnwindSafe for Engine

§

impl Send for Engine

§

impl Sync for Engine

§

impl Unpin for Engine

§

impl !UnwindSafe for Engine

Blanket Implementations§

source§

impl<T> Any for T
where + Sender<ToLiveActor>: Debug, + SharedAbortingJoinHandle<()>: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Engine

§

impl !RefUnwindSafe for Engine

§

impl Send for Engine

§

impl Sync for Engine

§

impl Unpin for Engine

§

impl !UnwindSafe for Engine

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/2547/docs/iroh/docs/engine/struct.SyncEvent.html b/pr/2547/docs/iroh/docs/engine/struct.SyncEvent.html index 773bdc73d3..4534487f6c 100644 --- a/pr/2547/docs/iroh/docs/engine/struct.SyncEvent.html +++ b/pr/2547/docs/iroh/docs/engine/struct.SyncEvent.html @@ -1,25 +1,25 @@ -SyncEvent in iroh::docs::engine - Rust

Struct iroh::docs::engine::SyncEvent

source ·
pub struct SyncEvent {
+SyncEvent in iroh::docs::engine - Rust

Struct iroh::docs::engine::SyncEvent

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

Event emitted when a sync operation completes

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

-
§result: Result<SyncDetails, String>

Result of the sync operation

-

Trait Implementations§

source§

impl Clone for SyncEvent

source§

fn clone(&self) -> SyncEvent

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 SyncEvent

source§

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

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

impl<'de> Deserialize<'de> for SyncEvent

§result: Result<SyncDetails, String>

Result of the sync operation

+

Trait Implementations§

§

impl Clone for SyncEvent

§

fn clone(&self) -> SyncEvent

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 SyncEvent

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SyncEvent

§

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

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

impl PartialEq for SyncEvent

source§

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

impl PartialEq for SyncEvent

§

fn eq(&self, other: &SyncEvent) -> 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.
source§

impl Serialize for SyncEvent

source§

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

§

impl Serialize for SyncEvent

§

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

impl Eq for SyncEvent

source§

impl StructuralPartialEq for SyncEvent

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for SyncEvent

§

impl StructuralPartialEq for SyncEvent

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/2547/docs/iroh/docs/enum.Capability.html b/pr/2547/docs/iroh/docs/enum.Capability.html index 90266069d5..3c17280e90 100644 --- a/pr/2547/docs/iroh/docs/enum.Capability.html +++ b/pr/2547/docs/iroh/docs/enum.Capability.html @@ -1,22 +1,22 @@ -Capability in iroh::docs - Rust

Enum iroh::docs::Capability

source ·
pub enum Capability {
+Capability in iroh::docs - Rust

Enum iroh::docs::Capability

pub enum Capability {
     Write(NamespaceSecret),
     Read(NamespaceId),
 }
Expand description

The capability of the namespace.

Variants§

§

Write(NamespaceSecret)

Write access to the namespace.

§

Read(NamespaceId)

Read only access to the namespace.

-

Implementations§

source§

impl Capability

source

pub fn id(&self) -> NamespaceId

Get the NamespaceId for this Capability.

-
source

pub fn secret_key(&self) -> Result<&NamespaceSecret, ReadOnly>

Get the NamespaceSecret of this Capability. +

Implementations§

§

impl Capability

pub fn id(&self) -> NamespaceId

Get the NamespaceId for this Capability.

+

pub fn secret_key(&self) -> Result<&NamespaceSecret, ReadOnly>

Get the NamespaceSecret of this Capability. Will fail if the Capability is read only.

-
source

pub fn kind(&self) -> CapabilityKind

Get the kind of capability.

-
source

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

Get the raw representation of this namespace capability.

-
source

pub fn from_raw(kind: u8, bytes: &[u8; 32]) -> Result<Capability, Error>

Create a Capability from its raw representation.

-
source

pub fn merge(&mut self, other: Capability) -> Result<bool, CapabilityError>

Merge this capability with another capability.

+

pub fn kind(&self) -> CapabilityKind

Get the kind of capability.

+

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

Get the raw representation of this namespace capability.

+

pub fn from_raw(kind: u8, bytes: &[u8; 32]) -> Result<Capability, Error>

Create a Capability from its raw representation.

+

pub fn merge(&mut self, other: Capability) -> Result<bool, CapabilityError>

Merge this capability with another capability.

Will return an error if other is not a capability for the same namespace.

Returns true if the capability was changed, false otherwise.

-

Trait Implementations§

source§

impl Clone for Capability

source§

fn clone(&self) -> Capability

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 Capability

source§

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

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

impl<'de> Deserialize<'de> for Capability

Trait Implementations§

§

impl Clone for Capability

§

fn clone(&self) -> Capability

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 Capability

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Capability

§

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

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

impl From<NamespaceId> for Capability

source§

fn from(value: NamespaceId) -> Capability

Converts to this type from the input type.
source§

impl From<NamespaceSecret> for Capability

source§

fn from(value: NamespaceSecret) -> Capability

Converts to this type from the input type.
source§

impl Serialize for Capability

source§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl From<NamespaceId> for Capability

§

fn from(value: NamespaceId) -> Capability

Converts to this type from the input type.
§

impl From<NamespaceSecret> for Capability

§

fn from(value: NamespaceSecret) -> Capability

Converts to this type from the input type.
§

impl Serialize for Capability

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2547/docs/iroh/docs/enum.CapabilityError.html b/pr/2547/docs/iroh/docs/enum.CapabilityError.html index 1c1130ffa0..a22356c7aa 100644 --- a/pr/2547/docs/iroh/docs/enum.CapabilityError.html +++ b/pr/2547/docs/iroh/docs/enum.CapabilityError.html @@ -1,8 +1,8 @@ -CapabilityError in iroh::docs - Rust

Enum iroh::docs::CapabilityError

source ·
pub enum CapabilityError {
+CapabilityError in iroh::docs - Rust

Enum iroh::docs::CapabilityError

pub enum CapabilityError {
     NamespaceMismatch,
 }
Expand description

Errors for capability operations

Variants§

§

NamespaceMismatch

Namespaces are not the same

-

Trait Implementations§

source§

impl Debug for CapabilityError

source§

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

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

impl Display for CapabilityError

source§

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

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

impl Error for CapabilityError

1.30.0 · 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 +

Trait Implementations§

§

impl Debug for CapabilityError

§

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

Formats the value using the given formatter. Read more
§

impl Display for CapabilityError

§

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

Formats the value using the given formatter. Read more
§

impl Error for CapabilityError

1.30.0 · 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 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/2547/docs/iroh/docs/enum.CapabilityKind.html b/pr/2547/docs/iroh/docs/enum.CapabilityKind.html index 811a354168..86b205b26c 100644 --- a/pr/2547/docs/iroh/docs/enum.CapabilityKind.html +++ b/pr/2547/docs/iroh/docs/enum.CapabilityKind.html @@ -1,21 +1,21 @@ -CapabilityKind in iroh::docs - Rust

Enum iroh::docs::CapabilityKind

source ·
#[repr(u8)]
pub enum CapabilityKind { +CapabilityKind in iroh::docs - Rust

Enum iroh::docs::CapabilityKind

#[repr(u8)]
pub enum CapabilityKind { Write = 1, Read = 2, }
Expand description

Kind of capability of the namespace.

Variants§

§

Write = 1

A writable replica.

§

Read = 2

A readable replica.

-

Trait Implementations§

source§

impl Clone for CapabilityKind

source§

fn clone(&self) -> CapabilityKind

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 CapabilityKind

source§

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

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

impl<'de> Deserialize<'de> for CapabilityKind

Trait Implementations§

§

impl Clone for CapabilityKind

§

fn clone(&self) -> CapabilityKind

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 CapabilityKind

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for CapabilityKind

§

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

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

impl Display for CapabilityKind

source§

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

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

impl Serialize for CapabilityKind

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Display for CapabilityKind

§

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

Formats the value using the given formatter. Read more
§

impl Serialize for CapabilityKind

§

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

impl TryFrom<u8> for CapabilityKind

§

type Error = TryFromPrimitiveError<CapabilityKind>

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

fn try_from( + __S: Serializer,

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

impl TryFrom<u8> for CapabilityKind

§

type Error = TryFromPrimitiveError<CapabilityKind>

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

fn try_from( number: u8 -) -> Result<CapabilityKind, TryFromPrimitiveError<CapabilityKind>>

Performs the conversion.
source§

impl TryFromPrimitive for CapabilityKind

§

type Primitive = u8

§

type Error = TryFromPrimitiveError<CapabilityKind>

source§

const NAME: &'static str = "CapabilityKind"

source§

fn try_from_primitive( +) -> Result<CapabilityKind, TryFromPrimitiveError<CapabilityKind>>

Performs the conversion.
§

impl TryFromPrimitive for CapabilityKind

§

type Primitive = u8

§

type Error = TryFromPrimitiveError<CapabilityKind>

§

const NAME: &'static str = "CapabilityKind"

§

fn try_from_primitive( number: <CapabilityKind as TryFromPrimitive>::Primitive -) -> Result<CapabilityKind, TryFromPrimitiveError<CapabilityKind>>

source§

impl Copy for CapabilityKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Result<CapabilityKind, TryFromPrimitiveError<CapabilityKind>>

§

impl Copy for CapabilityKind

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/2547/docs/iroh/docs/enum.ContentStatus.html b/pr/2547/docs/iroh/docs/enum.ContentStatus.html index 68abff73b1..549a9a4750 100644 --- a/pr/2547/docs/iroh/docs/enum.ContentStatus.html +++ b/pr/2547/docs/iroh/docs/enum.ContentStatus.html @@ -1,4 +1,4 @@ -ContentStatus in iroh::docs - Rust

Enum iroh::docs::ContentStatus

source ·
pub enum ContentStatus {
+ContentStatus in iroh::docs - Rust

Enum iroh::docs::ContentStatus

pub enum ContentStatus {
     Complete,
     Incomplete,
     Missing,
@@ -6,16 +6,16 @@
 

Variants§

§

Complete

The content is completely available.

§

Incomplete

The content is partially available.

§

Missing

The content is missing.

-

Trait Implementations§

source§

impl Clone for ContentStatus

source§

fn clone(&self) -> ContentStatus

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 ContentStatus

source§

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

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

impl<'de> Deserialize<'de> for ContentStatus

Trait Implementations§

§

impl Clone for ContentStatus

§

fn clone(&self) -> ContentStatus

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 ContentStatus

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for ContentStatus

§

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

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

impl PartialEq for ContentStatus

source§

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

impl PartialEq for ContentStatus

§

fn eq(&self, other: &ContentStatus) -> 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.
source§

impl Serialize for ContentStatus

source§

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

§

impl Serialize for ContentStatus

§

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

impl Copy for ContentStatus

source§

impl Eq for ContentStatus

source§

impl StructuralPartialEq for ContentStatus

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Copy for ContentStatus

§

impl Eq for ContentStatus

§

impl StructuralPartialEq for ContentStatus

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/2547/docs/iroh/docs/enum.Event.html b/pr/2547/docs/iroh/docs/enum.Event.html index c645069161..b5d1c6fedf 100644 --- a/pr/2547/docs/iroh/docs/enum.Event.html +++ b/pr/2547/docs/iroh/docs/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::docs - Rust

Enum iroh::docs::Event

source ·
pub enum Event {
+Event in iroh::docs - Rust

Enum iroh::docs::Event

pub enum Event {
     LocalInsert {
         namespace: NamespaceId,
         entry: SignedEntry,
@@ -20,7 +20,7 @@
 
§from: [u8; 32]

Peer that provided the inserted entry.

§should_download: bool

Whether download policies require the content to be downloaded.

§remote_content_status: ContentStatus

ContentStatus for this entry in the remote’s replica.

-

Trait Implementations§

source§

impl Clone for Event

source§

fn clone(&self) -> Event

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 Event

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Event

§

fn clone(&self) -> Event

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 Event

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

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/2547/docs/iroh/docs/enum.InsertError.html b/pr/2547/docs/iroh/docs/enum.InsertError.html index 20425f6cb5..4de4d04a9a 100644 --- a/pr/2547/docs/iroh/docs/enum.InsertError.html +++ b/pr/2547/docs/iroh/docs/enum.InsertError.html @@ -1,4 +1,4 @@ -InsertError in iroh::docs - Rust

Enum iroh::docs::InsertError

source ·
pub enum InsertError {
+InsertError in iroh::docs - Rust

Enum iroh::docs::InsertError

pub enum InsertError {
     Store(Error),
     Validation(ValidationFailure),
     NewerEntryExists,
@@ -12,9 +12,9 @@
 
§

EntryIsEmpty

Attempted to insert an empty entry.

§

ReadOnly

Replica is read only.

§

Closed

The replica is closed, no operations may be performed.

-

Trait Implementations§

source§

impl Debug for InsertError
where +

Trait Implementations§

§

impl Debug for InsertError

source§

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

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

impl Display for InsertError

source§

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

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

impl Error for InsertError

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<ReadOnly> for InsertError

source§

fn from(value: ReadOnly) -> InsertError

Converts to this type from the input type.
source§

impl From<ValidationFailure> for InsertError

source§

fn from(source: ValidationFailure) -> InsertError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T

§

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

Formats the value using the given formatter. Read more
§

impl Display for InsertError

§

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

Formats the value using the given formatter. Read more
§

impl Error for InsertError

§

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<ReadOnly> for InsertError

§

fn from(value: ReadOnly) -> InsertError

Converts to this type from the input type.
§

impl From<ValidationFailure> for InsertError

§

fn from(source: ValidationFailure) -> InsertError

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/2547/docs/iroh/docs/enum.InsertOrigin.html b/pr/2547/docs/iroh/docs/enum.InsertOrigin.html index 1807acde71..b34e837ce8 100644 --- a/pr/2547/docs/iroh/docs/enum.InsertOrigin.html +++ b/pr/2547/docs/iroh/docs/enum.InsertOrigin.html @@ -1,4 +1,4 @@ -InsertOrigin in iroh::docs - Rust

Enum iroh::docs::InsertOrigin

source ·
pub enum InsertOrigin {
+InsertOrigin in iroh::docs - Rust

Enum iroh::docs::InsertOrigin

pub enum InsertOrigin {
     Local,
     Sync {
         from: [u8; 32],
@@ -9,7 +9,7 @@
 
§

Sync

The entry was received from the remote node identified by PeerIdBytes.

Fields

§from: [u8; 32]

The peer from which we received this entry.

§remote_content_status: ContentStatus

Whether the peer claims to have the content blob for this entry.

-

Trait Implementations§

source§

impl Clone for InsertOrigin

source§

fn clone(&self) -> InsertOrigin

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 InsertOrigin

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 +

Trait Implementations§

§

impl Clone for InsertOrigin

§

fn clone(&self) -> InsertOrigin

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 InsertOrigin

§

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/2547/docs/iroh/docs/enum.ValidationFailure.html b/pr/2547/docs/iroh/docs/enum.ValidationFailure.html index fbed79b5f1..7c592657c5 100644 --- a/pr/2547/docs/iroh/docs/enum.ValidationFailure.html +++ b/pr/2547/docs/iroh/docs/enum.ValidationFailure.html @@ -1,4 +1,4 @@ -ValidationFailure in iroh::docs - Rust

Enum iroh::docs::ValidationFailure

source ·
pub enum ValidationFailure {
+ValidationFailure in iroh::docs - Rust

Enum iroh::docs::ValidationFailure

pub enum ValidationFailure {
     InvalidNamespace,
     BadSignature,
     TooFarInTheFuture,
@@ -8,7 +8,7 @@
 
§

BadSignature

Entry signature is invalid.

§

TooFarInTheFuture

Entry timestamp is too far in the future.

§

InvalidEmptyEntry

Entry has length 0 but not the empty hash, or the empty hash but not length 0.

-

Trait Implementations§

source§

impl Debug for ValidationFailure

source§

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

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

impl Display for ValidationFailure

source§

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

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

impl Error for ValidationFailure

1.30.0 · 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<ValidationFailure> for InsertError

source§

fn from(source: ValidationFailure) -> InsertError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for ValidationFailure

§

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

Formats the value using the given formatter. Read more
§

impl Display for ValidationFailure

§

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

Formats the value using the given formatter. Read more
§

impl Error for ValidationFailure

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

impl From<ValidationFailure> for InsertError

§

fn from(source: ValidationFailure) -> InsertError

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/2547/docs/iroh/docs/index.html b/pr/2547/docs/iroh/docs/index.html index c73f576b36..79153e750e 100644 --- a/pr/2547/docs/iroh/docs/index.html +++ b/pr/2547/docs/iroh/docs/index.html @@ -1,4 +1,4 @@ -iroh::docs - Rust

Crate iroh::docs

source ·
Expand description

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

+iroh::docs - Rust

Crate iroh::docs

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 diff --git a/pr/2547/docs/iroh/docs/metrics/index.html b/pr/2547/docs/iroh/docs/metrics/index.html index 6ffc6aed84..4993c7dae8 100644 --- a/pr/2547/docs/iroh/docs/metrics/index.html +++ b/pr/2547/docs/iroh/docs/metrics/index.html @@ -1,2 +1,2 @@ -iroh::docs::metrics - Rust

Module iroh::docs::metrics

source ·
Expand description

Metrics for iroh-docs

+iroh::docs::metrics - Rust

Module iroh::docs::metrics

Expand description

Metrics for iroh-docs

Structs§

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/metrics/struct.Metrics.html b/pr/2547/docs/iroh/docs/metrics/struct.Metrics.html index 1f52571a61..ca9224a00c 100644 --- a/pr/2547/docs/iroh/docs/metrics/struct.Metrics.html +++ b/pr/2547/docs/iroh/docs/metrics/struct.Metrics.html @@ -1,4 +1,4 @@ -Metrics in iroh::docs::metrics - Rust

Struct iroh::docs::metrics::Metrics

source ·
pub struct Metrics {
Show 19 fields +Metrics in iroh::docs::metrics - Rust

Struct iroh::docs::metrics::Metrics

pub struct Metrics {
Show 19 fields pub new_entries_local: Counter, pub new_entries_remote: Counter, pub new_entries_local_size: Counter, @@ -19,7 +19,7 @@ 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<(), Error>

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

impl Default for Metrics

source§

fn default() -> Metrics

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 + 'static))>

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§

§

impl Clone for Metrics

§

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
§

impl Debug for Metrics

§

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

Formats the value using the given formatter. Read more
§

impl Default for Metrics

§

fn default() -> Metrics

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

impl Iterable for Metrics

§

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

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

impl Metric for Metrics

§

fn name() -> &'static str

The name of this metric group.
§

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

Initializes this metric group.
§

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

Access to this metrics group to record a metric. Only records if this metric is registered in the global registry.
§

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 diff --git a/pr/2547/docs/iroh/docs/net/constant.DOCS_ALPN.html b/pr/2547/docs/iroh/docs/net/constant.DOCS_ALPN.html index 7e462d0e29..a5ba0c7d42 100644 --- a/pr/2547/docs/iroh/docs/net/constant.DOCS_ALPN.html +++ b/pr/2547/docs/iroh/docs/net/constant.DOCS_ALPN.html @@ -1,2 +1,2 @@ -DOCS_ALPN in iroh::docs::net - Rust

Constant iroh::docs::net::DOCS_ALPN

source ·
pub const DOCS_ALPN: &'static [u8];
Expand description

The ALPN identifier for the iroh-docs protocol

+DOCS_ALPN in iroh::docs::net - Rust

Constant iroh::docs::net::DOCS_ALPN

pub const DOCS_ALPN: &'static [u8];
Expand description

The ALPN identifier for the iroh-docs protocol

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/net/enum.AbortReason.html b/pr/2547/docs/iroh/docs/net/enum.AbortReason.html index 83d010abfc..06db0998b6 100644 --- a/pr/2547/docs/iroh/docs/net/enum.AbortReason.html +++ b/pr/2547/docs/iroh/docs/net/enum.AbortReason.html @@ -1,4 +1,4 @@ -AbortReason in iroh::docs::net - Rust

Enum iroh::docs::net::AbortReason

source ·
pub enum AbortReason {
+AbortReason in iroh::docs::net - Rust

Enum iroh::docs::net::AbortReason

pub enum AbortReason {
     NotFound,
     AlreadySyncing,
     InternalServerError,
@@ -6,16 +6,16 @@
 

Variants§

§

NotFound

Namespace is not available.

§

AlreadySyncing

We are already syncing this namespace.

§

InternalServerError

We experienced an error while trying to provide the requested resource

-

Trait Implementations§

source§

impl Clone for AbortReason

source§

fn clone(&self) -> AbortReason

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 AbortReason

source§

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

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

impl<'de> Deserialize<'de> for AbortReason

Trait Implementations§

§

impl Clone for AbortReason

§

fn clone(&self) -> AbortReason

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 AbortReason

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for AbortReason

§

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

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

impl PartialEq for AbortReason

source§

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

impl PartialEq for AbortReason

§

fn eq(&self, other: &AbortReason) -> 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.
source§

impl Serialize for AbortReason

source§

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

§

impl Serialize for AbortReason

§

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

impl Copy for AbortReason

source§

impl Eq for AbortReason

source§

impl StructuralPartialEq for AbortReason

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Copy for AbortReason

§

impl Eq for AbortReason

§

impl StructuralPartialEq for AbortReason

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/2547/docs/iroh/docs/net/enum.AcceptError.html b/pr/2547/docs/iroh/docs/net/enum.AcceptError.html index 17aafad5fe..6ad3629d03 100644 --- a/pr/2547/docs/iroh/docs/net/enum.AcceptError.html +++ b/pr/2547/docs/iroh/docs/net/enum.AcceptError.html @@ -1,4 +1,4 @@ -AcceptError in iroh::docs::net - Rust

Enum iroh::docs::net::AcceptError

source ·
pub enum AcceptError {
+AcceptError in iroh::docs::net - Rust

Enum iroh::docs::net::AcceptError

pub enum AcceptError {
     Connect {
         error: Error,
     },
@@ -27,9 +27,9 @@
 

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<(), Error>

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

impl Display for AcceptError

source§

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

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 +

Fields

§namespace: Option<NamespaceId>
§error: Error

Implementations§

§

impl AcceptError

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

Get the peer’s node ID (if available)

+

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

Get the namespace (if available)

+

Trait Implementations§

§

impl Debug for AcceptError

§

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

Formats the value using the given formatter. Read more
§

impl Display for AcceptError

§

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

Formats the value using the given formatter. Read more
§

impl Error for AcceptError

§

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 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/2547/docs/iroh/docs/net/enum.AcceptOutcome.html b/pr/2547/docs/iroh/docs/net/enum.AcceptOutcome.html index cbe7e1ce7d..577f266696 100644 --- a/pr/2547/docs/iroh/docs/net/enum.AcceptOutcome.html +++ b/pr/2547/docs/iroh/docs/net/enum.AcceptOutcome.html @@ -1,10 +1,10 @@ -AcceptOutcome in iroh::docs::net - Rust

Enum iroh::docs::net::AcceptOutcome

source ·
pub enum AcceptOutcome {
+AcceptOutcome in iroh::docs::net - Rust

Enum iroh::docs::net::AcceptOutcome

pub enum AcceptOutcome {
     Allow,
     Reject(AbortReason),
 }
Expand description

Whether we want to accept or reject an incoming sync request.

Variants§

§

Allow

Accept the sync request.

§

Reject(AbortReason)

Decline the sync request

-

Trait Implementations§

source§

impl Clone for AcceptOutcome

source§

fn clone(&self) -> AcceptOutcome

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 AcceptOutcome

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 +

Trait Implementations§

§

impl Clone for AcceptOutcome

§

fn clone(&self) -> AcceptOutcome

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 AcceptOutcome

§

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/2547/docs/iroh/docs/net/enum.ConnectError.html b/pr/2547/docs/iroh/docs/net/enum.ConnectError.html index 5144fe4cad..495ee104ac 100644 --- a/pr/2547/docs/iroh/docs/net/enum.ConnectError.html +++ b/pr/2547/docs/iroh/docs/net/enum.ConnectError.html @@ -1,4 +1,4 @@ -ConnectError in iroh::docs::net - Rust

Enum iroh::docs::net::ConnectError

source ·
pub enum ConnectError {
+ConnectError in iroh::docs::net - Rust

Enum iroh::docs::net::ConnectError

pub enum ConnectError {
     Connect {
         error: Error,
     },
@@ -14,7 +14,7 @@
 

Fields

§error: Error
§

RemoteAbort(AbortReason)

The remote peer aborted the sync request.

§

Sync

Failed to run sync

Fields

§error: Error
§

Close

Failed to close

-

Fields

§error: Error

Trait Implementations§

source§

impl Debug for ConnectError

source§

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

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

impl Display for ConnectError

source§

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

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

impl Error for ConnectError

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 +

Fields

§error: Error

Trait Implementations§

§

impl Debug for ConnectError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ConnectError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ConnectError

§

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 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/2547/docs/iroh/docs/net/fn.connect_and_sync.html b/pr/2547/docs/iroh/docs/net/fn.connect_and_sync.html index 968270e6a3..1f3886c93d 100644 --- a/pr/2547/docs/iroh/docs/net/fn.connect_and_sync.html +++ b/pr/2547/docs/iroh/docs/net/fn.connect_and_sync.html @@ -1,4 +1,4 @@ -connect_and_sync in iroh::docs::net - Rust

Function iroh::docs::net::connect_and_sync

source ·
pub async fn connect_and_sync(
+connect_and_sync in iroh::docs::net - Rust

Function iroh::docs::net::connect_and_sync

pub async fn connect_and_sync(
     endpoint: &Endpoint,
     sync: &SyncHandle,
     namespace: NamespaceId,
diff --git a/pr/2547/docs/iroh/docs/net/fn.handle_connection.html b/pr/2547/docs/iroh/docs/net/fn.handle_connection.html
index 592c17951f..c7b9fb3e2d 100644
--- a/pr/2547/docs/iroh/docs/net/fn.handle_connection.html
+++ b/pr/2547/docs/iroh/docs/net/fn.handle_connection.html
@@ -1,4 +1,4 @@
-handle_connection in iroh::docs::net - Rust

Function iroh::docs::net::handle_connection

source ·
pub async fn handle_connection<F, Fut>(
+handle_connection in iroh::docs::net - Rust

Function iroh::docs::net::handle_connection

pub async fn handle_connection<F, Fut>(
     sync: SyncHandle,
     connecting: Connecting,
     accept_cb: F
diff --git a/pr/2547/docs/iroh/docs/net/index.html b/pr/2547/docs/iroh/docs/net/index.html
index b02a28c844..b743f6c889 100644
--- a/pr/2547/docs/iroh/docs/net/index.html
+++ b/pr/2547/docs/iroh/docs/net/index.html
@@ -1,2 +1,2 @@
-iroh::docs::net - Rust

Module iroh::docs::net

source ·
Expand description

Network implementation of the iroh-docs protocol

+iroh::docs::net - Rust

Module iroh::docs::net

Expand description

Network implementation of the iroh-docs protocol

Structs§

Enums§

  • Reason why we aborted an incoming sync request.
  • Errors that may occur on handling incoming sync connections.
  • Whether we want to accept or reject an incoming sync request.
  • Errors that may occur on outgoing sync requests.

Constants§

  • The ALPN identifier for the iroh-docs protocol

Functions§

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/net/struct.SyncFinished.html b/pr/2547/docs/iroh/docs/net/struct.SyncFinished.html index 190a9f424c..cab14bf8f8 100644 --- a/pr/2547/docs/iroh/docs/net/struct.SyncFinished.html +++ b/pr/2547/docs/iroh/docs/net/struct.SyncFinished.html @@ -1,4 +1,4 @@ -SyncFinished in iroh::docs::net - Rust

Struct iroh::docs::net::SyncFinished

source ·
pub struct SyncFinished {
+SyncFinished in iroh::docs::net - Rust

Struct iroh::docs::net::SyncFinished

pub struct SyncFinished {
     pub namespace: NamespaceId,
     pub peer: PublicKey,
     pub outcome: SyncOutcome,
@@ -8,7 +8,7 @@
 
§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<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for SyncFinished

§

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
§

impl Debug for SyncFinished

§

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/2547/docs/iroh/docs/net/struct.Timings.html b/pr/2547/docs/iroh/docs/net/struct.Timings.html index 3fb6a04700..1ef8f62bbb 100644 --- a/pr/2547/docs/iroh/docs/net/struct.Timings.html +++ b/pr/2547/docs/iroh/docs/net/struct.Timings.html @@ -1,10 +1,10 @@ -Timings in iroh::docs::net - Rust

Struct iroh::docs::net::Timings

source ·
pub struct Timings {
+Timings in iroh::docs::net - Rust

Struct iroh::docs::net::Timings

pub struct Timings {
     pub connect: Duration,
     pub process: Duration,
 }
Expand description

Time a sync operation took

Fields§

§connect: Duration

Time to establish connection

§process: Duration

Time to run sync exchange

-

Trait Implementations§

source§

impl Clone for Timings

source§

fn clone(&self) -> Timings

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 Timings

source§

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

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

impl Default for Timings

source§

fn default() -> Timings

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

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Timings

§

fn clone(&self) -> Timings

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 Timings

§

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

Formats the value using the given formatter. Read more
§

impl Default for Timings

§

fn default() -> Timings

Returns the “default value” for a type. 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/2547/docs/iroh/docs/store/enum.AuthorFilter.html b/pr/2547/docs/iroh/docs/store/enum.AuthorFilter.html index 9872a9c83a..72ef229416 100644 --- a/pr/2547/docs/iroh/docs/store/enum.AuthorFilter.html +++ b/pr/2547/docs/iroh/docs/store/enum.AuthorFilter.html @@ -1,20 +1,20 @@ -AuthorFilter in iroh::docs::store - Rust

Enum iroh::docs::store::AuthorFilter

source ·
pub enum AuthorFilter {
+AuthorFilter in iroh::docs::store - Rust

Enum iroh::docs::store::AuthorFilter

pub enum AuthorFilter {
     Any,
     Exact(AuthorId),
 }
Expand description

Author matching.

Variants§

§

Any

Matches any author.

§

Exact(AuthorId)

Matches exactly the provided author.

-

Implementations§

source§

impl AuthorFilter

source

pub fn matches(&self, author: &AuthorId) -> bool

Test if an author is matched by this AuthorFilter.

-

Trait Implementations§

source§

impl Clone for AuthorFilter

source§

fn clone(&self) -> AuthorFilter

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 AuthorFilter

source§

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

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

impl Default for AuthorFilter

source§

fn default() -> AuthorFilter

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

impl<'de> Deserialize<'de> for AuthorFilter

Implementations§

§

impl AuthorFilter

pub fn matches(&self, author: &AuthorId) -> bool

Test if an author is matched by this AuthorFilter.

+

Trait Implementations§

§

impl Clone for AuthorFilter

§

fn clone(&self) -> AuthorFilter

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 AuthorFilter

§

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

Formats the value using the given formatter. Read more
§

impl Default for AuthorFilter

§

fn default() -> AuthorFilter

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

impl<'de> Deserialize<'de> for AuthorFilter

§

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

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

impl From<AuthorId> for AuthorFilter

source§

fn from(value: AuthorId) -> AuthorFilter

Converts to this type from the input type.
source§

impl PartialEq for AuthorFilter

source§

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

impl From<AuthorId> for AuthorFilter

§

fn from(value: AuthorId) -> AuthorFilter

Converts to this type from the input type.
§

impl PartialEq for AuthorFilter

§

fn eq(&self, other: &AuthorFilter) -> 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.
source§

impl Serialize for AuthorFilter

source§

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

§

impl Serialize for AuthorFilter

§

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

impl Eq for AuthorFilter

source§

impl StructuralPartialEq for AuthorFilter

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for AuthorFilter

§

impl StructuralPartialEq for AuthorFilter

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/2547/docs/iroh/docs/store/enum.DownloadPolicy.html b/pr/2547/docs/iroh/docs/store/enum.DownloadPolicy.html index 841945ea44..3ae151dacb 100644 --- a/pr/2547/docs/iroh/docs/store/enum.DownloadPolicy.html +++ b/pr/2547/docs/iroh/docs/store/enum.DownloadPolicy.html @@ -1,20 +1,20 @@ -DownloadPolicy in iroh::docs::store - Rust

Enum iroh::docs::store::DownloadPolicy

source ·
pub enum DownloadPolicy {
+DownloadPolicy in iroh::docs::store - Rust

Enum iroh::docs::store::DownloadPolicy

pub enum DownloadPolicy {
     NothingExcept(Vec<FilterKind>),
     EverythingExcept(Vec<FilterKind>),
 }
Expand description

Download policy to decide which content blobs shall be downloaded.

Variants§

§

NothingExcept(Vec<FilterKind>)

Do not download any key unless it matches one of the filters.

§

EverythingExcept(Vec<FilterKind>)

Download every key unless it matches one of the filters.

-

Implementations§

source§

impl DownloadPolicy

source

pub fn matches(&self, entry: &Entry) -> bool

Check if an entry should be downloaded according to this policy.

-

Trait Implementations§

source§

impl Clone for DownloadPolicy

source§

fn clone(&self) -> DownloadPolicy

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 DownloadPolicy

source§

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

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

impl Default for DownloadPolicy

source§

fn default() -> DownloadPolicy

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

impl<'de> Deserialize<'de> for DownloadPolicy

Implementations§

§

impl DownloadPolicy

pub fn matches(&self, entry: &Entry) -> bool

Check if an entry should be downloaded according to this policy.

+

Trait Implementations§

§

impl Clone for DownloadPolicy

§

fn clone(&self) -> DownloadPolicy

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 DownloadPolicy

§

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

Formats the value using the given formatter. Read more
§

impl Default for DownloadPolicy

§

fn default() -> DownloadPolicy

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

impl<'de> Deserialize<'de> for DownloadPolicy

§

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

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

impl PartialEq for DownloadPolicy

source§

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

impl PartialEq for DownloadPolicy

§

fn eq(&self, other: &DownloadPolicy) -> 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.
source§

impl Serialize for DownloadPolicy

source§

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

§

impl Serialize for DownloadPolicy

§

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

impl Eq for DownloadPolicy

source§

impl StructuralPartialEq for DownloadPolicy

Auto Trait Implementations§

Blanket Implementations§

source§

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

Serialize this value into the given Serde serializer. Read more

§

impl Eq for DownloadPolicy

§

impl StructuralPartialEq for DownloadPolicy

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/2547/docs/iroh/docs/store/enum.FilterKind.html b/pr/2547/docs/iroh/docs/store/enum.FilterKind.html index 6fcf9df746..8e72ddd36c 100644 --- a/pr/2547/docs/iroh/docs/store/enum.FilterKind.html +++ b/pr/2547/docs/iroh/docs/store/enum.FilterKind.html @@ -1,20 +1,20 @@ -FilterKind in iroh::docs::store - Rust

Enum iroh::docs::store::FilterKind

source ·
pub enum FilterKind {
+FilterKind in iroh::docs::store - Rust

Enum iroh::docs::store::FilterKind

pub enum FilterKind {
     Prefix(Bytes),
     Exact(Bytes),
 }
Expand description

Filter strategy used in download policies.

Variants§

§

Prefix(Bytes)

Matches if the contained bytes are a prefix of the key.

§

Exact(Bytes)

Matches if the contained bytes and the key are the same.

-

Implementations§

source§

impl FilterKind

source

pub fn matches(&self, key: impl AsRef<[u8]>) -> bool

Verifies whether this filter matches a given key

-

Trait Implementations§

source§

impl Clone for FilterKind

source§

fn clone(&self) -> FilterKind

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 FilterKind

source§

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

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

impl<'de> Deserialize<'de> for FilterKind

Implementations§

§

impl FilterKind

pub fn matches(&self, key: impl AsRef<[u8]>) -> bool

Verifies whether this filter matches a given key

+

Trait Implementations§

§

impl Clone for FilterKind

§

fn clone(&self) -> FilterKind

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 FilterKind

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for FilterKind

§

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

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

impl Display for FilterKind

source§

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

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

impl FromStr for FilterKind

§

type Err = Error

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

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

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

impl PartialEq for FilterKind

source§

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

§

impl Display for FilterKind

§

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

Formats the value using the given formatter. Read more
§

impl FromStr for FilterKind

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl PartialEq for FilterKind

§

fn eq(&self, other: &FilterKind) -> 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.
source§

impl Serialize for FilterKind

source§

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

§

impl Serialize for FilterKind

§

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

impl Eq for FilterKind

source§

impl StructuralPartialEq for FilterKind

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for FilterKind

§

impl StructuralPartialEq for FilterKind

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/2547/docs/iroh/docs/store/enum.ImportNamespaceOutcome.html b/pr/2547/docs/iroh/docs/store/enum.ImportNamespaceOutcome.html index 378ad9b3a3..91369ed862 100644 --- a/pr/2547/docs/iroh/docs/store/enum.ImportNamespaceOutcome.html +++ b/pr/2547/docs/iroh/docs/store/enum.ImportNamespaceOutcome.html @@ -1,4 +1,4 @@ -ImportNamespaceOutcome in iroh::docs::store - Rust

Enum iroh::docs::store::ImportNamespaceOutcome

source ·
pub enum ImportNamespaceOutcome {
+ImportNamespaceOutcome in iroh::docs::store - Rust

Enum iroh::docs::store::ImportNamespaceOutcome

pub enum ImportNamespaceOutcome {
     Inserted,
     Upgraded,
     NoChange,
@@ -6,7 +6,7 @@
 

Variants§

§

Inserted

The namespace did not exist before and is now inserted.

§

Upgraded

The namespace existed and now has an upgraded capability.

§

NoChange

The namespace existed and its capability remains unchanged.

-

Trait Implementations§

source§

impl Clone for ImportNamespaceOutcome

source§

fn clone(&self) -> ImportNamespaceOutcome

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 ImportNamespaceOutcome

source§

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

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

impl Copy for ImportNamespaceOutcome

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for ImportNamespaceOutcome

§

fn clone(&self) -> ImportNamespaceOutcome

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 ImportNamespaceOutcome

§

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

Formats the value using the given formatter. Read more
§

impl Copy for ImportNamespaceOutcome

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/2547/docs/iroh/docs/store/enum.KeyFilter.html b/pr/2547/docs/iroh/docs/store/enum.KeyFilter.html index 3f237fda15..818a222790 100644 --- a/pr/2547/docs/iroh/docs/store/enum.KeyFilter.html +++ b/pr/2547/docs/iroh/docs/store/enum.KeyFilter.html @@ -1,4 +1,4 @@ -KeyFilter in iroh::docs::store - Rust

Enum iroh::docs::store::KeyFilter

source ·
pub enum KeyFilter {
+KeyFilter in iroh::docs::store - Rust

Enum iroh::docs::store::KeyFilter

pub enum KeyFilter {
     Any,
     Exact(Bytes),
     Prefix(Bytes),
@@ -6,18 +6,18 @@
 

Variants§

§

Any

Matches any key.

§

Exact(Bytes)

Only keys that are exactly the provided value.

§

Prefix(Bytes)

All keys that start with the provided value.

-

Implementations§

source§

impl KeyFilter

source

pub fn matches(&self, key: &[u8]) -> bool

Test if a key is matched by this KeyFilter.

-

Trait Implementations§

source§

impl Clone for KeyFilter

source§

fn clone(&self) -> KeyFilter

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 KeyFilter

source§

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

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

impl Default for KeyFilter

source§

fn default() -> KeyFilter

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

impl<'de> Deserialize<'de> for KeyFilter

Implementations§

§

impl KeyFilter

pub fn matches(&self, key: &[u8]) -> bool

Test if a key is matched by this KeyFilter.

+

Trait Implementations§

§

impl Clone for KeyFilter

§

fn clone(&self) -> KeyFilter

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 KeyFilter

§

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

Formats the value using the given formatter. Read more
§

impl Default for KeyFilter

§

fn default() -> KeyFilter

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

impl<'de> Deserialize<'de> for KeyFilter

§

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

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

impl<T> From<T> for KeyFilter
where - T: AsRef<[u8]>,

source§

fn from(value: T) -> KeyFilter

Converts to this type from the input type.
source§

impl PartialEq for KeyFilter

source§

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

§

impl<T> From<T> for KeyFilter
where + T: AsRef<[u8]>,

§

fn from(value: T) -> KeyFilter

Converts to this type from the input type.
§

impl PartialEq for KeyFilter

§

fn eq(&self, other: &KeyFilter) -> 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.
source§

impl Serialize for KeyFilter

source§

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

§

impl Serialize for KeyFilter

§

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

impl Eq for KeyFilter

source§

impl StructuralPartialEq for KeyFilter

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for KeyFilter

§

impl StructuralPartialEq for KeyFilter

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/2547/docs/iroh/docs/store/enum.OpenError.html b/pr/2547/docs/iroh/docs/store/enum.OpenError.html index ac2bfc2c23..925be535d9 100644 --- a/pr/2547/docs/iroh/docs/store/enum.OpenError.html +++ b/pr/2547/docs/iroh/docs/store/enum.OpenError.html @@ -1,10 +1,10 @@ -OpenError in iroh::docs::store - Rust

Enum iroh::docs::store::OpenError

source ·
pub enum OpenError {
+OpenError in iroh::docs::store - Rust

Enum iroh::docs::store::OpenError

pub enum OpenError {
     NotFound,
     Other(Error),
 }
Expand description

Error return from Store::open_replica

Variants§

§

NotFound

The replica does not exist.

§

Other(Error)

Other error while opening the replica.

-

Trait Implementations§

source§

impl Debug for OpenError

source§

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

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

impl Display for OpenError

source§

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

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

impl Error for OpenError

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 OpenError

source§

fn from(source: Error) -> OpenError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for OpenError

§

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

Formats the value using the given formatter. Read more
§

impl Display for OpenError

§

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

Formats the value using the given formatter. Read more
§

impl Error for OpenError

§

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 OpenError

§

fn from(source: Error) -> OpenError

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/2547/docs/iroh/docs/store/enum.SortBy.html b/pr/2547/docs/iroh/docs/store/enum.SortBy.html index aa350c66f8..dfa09a5b18 100644 --- a/pr/2547/docs/iroh/docs/store/enum.SortBy.html +++ b/pr/2547/docs/iroh/docs/store/enum.SortBy.html @@ -1,17 +1,17 @@ -SortBy in iroh::docs::store - Rust

Enum iroh::docs::store::SortBy

source ·
pub enum SortBy {
+SortBy in iroh::docs::store - Rust

Enum iroh::docs::store::SortBy

pub enum SortBy {
     KeyAuthor,
     AuthorKey,
 }
Expand description

Fields by which the query can be sorted

Variants§

§

KeyAuthor

Sort by key, then author.

§

AuthorKey

Sort by author, then key.

-

Trait Implementations§

source§

impl Clone for SortBy

source§

fn clone(&self) -> SortBy

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 SortBy

source§

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

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

impl Default for SortBy

source§

fn default() -> SortBy

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

impl<'de> Deserialize<'de> for SortBy

Trait Implementations§

§

impl Clone for SortBy

§

fn clone(&self) -> SortBy

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 SortBy

§

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

Formats the value using the given formatter. Read more
§

impl Default for SortBy

§

fn default() -> SortBy

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

impl<'de> Deserialize<'de> for SortBy

§

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

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

impl Serialize for SortBy

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Serialize for SortBy

§

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

impl Copy for SortBy

Auto Trait Implementations§

§

impl Freeze for SortBy

§

impl RefUnwindSafe for SortBy

§

impl Send for SortBy

§

impl Sync for SortBy

§

impl Unpin for SortBy

§

impl UnwindSafe for SortBy

Blanket Implementations§

source§

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

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

impl Copy for SortBy

Auto Trait Implementations§

§

impl Freeze for SortBy

§

impl RefUnwindSafe for SortBy

§

impl Send for SortBy

§

impl Sync for SortBy

§

impl Unpin for SortBy

§

impl UnwindSafe for SortBy

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/2547/docs/iroh/docs/store/enum.SortDirection.html b/pr/2547/docs/iroh/docs/store/enum.SortDirection.html index c11cc18ec8..a6583ac853 100644 --- a/pr/2547/docs/iroh/docs/store/enum.SortDirection.html +++ b/pr/2547/docs/iroh/docs/store/enum.SortDirection.html @@ -1,17 +1,17 @@ -SortDirection in iroh::docs::store - Rust

Enum iroh::docs::store::SortDirection

source ·
pub enum SortDirection {
+SortDirection in iroh::docs::store - Rust

Enum iroh::docs::store::SortDirection

pub enum SortDirection {
     Asc,
     Desc,
 }
Expand description

Sort direction

Variants§

§

Asc

Sort ascending

§

Desc

Sort descending

-

Trait Implementations§

source§

impl Clone for SortDirection

source§

fn clone(&self) -> SortDirection

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 SortDirection

source§

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

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

impl Default for SortDirection

source§

fn default() -> SortDirection

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

impl<'de> Deserialize<'de> for SortDirection

Trait Implementations§

§

impl Clone for SortDirection

§

fn clone(&self) -> SortDirection

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 SortDirection

§

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

Formats the value using the given formatter. Read more
§

impl Default for SortDirection

§

fn default() -> SortDirection

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

impl<'de> Deserialize<'de> for SortDirection

§

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

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

impl Serialize for SortDirection

source§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Serialize for SortDirection

§

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

impl Copy for SortDirection

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Copy for SortDirection

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/2547/docs/iroh/docs/store/fs/index.html b/pr/2547/docs/iroh/docs/store/fs/index.html index 80bae1898f..ec3d5230cc 100644 --- a/pr/2547/docs/iroh/docs/store/fs/index.html +++ b/pr/2547/docs/iroh/docs/store/fs/index.html @@ -1,3 +1,3 @@ -iroh::docs::store::fs - Rust

Module iroh::docs::store::fs

source ·
Expand description

On disk storage for replicas.

+iroh::docs::store::fs - Rust

Module iroh::docs::store::fs

Expand description

On disk storage for replicas.

Structs§

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/store/fs/struct.ContentHashesIterator.html b/pr/2547/docs/iroh/docs/store/fs/struct.ContentHashesIterator.html index fc35e916ca..89749246ea 100644 --- a/pr/2547/docs/iroh/docs/store/fs/struct.ContentHashesIterator.html +++ b/pr/2547/docs/iroh/docs/store/fs/struct.ContentHashesIterator.html @@ -1,14 +1,14 @@ -ContentHashesIterator in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::ContentHashesIterator

source ·
pub struct ContentHashesIterator {
+ContentHashesIterator in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::ContentHashesIterator

pub struct ContentHashesIterator {
     range: RecordsRange<'static>,
 }
Expand description

Iterator for all content hashes

Note that you might get duplicate hashes. Also, the iterator will keep a database snapshot open until it is dropped.

Also, this represents a snapshot of the database at the time of creation. It needs a copy of a redb::ReadOnlyTable to be self-contained.

-

Fields§

§range: RecordsRange<'static>

Implementations§

source§

impl ContentHashesIterator

source

pub fn all( +

Fields§

§range: RecordsRange<'static>

Implementations§

§

impl ContentHashesIterator

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<ContentHashesIterator, Error>

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<(), Error>

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<<ContentHashesIterator as Iterator>::Item>

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

fn next_chunk<const N: usize>( +

Trait Implementations§

§

impl Debug for ContentHashesIterator

§

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

Formats the value using the given formatter. Read more
§

impl Iterator for ContentHashesIterator

§

type Item = Result<Hash, Error>

The type of the elements being iterated over.
§

fn next(&mut self) -> Option<<ContentHashesIterator as Iterator>::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/2547/docs/iroh/docs/store/fs/struct.LatestIterator.html b/pr/2547/docs/iroh/docs/store/fs/struct.LatestIterator.html index eb31db1087..37bc64e88e 100644 --- a/pr/2547/docs/iroh/docs/store/fs/struct.LatestIterator.html +++ b/pr/2547/docs/iroh/docs/store/fs/struct.LatestIterator.html @@ -1,5 +1,5 @@ -LatestIterator in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::LatestIterator

source ·
pub struct LatestIterator<'a>(Range<'a, (&'static [u8; 32], &'static [u8; 32]), (u64, &'static [u8])>);
Expand description

Iterator over the latest entry per author.

-

Tuple Fields§

§0: Range<'a, (&'static [u8; 32], &'static [u8; 32]), (u64, &'static [u8])>

Trait Implementations§

source§

impl<'a> Debug for LatestIterator<'a>

source§

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

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

impl<'a> Iterator for LatestIterator<'a>

§

type Item = Result<(AuthorId, u64, Vec<u8>), Error>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<<LatestIterator<'a> as Iterator>::Item>

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

fn next_chunk<const N: usize>( +LatestIterator in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::LatestIterator

pub struct LatestIterator<'a>(Range<'a, (&'static [u8; 32], &'static [u8; 32]), (u64, &'static [u8])>);
Expand description

Iterator over the latest entry per author.

+

Tuple Fields§

§0: Range<'a, (&'static [u8; 32], &'static [u8; 32]), (u64, &'static [u8])>

Trait Implementations§

§

impl<'a> Debug for LatestIterator<'a>

§

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

Formats the value using the given formatter. Read more
§

impl<'a> Iterator for LatestIterator<'a>

§

type Item = Result<(AuthorId, u64, Vec<u8>), Error>

The type of the elements being iterated over.
§

fn next(&mut self) -> Option<<LatestIterator<'a> as Iterator>::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/2547/docs/iroh/docs/store/fs/struct.ParentIterator.html b/pr/2547/docs/iroh/docs/store/fs/struct.ParentIterator.html index c21c25afb9..1e232764da 100644 --- a/pr/2547/docs/iroh/docs/store/fs/struct.ParentIterator.html +++ b/pr/2547/docs/iroh/docs/store/fs/struct.ParentIterator.html @@ -1,8 +1,8 @@ -ParentIterator in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::ParentIterator

source ·
pub struct ParentIterator {
+ParentIterator in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::ParentIterator

pub struct ParentIterator {
     inner: IntoIter<Result<SignedEntry, Error>>,
 }
Expand description

Iterator over parent entries, i.e. entries with the same namespace and author, and a key which is a prefix of the key passed to the iterator.

-

Fields§

§inner: IntoIter<Result<SignedEntry, Error>>

Trait Implementations§

source§

impl Debug for ParentIterator

source§

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

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

impl Iterator for ParentIterator

§

type Item = Result<SignedEntry, Error>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<<ParentIterator as Iterator>::Item>

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

fn next_chunk<const N: usize>( +

Fields§

§inner: IntoIter<Result<SignedEntry, Error>>

Trait Implementations§

§

impl Debug for ParentIterator

§

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

Formats the value using the given formatter. Read more
§

impl Iterator for ParentIterator

§

type Item = Result<SignedEntry, Error>

The type of the elements being iterated over.
§

fn next(&mut self) -> Option<<ParentIterator as Iterator>::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/2547/docs/iroh/docs/store/fs/struct.RecordsRange.html b/pr/2547/docs/iroh/docs/store/fs/struct.RecordsRange.html index 1ba866eb63..2a640e469a 100644 --- a/pr/2547/docs/iroh/docs/store/fs/struct.RecordsRange.html +++ b/pr/2547/docs/iroh/docs/store/fs/struct.RecordsRange.html @@ -1,5 +1,5 @@ -RecordsRange in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::RecordsRange

source ·
pub struct RecordsRange<'a>(Range<'a, (&'static [u8; 32], &'static [u8; 32], &'static [u8]), (u64, &'static [u8; 64], &'static [u8; 64], u64, &'static [u8; 32])>);
Expand description

An iterator over a range of entries from the records table.

-

Tuple Fields§

§0: Range<'a, (&'static [u8; 32], &'static [u8; 32], &'static [u8]), (u64, &'static [u8; 64], &'static [u8; 64], u64, &'static [u8; 32])>

Trait Implementations§

source§

impl<'a> Debug for RecordsRange<'a>

source§

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

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

impl<'a> Iterator for RecordsRange<'a>

§

type Item = Result<SignedEntry, Error>

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<<RecordsRange<'a> as Iterator>::Item>

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

fn next_chunk<const N: usize>( +RecordsRange in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::RecordsRange

pub struct RecordsRange<'a>(Range<'a, (&'static [u8; 32], &'static [u8; 32], &'static [u8]), (u64, &'static [u8; 64], &'static [u8; 64], u64, &'static [u8; 32])>);
Expand description

An iterator over a range of entries from the records table.

+

Tuple Fields§

§0: Range<'a, (&'static [u8; 32], &'static [u8; 32], &'static [u8]), (u64, &'static [u8; 64], &'static [u8; 64], u64, &'static [u8; 32])>

Trait Implementations§

§

impl<'a> Debug for RecordsRange<'a>

§

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

Formats the value using the given formatter. Read more
§

impl<'a> Iterator for RecordsRange<'a>

§

type Item = Result<SignedEntry, Error>

The type of the elements being iterated over.
§

fn next(&mut self) -> Option<<RecordsRange<'a> as Iterator>::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/2547/docs/iroh/docs/store/fs/struct.Store.html b/pr/2547/docs/iroh/docs/store/fs/struct.Store.html index 424f3dd9c2..46c6d0b9b1 100644 --- a/pr/2547/docs/iroh/docs/store/fs/struct.Store.html +++ b/pr/2547/docs/iroh/docs/store/fs/struct.Store.html @@ -1,107 +1,107 @@ -Store in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::Store

source ·
pub struct Store {
+Store in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::Store

pub struct Store {
     db: Database,
-    transaction: CurrentTransaction,
+    transaction: CurrentTransaction,
     open_replicas: HashSet<NamespaceId>,
     pubkeys: MemPublicKeyStore,
 }
Expand description

Manages the replicas and authors for an instance.

-

Fields§

§db: Database§transaction: CurrentTransaction§open_replicas: HashSet<NamespaceId>§pubkeys: MemPublicKeyStore

Implementations§

source§

impl Store

source

pub fn memory() -> Store

Create a new store in memory.

-
source

pub fn persistent(path: impl AsRef<Path>) -> Result<Store, Error>

Create or open a store from a path to a database file.

+

Fields§

§db: Database§transaction: CurrentTransaction§open_replicas: HashSet<NamespaceId>§pubkeys: MemPublicKeyStore

Implementations§

§

impl Store

pub fn memory() -> Store

Create a new store in memory.

+

pub fn persistent(path: impl AsRef<Path>) -> Result<Store, Error>

Create or open a store from a path to a database file.

The file will be created if it does not exist, otherwise it will be opened.

-
source

pub fn flush(&mut self) -> Result<(), Error>

Flush the current transaction, if any.

+

pub fn flush(&mut self) -> Result<(), Error>

Flush the current transaction, if any.

This is the cheapest way to ensure that the data is persisted.

-
source

pub fn snapshot(&mut self) -> Result<&ReadOnlyTables, Error>

Get a read-only snapshot of the database.

+

pub fn snapshot(&mut self) -> Result<&ReadOnlyTables, Error>

Get a read-only snapshot of the database.

This has the side effect of committing any open write transaction, so it can be used as a way to ensure that the data is persisted.

-
source

pub fn snapshot_owned(&mut self) -> Result<ReadOnlyTables, Error>

Get an owned read-only snapshot of the database.

+

pub fn snapshot_owned(&mut self) -> Result<ReadOnlyTables, Error>

Get an owned read-only snapshot of the database.

This will open a new read transaction. The read transaction won’t be reused for other reads.

This has the side effect of committing any open write transaction, so it can be used as a way to ensure that the data is persisted.

-
source§

impl Store

§

impl Store

pub fn new_replica( &mut self, namespace: NamespaceSecret ) -> Result<Replica<'_>, Error>

Create a new replica for namespace and persist in this store.

-
source

pub fn new_author<R>(&mut self, rng: &mut R) -> Result<Author, Error>
where +

pub fn new_author<R>(&mut self, rng: &mut R) -> Result<Author, Error>
where R: CryptoRngCore + ?Sized,

Create a new author key and persist it in the store.

-
source

pub fn has_news_for_us( +

pub fn has_news_for_us( &mut self, namespace: NamespaceId, heads: &AuthorHeads ) -> Result<Option<NonZero<u64>>, Error>

Check if a AuthorHeads contains entry timestamps that we do not have locally.

Returns the number of authors that the other peer has updates for.

-
source

pub fn open_replica( +

pub fn open_replica( &mut self, namespace_id: &NamespaceId ) -> Result<Replica<'_>, OpenError>

Open a replica from this store.

This just calls load_replica_info and then creates a new replica with the info.

-
source

pub fn load_replica_info( +

pub fn load_replica_info( &mut self, namespace_id: &NamespaceId ) -> Result<ReplicaInfo, OpenError>

Load the replica info from the store.

-
source

pub fn close_replica(&mut self, id: NamespaceId)

Close a replica.

-
source

pub fn list_namespaces( +

pub fn close_replica(&mut self, id: NamespaceId)

Close a replica.

+

pub fn list_namespaces( &mut self ) -> Result<impl Iterator<Item = Result<(NamespaceId, CapabilityKind), Error>>, Error>

List all replica namespaces in this store.

-
source

pub fn get_author( +

pub fn get_author( &mut self, author_id: &AuthorId ) -> Result<Option<Author>, Error>

Get an author key from the store.

-
source

pub fn import_author(&mut self, author: Author) -> Result<(), Error>

Import an author key pair.

-
source

pub fn delete_author(&mut self, author: AuthorId) -> Result<(), Error>

Delete an author.

-
source

pub fn list_authors( +

pub fn import_author(&mut self, author: Author) -> Result<(), Error>

Import an author key pair.

+

pub fn delete_author(&mut self, author: AuthorId) -> Result<(), Error>

Delete an author.

+

pub fn list_authors( &mut self ) -> Result<impl Iterator<Item = Result<Author, Error>>, Error>

List all author keys in this store.

-
source

pub fn import_namespace( +

pub fn import_namespace( &mut self, capability: Capability ) -> Result<ImportNamespaceOutcome, Error>

Import a new replica namespace.

-
source

pub fn remove_replica(&mut self, namespace: &NamespaceId) -> Result<(), Error>

Remove a replica.

+

pub fn remove_replica(&mut self, namespace: &NamespaceId) -> Result<(), Error>

Remove a replica.

Completely removes a replica and deletes both the namespace private key and all document entries.

Note that a replica has to be closed before it can be removed. The store has to enforce that a replica cannot be removed while it is still open.

-
source

pub fn get_many( +

pub fn get_many( &mut self, namespace: NamespaceId, query: impl Into<Query> -) -> Result<QueryIterator, Error>

Get an iterator over entries of a replica.

-
source

pub fn get_exact( +) -> Result<QueryIterator, Error>

Get an iterator over entries of a replica.

+

pub fn get_exact( &mut self, namespace: NamespaceId, author: AuthorId, key: impl AsRef<[u8]>, include_empty: bool ) -> Result<Option<SignedEntry>, Error>

Get an entry by key and author.

-
source

pub fn content_hashes(&mut self) -> Result<ContentHashesIterator, Error>

Get all content hashes of all replicas in the store.

-
source

pub fn get_latest_for_each_author( +

pub fn content_hashes(&mut self) -> Result<ContentHashesIterator, Error>

Get all content hashes of all replicas in the store.

+

pub fn get_latest_for_each_author( &mut self, namespace: NamespaceId ) -> Result<LatestIterator<'_>, Error>

Get the latest entry for each author in a namespace.

-
source

pub fn register_useful_peer( +

pub fn register_useful_peer( &mut self, namespace: NamespaceId, peer: [u8; 32] ) -> Result<(), Error>

Register a peer that has been useful to sync a document.

-
source

pub fn get_sync_peers( +

pub fn get_sync_peers( &mut self, namespace: &NamespaceId ) -> Result<Option<IntoIter<[u8; 32]>>, Error>

Get the peers that have been useful for a document.

-
source

pub fn set_download_policy( +

pub fn set_download_policy( &mut self, namespace: &NamespaceId, policy: DownloadPolicy ) -> Result<(), Error>

Set the download policy for a namespace.

-
source

pub fn get_download_policy( +

pub fn get_download_policy( &mut self, namespace: &NamespaceId ) -> Result<DownloadPolicy, Error>

Get the download policy for a namespace.

-

Trait Implementations§

source§

impl AsMut<Store> for Store

source§

fn as_mut(&mut self) -> &mut Store

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

impl AsRef<Store> for Store

source§

fn as_ref(&self) -> &Store

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

impl Debug for Store

source§

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

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

impl DownloadPolicyStore for Store

Trait Implementations§

§

impl AsMut<Store> for Store

§

fn as_mut(&mut self) -> &mut Store

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

impl AsRef<Store> for Store

§

fn as_ref(&self) -> &Store

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

impl Debug for Store

§

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

Formats the value using the given formatter. Read more
§

impl DownloadPolicyStore for Store

§

fn get_download_policy( &mut self, namespace: &NamespaceId -) -> Result<DownloadPolicy, Error>

Get the download policy for a document.
source§

impl PublicKeyStore for Store

source§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey]. Read more
source§

fn namespace_key( +) -> Result<DownloadPolicy, Error>

Get the download policy for a document.
§

impl PublicKeyStore for Store

§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey]. Read more
§

fn namespace_key( &self, bytes: &NamespaceId -) -> Result<NamespacePublicKey, Error>

source§

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Auto Trait Implementations§

§

impl Freeze for Store

§

impl !RefUnwindSafe for Store

§

impl Send for Store

§

impl Sync for Store

§

impl Unpin for Store

§

impl !UnwindSafe for Store

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Result<NamespacePublicKey, Error>

§

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Auto Trait Implementations§

§

impl Freeze for Store

§

impl !RefUnwindSafe for Store

§

impl Send for Store

§

impl Sync for Store

§

impl Unpin for Store

§

impl !UnwindSafe for Store

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/2547/docs/iroh/docs/store/fs/struct.StoreInstance.html b/pr/2547/docs/iroh/docs/store/fs/struct.StoreInstance.html index 08987c3e70..c7b1877177 100644 --- a/pr/2547/docs/iroh/docs/store/fs/struct.StoreInstance.html +++ b/pr/2547/docs/iroh/docs/store/fs/struct.StoreInstance.html @@ -1,14 +1,14 @@ -StoreInstance in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::StoreInstance

source ·
pub struct StoreInstance<'a> {
+StoreInstance in iroh::docs::store::fs - Rust

Struct iroh::docs::store::fs::StoreInstance

pub struct StoreInstance<'a> {
     namespace: NamespaceId,
     pub(crate) store: &'a mut Store,
 }
Expand description

A wrapper around Store for a specific NamespaceId

-

Fields§

§namespace: NamespaceId§store: &'a mut Store

Trait Implementations§

source§

impl<'a> Debug for StoreInstance<'a>

source§

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

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

impl<'a> DownloadPolicyStore for StoreInstance<'a>

Fields§

§namespace: NamespaceId§store: &'a mut Store

Trait Implementations§

§

impl<'a> Debug for StoreInstance<'a>

§

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

Formats the value using the given formatter. Read more
§

impl<'a> DownloadPolicyStore for StoreInstance<'a>

§

fn get_download_policy( &mut self, namespace: &NamespaceId -) -> Result<DownloadPolicy, Error>

Get the download policy for a document.
source§

impl<'a> PublicKeyStore for StoreInstance<'a>

source§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey]. Read more
source§

fn namespace_key( +) -> Result<DownloadPolicy, Error>

Get the download policy for a document.
§

impl<'a> PublicKeyStore for StoreInstance<'a>

§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey]. Read more
§

fn namespace_key( &self, bytes: &NamespaceId -) -> Result<NamespacePublicKey, Error>

source§

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Auto Trait Implementations§

§

impl<'a> Freeze for StoreInstance<'a>

§

impl<'a> !RefUnwindSafe for StoreInstance<'a>

§

impl<'a> Send for StoreInstance<'a>

§

impl<'a> Sync for StoreInstance<'a>

§

impl<'a> Unpin for StoreInstance<'a>

§

impl<'a> !UnwindSafe for StoreInstance<'a>

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Result<NamespacePublicKey, Error>

§

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Auto Trait Implementations§

§

impl<'a> Freeze for StoreInstance<'a>

§

impl<'a> !RefUnwindSafe for StoreInstance<'a>

§

impl<'a> Send for StoreInstance<'a>

§

impl<'a> Sync for StoreInstance<'a>

§

impl<'a> Unpin for StoreInstance<'a>

§

impl<'a> !UnwindSafe for StoreInstance<'a>

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/2547/docs/iroh/docs/store/index.html b/pr/2547/docs/iroh/docs/store/index.html index d3c57c6bea..e2e269b16f 100644 --- a/pr/2547/docs/iroh/docs/store/index.html +++ b/pr/2547/docs/iroh/docs/store/index.html @@ -1,3 +1,3 @@ -iroh::docs::store - Rust

Module iroh::docs::store

source ·
Expand description

Storage trait and implementation for iroh-docs documents

+iroh::docs::store - Rust

Module iroh::docs::store

Expand description

Storage trait and implementation for iroh-docs documents

Modules§

  • On disk storage for replicas.

Structs§

  • Query on all entries without aggregation.
  • In-memory key storage
  • Note: When using the SingleLatestPerKey query kind, the key filter is applied before the grouping, the author filter is applied after the grouping.
  • A query builder for document queries.
  • Query that only returns the latest entry for a key which has entries from multiple authors.
  • Manages the replicas and authors for an instance.

Enums§

Traits§

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/store/struct.FlatQuery.html b/pr/2547/docs/iroh/docs/store/struct.FlatQuery.html index 25d0395b3c..d4a07055f4 100644 --- a/pr/2547/docs/iroh/docs/store/struct.FlatQuery.html +++ b/pr/2547/docs/iroh/docs/store/struct.FlatQuery.html @@ -1,10 +1,10 @@ -FlatQuery in iroh::docs::store - Rust

Struct iroh::docs::store::FlatQuery

source ·
pub struct FlatQuery {
+FlatQuery in iroh::docs::store - Rust

Struct iroh::docs::store::FlatQuery

pub struct FlatQuery {
     sort_by: SortBy,
 }
Expand description

Query on all entries without aggregation.

-

Fields§

§sort_by: SortBy

Trait Implementations§

source§

impl Clone for FlatQuery

source§

fn clone(&self) -> FlatQuery

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 FlatQuery

source§

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

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

impl Default for FlatQuery

source§

fn default() -> FlatQuery

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

impl<'de> Deserialize<'de> for FlatQuery

Fields§

§sort_by: SortBy

Trait Implementations§

§

impl Clone for FlatQuery

§

fn clone(&self) -> FlatQuery

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 FlatQuery

§

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

Formats the value using the given formatter. Read more
§

impl Default for FlatQuery

§

fn default() -> FlatQuery

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

impl<'de> Deserialize<'de> for FlatQuery

§

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

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

impl Serialize for FlatQuery

source§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Serialize for FlatQuery

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2547/docs/iroh/docs/store/struct.MemPublicKeyStore.html b/pr/2547/docs/iroh/docs/store/struct.MemPublicKeyStore.html index bd8bd83374..50bbfcd8ef 100644 --- a/pr/2547/docs/iroh/docs/store/struct.MemPublicKeyStore.html +++ b/pr/2547/docs/iroh/docs/store/struct.MemPublicKeyStore.html @@ -1,10 +1,10 @@ -MemPublicKeyStore in iroh::docs::store - Rust

Struct iroh::docs::store::MemPublicKeyStore

source ·
pub struct MemPublicKeyStore {
+MemPublicKeyStore in iroh::docs::store - Rust

Struct iroh::docs::store::MemPublicKeyStore

pub struct MemPublicKeyStore {
     keys: Arc<RwLock<HashMap<[u8; 32], VerifyingKey>>>,
 }
Expand description

In-memory key storage

-

Fields§

§keys: Arc<RwLock<HashMap<[u8; 32], VerifyingKey>>>

Trait Implementations§

source§

impl Clone for MemPublicKeyStore

source§

fn clone(&self) -> MemPublicKeyStore

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 MemPublicKeyStore

source§

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

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

impl Default for MemPublicKeyStore

source§

fn default() -> MemPublicKeyStore

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

impl PublicKeyStore for MemPublicKeyStore

source§

fn public_key(&self, bytes: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey]. Read more
source§

fn namespace_key( +

Fields§

§keys: Arc<RwLock<HashMap<[u8; 32], VerifyingKey>>>

Trait Implementations§

§

impl Clone for MemPublicKeyStore

§

fn clone(&self) -> MemPublicKeyStore

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 MemPublicKeyStore

§

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

Formats the value using the given formatter. Read more
§

impl Default for MemPublicKeyStore

§

fn default() -> MemPublicKeyStore

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

impl PublicKeyStore for MemPublicKeyStore

§

fn public_key(&self, bytes: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey]. Read more
§

fn namespace_key( &self, bytes: &NamespaceId -) -> Result<NamespacePublicKey, Error>

source§

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Result<NamespacePublicKey, Error>

§

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

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/2547/docs/iroh/docs/store/struct.Query.html b/pr/2547/docs/iroh/docs/store/struct.Query.html index a2492712aa..057b67efc8 100644 --- a/pr/2547/docs/iroh/docs/store/struct.Query.html +++ b/pr/2547/docs/iroh/docs/store/struct.Query.html @@ -1,5 +1,5 @@ -Query in iroh::docs::store - Rust

Struct iroh::docs::store::Query

source ·
pub struct Query {
-    kind: QueryKind,
+Query in iroh::docs::store - Rust

Struct iroh::docs::store::Query

pub struct Query {
+    kind: QueryKind,
     filter_author: AuthorFilter,
     filter_key: KeyFilter,
     limit: Option<u64>,
@@ -8,18 +8,18 @@
     sort_direction: SortDirection,
 }
Expand description

Note: When using the SingleLatestPerKey query kind, the key filter is applied before the grouping, the author filter is applied after the grouping.

-

Fields§

§kind: QueryKind§filter_author: AuthorFilter§filter_key: KeyFilter§limit: Option<u64>§offset: u64§include_empty: bool§sort_direction: SortDirection

Implementations§

source§

impl Query

source

pub fn all() -> QueryBuilder<FlatQuery>

Query all records.

-
source

pub fn single_latest_per_key() -> QueryBuilder<SingleLatestPerKeyQuery>

Query only the latest entry for each key, omitting older entries if the entry was written +

Fields§

§kind: QueryKind§filter_author: AuthorFilter§filter_key: KeyFilter§limit: Option<u64>§offset: u64§include_empty: bool§sort_direction: SortDirection

Implementations§

§

impl Query

pub fn all() -> QueryBuilder<FlatQuery>

Query all records.

+

pub fn single_latest_per_key() -> QueryBuilder<SingleLatestPerKeyQuery>

Query only the latest entry for each key, omitting older entries if the entry was written to by multiple authors.

-
source

pub fn author(author: AuthorId) -> QueryBuilder<FlatQuery>

Create a Query::all query filtered by a single author.

-
source

pub fn key_exact(key: impl AsRef<[u8]>) -> QueryBuilder<FlatQuery>

Create a Query::all query filtered by a single key.

-
source

pub fn key_prefix(prefix: impl AsRef<[u8]>) -> QueryBuilder<FlatQuery>

Create a Query::all query filtered by a key prefix.

-
source

pub fn limit(&self) -> Option<u64>

Get the limit for this query (max. number of entries to emit).

-
source

pub fn offset(&self) -> u64

Get the offset for this query (number of entries to skip at the beginning).

-

Trait Implementations§

source§

impl Clone for Query

source§

fn clone(&self) -> Query

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 Query

source§

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

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

impl<'de> Deserialize<'de> for Query

pub fn author(author: AuthorId) -> QueryBuilder<FlatQuery>

Create a Query::all query filtered by a single author.

+

pub fn key_exact(key: impl AsRef<[u8]>) -> QueryBuilder<FlatQuery>

Create a Query::all query filtered by a single key.

+

pub fn key_prefix(prefix: impl AsRef<[u8]>) -> QueryBuilder<FlatQuery>

Create a Query::all query filtered by a key prefix.

+

pub fn limit(&self) -> Option<u64>

Get the limit for this query (max. number of entries to emit).

+

pub fn offset(&self) -> u64

Get the offset for this query (number of entries to skip at the beginning).

+

Trait Implementations§

§

impl Clone for Query

§

fn clone(&self) -> Query

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 Query

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Query

§

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

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

impl From<QueryBuilder<FlatQuery>> for Query

source§

fn from(builder: QueryBuilder<FlatQuery>) -> Query

Converts to this type from the input type.
source§

impl From<QueryBuilder<SingleLatestPerKeyQuery>> for Query

source§

fn from(builder: QueryBuilder<SingleLatestPerKeyQuery>) -> Query

Converts to this type from the input type.
source§

impl Serialize for Query

source§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl From<QueryBuilder<FlatQuery>> for Query

§

fn from(builder: QueryBuilder<FlatQuery>) -> Query

Converts to this type from the input type.
§

impl From<QueryBuilder<SingleLatestPerKeyQuery>> for Query

§

fn from(builder: QueryBuilder<SingleLatestPerKeyQuery>) -> Query

Converts to this type from the input type.
§

impl Serialize for Query

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2547/docs/iroh/docs/store/struct.QueryBuilder.html b/pr/2547/docs/iroh/docs/store/struct.QueryBuilder.html index 513b3d3d88..46fde5fdf7 100644 --- a/pr/2547/docs/iroh/docs/store/struct.QueryBuilder.html +++ b/pr/2547/docs/iroh/docs/store/struct.QueryBuilder.html @@ -1,4 +1,4 @@ -QueryBuilder in iroh::docs::store - Rust

Struct iroh::docs::store::QueryBuilder

source ·
pub struct QueryBuilder<K> {
+QueryBuilder in iroh::docs::store - Rust

Struct iroh::docs::store::QueryBuilder

pub struct QueryBuilder<K> {
     kind: K,
     filter_author: AuthorFilter,
     filter_key: KeyFilter,
@@ -7,29 +7,29 @@
     include_empty: bool,
     sort_direction: SortDirection,
 }
Expand description

A query builder for document queries.

-

Fields§

§kind: K§filter_author: AuthorFilter§filter_key: KeyFilter§limit: Option<u64>§offset: u64§include_empty: bool§sort_direction: SortDirection

Implementations§

source§

impl<K> QueryBuilder<K>

source

pub fn include_empty(self) -> QueryBuilder<K>

Call to include empty entries (deletion markers).

-
source

pub fn key_exact(self, key: impl AsRef<[u8]>) -> QueryBuilder<K>

Filter by exact key match.

-
source

pub fn key_prefix(self, key: impl AsRef<[u8]>) -> QueryBuilder<K>

Filter by key prefix.

-
source

pub fn author(self, author: AuthorId) -> QueryBuilder<K>

Filter by author.

-
source

pub fn limit(self, limit: u64) -> QueryBuilder<K>

Set the maximum number of entries to be returned.

-
source

pub fn offset(self, offset: u64) -> QueryBuilder<K>

Set the offset within the result set from where to start returning results.

-
source§

impl QueryBuilder<FlatQuery>

source

pub fn sort_by( +

Fields§

§kind: K§filter_author: AuthorFilter§filter_key: KeyFilter§limit: Option<u64>§offset: u64§include_empty: bool§sort_direction: SortDirection

Implementations§

§

impl<K> QueryBuilder<K>

pub fn include_empty(self) -> QueryBuilder<K>

Call to include empty entries (deletion markers).

+

pub fn key_exact(self, key: impl AsRef<[u8]>) -> QueryBuilder<K>

Filter by exact key match.

+

pub fn key_prefix(self, key: impl AsRef<[u8]>) -> QueryBuilder<K>

Filter by key prefix.

+

pub fn author(self, author: AuthorId) -> QueryBuilder<K>

Filter by author.

+

pub fn limit(self, limit: u64) -> QueryBuilder<K>

Set the maximum number of entries to be returned.

+

pub fn offset(self, offset: u64) -> QueryBuilder<K>

Set the offset within the result set from where to start returning results.

+
§

impl QueryBuilder<FlatQuery>

pub fn sort_by( self, sort_by: SortBy, direction: SortDirection ) -> QueryBuilder<FlatQuery>

Set the sort for the query.

The default is to sort by author, then by key, in ascending order.

-
source

pub fn build(self) -> Query

Build the query.

-
source§

impl QueryBuilder<SingleLatestPerKeyQuery>

pub fn build(self) -> Query

Build the query.

+

§

impl QueryBuilder<SingleLatestPerKeyQuery>

pub fn sort_direction( self, direction: SortDirection ) -> QueryBuilder<SingleLatestPerKeyQuery>

Set the order direction for the query.

Ordering is always by key for this query type. Default direction is ascending.

-
source

pub fn build(self) -> Query

Build the query.

-

Trait Implementations§

source§

impl<K> Debug for QueryBuilder<K>
where - K: Debug,

source§

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

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

impl<K> Default for QueryBuilder<K>
where - K: Default,

source§

fn default() -> QueryBuilder<K>

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

impl From<QueryBuilder<FlatQuery>> for Query

source§

fn from(builder: QueryBuilder<FlatQuery>) -> Query

Converts to this type from the input type.
source§

impl From<QueryBuilder<SingleLatestPerKeyQuery>> for Query

source§

fn from(builder: QueryBuilder<SingleLatestPerKeyQuery>) -> Query

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<K> !Freeze for QueryBuilder<K>

§

impl<K> RefUnwindSafe for QueryBuilder<K>
where +

pub fn build(self) -> Query

Build the query.

+

Trait Implementations§

§

impl<K> Debug for QueryBuilder<K>
where + K: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<K> Default for QueryBuilder<K>
where + K: Default,

§

fn default() -> QueryBuilder<K>

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

impl From<QueryBuilder<FlatQuery>> for Query

§

fn from(builder: QueryBuilder<FlatQuery>) -> Query

Converts to this type from the input type.
§

impl From<QueryBuilder<SingleLatestPerKeyQuery>> for Query

§

fn from(builder: QueryBuilder<SingleLatestPerKeyQuery>) -> Query

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<K> !Freeze for QueryBuilder<K>

§

impl<K> RefUnwindSafe for QueryBuilder<K>
where K: RefUnwindSafe,

§

impl<K> Send for QueryBuilder<K>
where K: Send,

§

impl<K> Sync for QueryBuilder<K>
where K: Sync,

§

impl<K> Unpin for QueryBuilder<K>
where diff --git a/pr/2547/docs/iroh/docs/store/struct.SingleLatestPerKeyQuery.html b/pr/2547/docs/iroh/docs/store/struct.SingleLatestPerKeyQuery.html index 49dbedb4ee..52a97211fc 100644 --- a/pr/2547/docs/iroh/docs/store/struct.SingleLatestPerKeyQuery.html +++ b/pr/2547/docs/iroh/docs/store/struct.SingleLatestPerKeyQuery.html @@ -1,8 +1,8 @@ -SingleLatestPerKeyQuery in iroh::docs::store - Rust

Struct iroh::docs::store::SingleLatestPerKeyQuery

source ·
pub struct SingleLatestPerKeyQuery {}
Expand description

Query that only returns the latest entry for a key which has entries from multiple authors.

-

Trait Implementations§

source§

impl Clone for SingleLatestPerKeyQuery

source§

fn clone(&self) -> SingleLatestPerKeyQuery

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 SingleLatestPerKeyQuery

source§

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

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

impl Default for SingleLatestPerKeyQuery

source§

fn default() -> SingleLatestPerKeyQuery

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

impl<'de> Deserialize<'de> for SingleLatestPerKeyQuery

source§

fn deserialize<__D>( +SingleLatestPerKeyQuery in iroh::docs::store - Rust

Struct iroh::docs::store::SingleLatestPerKeyQuery

pub struct SingleLatestPerKeyQuery {}
Expand description

Query that only returns the latest entry for a key which has entries from multiple authors.

+

Trait Implementations§

§

impl Clone for SingleLatestPerKeyQuery

§

fn clone(&self) -> SingleLatestPerKeyQuery

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 SingleLatestPerKeyQuery

§

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

Formats the value using the given formatter. Read more
§

impl Default for SingleLatestPerKeyQuery

§

fn default() -> SingleLatestPerKeyQuery

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

impl<'de> Deserialize<'de> for SingleLatestPerKeyQuery

§

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

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

impl Serialize for SingleLatestPerKeyQuery

source§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Serialize for SingleLatestPerKeyQuery

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2547/docs/iroh/docs/store/struct.Store.html b/pr/2547/docs/iroh/docs/store/struct.Store.html index 6d725579f7..614e3fff9a 100644 --- a/pr/2547/docs/iroh/docs/store/struct.Store.html +++ b/pr/2547/docs/iroh/docs/store/struct.Store.html @@ -1,107 +1,107 @@ -Store in iroh::docs::store - Rust

Struct iroh::docs::store::Store

source ·
pub struct Store {
+Store in iroh::docs::store - Rust

Struct iroh::docs::store::Store

pub struct Store {
     db: Database,
-    transaction: CurrentTransaction,
+    transaction: CurrentTransaction,
     open_replicas: HashSet<NamespaceId>,
     pubkeys: MemPublicKeyStore,
 }
Expand description

Manages the replicas and authors for an instance.

-

Fields§

§db: Database§transaction: CurrentTransaction§open_replicas: HashSet<NamespaceId>§pubkeys: MemPublicKeyStore

Implementations§

source§

impl Store

source

pub fn memory() -> Store

Create a new store in memory.

-
source

pub fn persistent(path: impl AsRef<Path>) -> Result<Store, Error>

Create or open a store from a path to a database file.

+

Fields§

§db: Database§transaction: CurrentTransaction§open_replicas: HashSet<NamespaceId>§pubkeys: MemPublicKeyStore

Implementations§

§

impl Store

pub fn memory() -> Store

Create a new store in memory.

+

pub fn persistent(path: impl AsRef<Path>) -> Result<Store, Error>

Create or open a store from a path to a database file.

The file will be created if it does not exist, otherwise it will be opened.

-
source

pub fn flush(&mut self) -> Result<(), Error>

Flush the current transaction, if any.

+

pub fn flush(&mut self) -> Result<(), Error>

Flush the current transaction, if any.

This is the cheapest way to ensure that the data is persisted.

-
source

pub fn snapshot(&mut self) -> Result<&ReadOnlyTables, Error>

Get a read-only snapshot of the database.

+

pub fn snapshot(&mut self) -> Result<&ReadOnlyTables, Error>

Get a read-only snapshot of the database.

This has the side effect of committing any open write transaction, so it can be used as a way to ensure that the data is persisted.

-
source

pub fn snapshot_owned(&mut self) -> Result<ReadOnlyTables, Error>

Get an owned read-only snapshot of the database.

+

pub fn snapshot_owned(&mut self) -> Result<ReadOnlyTables, Error>

Get an owned read-only snapshot of the database.

This will open a new read transaction. The read transaction won’t be reused for other reads.

This has the side effect of committing any open write transaction, so it can be used as a way to ensure that the data is persisted.

-
source§

impl Store

§

impl Store

pub fn new_replica( &mut self, namespace: NamespaceSecret ) -> Result<Replica<'_>, Error>

Create a new replica for namespace and persist in this store.

-
source

pub fn new_author<R>(&mut self, rng: &mut R) -> Result<Author, Error>
where +

pub fn new_author<R>(&mut self, rng: &mut R) -> Result<Author, Error>
where R: CryptoRngCore + ?Sized,

Create a new author key and persist it in the store.

-
source

pub fn has_news_for_us( +

pub fn has_news_for_us( &mut self, namespace: NamespaceId, heads: &AuthorHeads ) -> Result<Option<NonZero<u64>>, Error>

Check if a AuthorHeads contains entry timestamps that we do not have locally.

Returns the number of authors that the other peer has updates for.

-
source

pub fn open_replica( +

pub fn open_replica( &mut self, namespace_id: &NamespaceId ) -> Result<Replica<'_>, OpenError>

Open a replica from this store.

This just calls load_replica_info and then creates a new replica with the info.

-
source

pub fn load_replica_info( +

pub fn load_replica_info( &mut self, namespace_id: &NamespaceId ) -> Result<ReplicaInfo, OpenError>

Load the replica info from the store.

-
source

pub fn close_replica(&mut self, id: NamespaceId)

Close a replica.

-
source

pub fn list_namespaces( +

pub fn close_replica(&mut self, id: NamespaceId)

Close a replica.

+

pub fn list_namespaces( &mut self ) -> Result<impl Iterator<Item = Result<(NamespaceId, CapabilityKind), Error>>, Error>

List all replica namespaces in this store.

-
source

pub fn get_author( +

pub fn get_author( &mut self, author_id: &AuthorId ) -> Result<Option<Author>, Error>

Get an author key from the store.

-
source

pub fn import_author(&mut self, author: Author) -> Result<(), Error>

Import an author key pair.

-
source

pub fn delete_author(&mut self, author: AuthorId) -> Result<(), Error>

Delete an author.

-
source

pub fn list_authors( +

pub fn import_author(&mut self, author: Author) -> Result<(), Error>

Import an author key pair.

+

pub fn delete_author(&mut self, author: AuthorId) -> Result<(), Error>

Delete an author.

+

pub fn list_authors( &mut self ) -> Result<impl Iterator<Item = Result<Author, Error>>, Error>

List all author keys in this store.

-
source

pub fn import_namespace( +

pub fn import_namespace( &mut self, capability: Capability ) -> Result<ImportNamespaceOutcome, Error>

Import a new replica namespace.

-
source

pub fn remove_replica(&mut self, namespace: &NamespaceId) -> Result<(), Error>

Remove a replica.

+

pub fn remove_replica(&mut self, namespace: &NamespaceId) -> Result<(), Error>

Remove a replica.

Completely removes a replica and deletes both the namespace private key and all document entries.

Note that a replica has to be closed before it can be removed. The store has to enforce that a replica cannot be removed while it is still open.

-
source

pub fn get_many( +

pub fn get_many( &mut self, namespace: NamespaceId, query: impl Into<Query> -) -> Result<QueryIterator, Error>

Get an iterator over entries of a replica.

-
source

pub fn get_exact( +) -> Result<QueryIterator, Error>

Get an iterator over entries of a replica.

+

pub fn get_exact( &mut self, namespace: NamespaceId, author: AuthorId, key: impl AsRef<[u8]>, include_empty: bool ) -> Result<Option<SignedEntry>, Error>

Get an entry by key and author.

-
source

pub fn content_hashes(&mut self) -> Result<ContentHashesIterator, Error>

Get all content hashes of all replicas in the store.

-
source

pub fn get_latest_for_each_author( +

pub fn content_hashes(&mut self) -> Result<ContentHashesIterator, Error>

Get all content hashes of all replicas in the store.

+

pub fn get_latest_for_each_author( &mut self, namespace: NamespaceId ) -> Result<LatestIterator<'_>, Error>

Get the latest entry for each author in a namespace.

-
source

pub fn register_useful_peer( +

pub fn register_useful_peer( &mut self, namespace: NamespaceId, peer: [u8; 32] ) -> Result<(), Error>

Register a peer that has been useful to sync a document.

-
source

pub fn get_sync_peers( +

pub fn get_sync_peers( &mut self, namespace: &NamespaceId ) -> Result<Option<IntoIter<[u8; 32]>>, Error>

Get the peers that have been useful for a document.

-
source

pub fn set_download_policy( +

pub fn set_download_policy( &mut self, namespace: &NamespaceId, policy: DownloadPolicy ) -> Result<(), Error>

Set the download policy for a namespace.

-
source

pub fn get_download_policy( +

pub fn get_download_policy( &mut self, namespace: &NamespaceId ) -> Result<DownloadPolicy, Error>

Get the download policy for a namespace.

-

Trait Implementations§

source§

impl AsMut<Store> for Store

source§

fn as_mut(&mut self) -> &mut Store

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

impl AsRef<Store> for Store

source§

fn as_ref(&self) -> &Store

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

impl Debug for Store

source§

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

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

impl DownloadPolicyStore for Store

Trait Implementations§

§

impl AsMut<Store> for Store

§

fn as_mut(&mut self) -> &mut Store

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

impl AsRef<Store> for Store

§

fn as_ref(&self) -> &Store

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

impl Debug for Store

§

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

Formats the value using the given formatter. Read more
§

impl DownloadPolicyStore for Store

§

fn get_download_policy( &mut self, namespace: &NamespaceId -) -> Result<DownloadPolicy, Error>

Get the download policy for a document.
source§

impl PublicKeyStore for Store

source§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey]. Read more
source§

fn namespace_key( +) -> Result<DownloadPolicy, Error>

Get the download policy for a document.
§

impl PublicKeyStore for Store

§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey]. Read more
§

fn namespace_key( &self, bytes: &NamespaceId -) -> Result<NamespacePublicKey, Error>

source§

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Auto Trait Implementations§

§

impl Freeze for Store

§

impl !RefUnwindSafe for Store

§

impl Send for Store

§

impl Sync for Store

§

impl Unpin for Store

§

impl !UnwindSafe for Store

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Result<NamespacePublicKey, Error>

§

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Auto Trait Implementations§

§

impl Freeze for Store

§

impl !RefUnwindSafe for Store

§

impl Send for Store

§

impl Sync for Store

§

impl Unpin for Store

§

impl !UnwindSafe for Store

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/2547/docs/iroh/docs/store/trait.DownloadPolicyStore.html b/pr/2547/docs/iroh/docs/store/trait.DownloadPolicyStore.html index 89bd79fd66..3e7a3ad229 100644 --- a/pr/2547/docs/iroh/docs/store/trait.DownloadPolicyStore.html +++ b/pr/2547/docs/iroh/docs/store/trait.DownloadPolicyStore.html @@ -1,16 +1,16 @@ -DownloadPolicyStore in iroh::docs::store - Rust

Trait iroh::docs::store::DownloadPolicyStore

source ·
pub trait DownloadPolicyStore {
+DownloadPolicyStore in iroh::docs::store - Rust

Trait iroh::docs::store::DownloadPolicyStore

pub trait DownloadPolicyStore {
     // Required method
     fn get_download_policy(
         &mut self,
         namespace: &NamespaceId
     ) -> Result<DownloadPolicy, Error>;
 }
Expand description

Store that gives read access to download policies for a document.

-

Required Methods§

Required Methods§

fn get_download_policy( &mut self, namespace: &NamespaceId ) -> Result<DownloadPolicy, Error>

Get the download policy for a document.

-

Implementations on Foreign Types§

source§

impl<T> DownloadPolicyStore for &mut T

Implementations on Foreign Types§

§

impl<T> DownloadPolicyStore for &mut T

§

fn get_download_policy( &mut self, namespace: &NamespaceId -) -> Result<DownloadPolicy, Error>

Implementors§

\ No newline at end of file +) -> Result<DownloadPolicy, Error>

Implementors§

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/store/trait.PublicKeyStore.html b/pr/2547/docs/iroh/docs/store/trait.PublicKeyStore.html index 0a2940301e..ef840437b5 100644 --- a/pr/2547/docs/iroh/docs/store/trait.PublicKeyStore.html +++ b/pr/2547/docs/iroh/docs/store/trait.PublicKeyStore.html @@ -1,4 +1,4 @@ -PublicKeyStore in iroh::docs::store - Rust

Trait iroh::docs::store::PublicKeyStore

source ·
pub trait PublicKeyStore {
+PublicKeyStore in iroh::docs::store - Rust

Trait iroh::docs::store::PublicKeyStore

pub trait PublicKeyStore {
     // Required method
     fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>;
 
@@ -11,15 +11,15 @@
 }
Expand description

Store trait for expanded public keys for authors and namespaces.

Used to cache [ed25519_dalek::VerifyingKey].

This trait is implemented for the unit type [()], where no caching is used.

-

Required Methods§

source

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey].

+

Required Methods§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Convert a byte array into a [VerifyingKey].

New keys are inserted into the `PublicKeyStore and reused on subsequent calls.

-

Provided Methods§

Provided Methods§

fn namespace_key( &self, bytes: &NamespaceId ) -> Result<NamespacePublicKey, Error>

Convert a NamespaceId into a NamespacePublicKey.

New keys are inserted into the `PublicKeyStore and reused on subsequent calls.

-
source

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Convert a AuthorId into a AuthorPublicKey.

+

fn author_key(&self, bytes: &AuthorId) -> Result<AuthorPublicKey, Error>

Convert a AuthorId into a AuthorPublicKey.

New keys are inserted into the `PublicKeyStore and reused on subsequent calls.

-

Implementations on Foreign Types§

source§

impl PublicKeyStore for ()

source§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

source§

impl<T> PublicKeyStore for &T
where - T: PublicKeyStore,

source§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

source§

impl<T> PublicKeyStore for &mut T
where - T: PublicKeyStore,

source§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Implementors§

\ No newline at end of file +

Implementations on Foreign Types§

§

impl PublicKeyStore for ()

§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

§

impl<T> PublicKeyStore for &T
where + T: PublicKeyStore,

§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

§

impl<T> PublicKeyStore for &mut T
where + T: PublicKeyStore,

§

fn public_key(&self, id: &[u8; 32]) -> Result<VerifyingKey, Error>

Implementors§

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/struct.Author.html b/pr/2547/docs/iroh/docs/struct.Author.html index c818e84408..306178a9a0 100644 --- a/pr/2547/docs/iroh/docs/struct.Author.html +++ b/pr/2547/docs/iroh/docs/struct.Author.html @@ -1,19 +1,19 @@ -Author in iroh::docs - Rust

Struct iroh::docs::Author

source ·
pub struct Author {
+Author in iroh::docs - Rust

Struct iroh::docs::Author

pub struct Author {
     signing_key: SigningKey,
 }
Expand description

Author key to insert entries in a crate::Replica

Internally, an author is a [SigningKey] which is used to sign entries.

-

Fields§

§signing_key: SigningKey

Implementations§

source§

impl Author

source

pub fn new<R>(rng: &mut R) -> Author
where +

Fields§

§signing_key: SigningKey

Implementations§

§

impl Author

pub fn new<R>(rng: &mut R) -> Author
where R: CryptoRngCore + ?Sized,

Create a new Author with a random key.

-
source

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

Create an Author from a byte array.

-
source

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

Returns the Author byte representation.

-
source

pub fn public_key(&self) -> AuthorPublicKey

Get the AuthorPublicKey for this author.

-
source

pub fn id(&self) -> AuthorId

Get the AuthorId for this author.

-
source

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

Sign a message with this Author key.

-
source

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

Strictly verify a signature on a message with this Author’s public key.

-

Trait Implementations§

source§

impl Clone for Author

source§

fn clone(&self) -> Author

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 Author

source§

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

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

impl<'de> Deserialize<'de> for Author

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

Create an Author from a byte array.

+

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

Returns the Author byte representation.

+

pub fn public_key(&self) -> AuthorPublicKey

Get the AuthorPublicKey for this author.

+

pub fn id(&self) -> AuthorId

Get the AuthorId for this author.

+

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

Sign a message with this Author key.

+

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

Strictly verify a signature on a message with this Author’s public key.

+

Trait Implementations§

§

impl Clone for Author

§

fn clone(&self) -> Author

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 Author

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Author

§

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

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

impl Display for Author

source§

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

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

impl From<&Author> for AuthorPublicKey

source§

fn from(value: &Author) -> AuthorPublicKey

Converts to this type from the input type.
source§

impl From<Author> for AuthorId

source§

fn from(value: Author) -> AuthorId

Converts to this type from the input type.
source§

impl From<Author> for AuthorPublicKey

source§

fn from(value: Author) -> AuthorPublicKey

Converts to this type from the input type.
source§

impl From<SigningKey> for Author

source§

fn from(signing_key: SigningKey) -> Author

Converts to this type from the input type.
source§

impl FromStr for Author

§

type Err = Error

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

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

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

impl Serialize for Author

source§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Display for Author

§

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

Formats the value using the given formatter. Read more
§

impl From<&Author> for AuthorPublicKey

§

fn from(value: &Author) -> AuthorPublicKey

Converts to this type from the input type.
§

impl From<Author> for AuthorId

§

fn from(value: Author) -> AuthorId

Converts to this type from the input type.
§

impl From<Author> for AuthorPublicKey

§

fn from(value: Author) -> AuthorPublicKey

Converts to this type from the input type.
§

impl From<SigningKey> for Author

§

fn from(signing_key: SigningKey) -> Author

Converts to this type from the input type.
§

impl FromStr for Author

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Serialize for Author

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2547/docs/iroh/docs/struct.AuthorHeads.html b/pr/2547/docs/iroh/docs/struct.AuthorHeads.html index 1f8ae79809..f88959988c 100644 --- a/pr/2547/docs/iroh/docs/struct.AuthorHeads.html +++ b/pr/2547/docs/iroh/docs/struct.AuthorHeads.html @@ -1,22 +1,22 @@ -AuthorHeads in iroh::docs - Rust

Struct iroh::docs::AuthorHeads

source ·
pub struct AuthorHeads {
+AuthorHeads in iroh::docs - Rust

Struct iroh::docs::AuthorHeads

pub struct AuthorHeads {
     heads: BTreeMap<AuthorId, u64>,
 }
Expand description

Timestamps of the latest entry for each author.

-

Fields§

§heads: BTreeMap<AuthorId, u64>

Implementations§

source§

impl AuthorHeads

source

pub fn insert(&mut self, author: AuthorId, timestamp: u64)

Insert a new timestamp.

-
source

pub fn len(&self) -> usize

Number of author-timestamp pairs.

-
source

pub fn is_empty(&self) -> bool

Whether this AuthorHeads is empty.

-
source

pub fn get(&self, author: &AuthorId) -> Option<u64>

Get the timestamp for an author.

-
source

pub fn has_news_for(&self, other: &AuthorHeads) -> Option<NonZero<u64>>

Can this state offer newer stuff to other?

-
source

pub fn merge(&mut self, other: &AuthorHeads)

Merge another author head state into this one.

-
source

pub fn iter(&self) -> Iter<'_, AuthorId, u64>

Create an iterator over the entries in this state.

-
source

pub fn encode(&self, size_limit: Option<usize>) -> Result<Vec<u8>, Error>

Encode into a byte array with a limited size.

+

Fields§

§heads: BTreeMap<AuthorId, u64>

Implementations§

§

impl AuthorHeads

pub fn insert(&mut self, author: AuthorId, timestamp: u64)

Insert a new timestamp.

+

pub fn len(&self) -> usize

Number of author-timestamp pairs.

+

pub fn is_empty(&self) -> bool

Whether this AuthorHeads is empty.

+

pub fn get(&self, author: &AuthorId) -> Option<u64>

Get the timestamp for an author.

+

pub fn has_news_for(&self, other: &AuthorHeads) -> Option<NonZero<u64>>

Can this state offer newer stuff to other?

+

pub fn merge(&mut self, other: &AuthorHeads)

Merge another author head state into this one.

+

pub fn iter(&self) -> Iter<'_, AuthorId, u64>

Create an iterator over the entries in this state.

+

pub fn encode(&self, size_limit: Option<usize>) -> Result<Vec<u8>, Error>

Encode into a byte array with a limited size.

Will skip oldest entries if the size limit is reached. Returns a byte array with a maximum length of size_limit.

-
source

pub fn decode(bytes: &[u8]) -> Result<AuthorHeads, Error>

Decode from byte slice created with Self::encode.

-

Trait Implementations§

source§

impl Clone for AuthorHeads

source§

fn clone(&self) -> AuthorHeads

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 AuthorHeads

source§

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

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

impl Default for AuthorHeads

source§

fn default() -> AuthorHeads

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

impl FromIterator<(AuthorId, u64)> for AuthorHeads

source§

fn from_iter<T>(iter: T) -> AuthorHeads
where - T: IntoIterator<Item = (AuthorId, u64)>,

Creates a value from an iterator. Read more
source§

impl FromIterator<(u64, AuthorId)> for AuthorHeads

source§

fn from_iter<T>(iter: T) -> AuthorHeads
where - T: IntoIterator<Item = (u64, AuthorId)>,

Creates a value from an iterator. Read more
source§

impl PartialEq for AuthorHeads

source§

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

This method tests for self and other values to be equal, and is used +

pub fn decode(bytes: &[u8]) -> Result<AuthorHeads, Error>

Decode from byte slice created with Self::encode.

+

Trait Implementations§

§

impl Clone for AuthorHeads

§

fn clone(&self) -> AuthorHeads

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 AuthorHeads

§

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

Formats the value using the given formatter. Read more
§

impl Default for AuthorHeads

§

fn default() -> AuthorHeads

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

impl FromIterator<(AuthorId, u64)> for AuthorHeads

§

fn from_iter<T>(iter: T) -> AuthorHeads
where + T: IntoIterator<Item = (AuthorId, u64)>,

Creates a value from an iterator. Read more
§

impl FromIterator<(u64, AuthorId)> for AuthorHeads

§

fn from_iter<T>(iter: T) -> AuthorHeads
where + T: IntoIterator<Item = (u64, AuthorId)>,

Creates a value from an iterator. Read more
§

impl PartialEq for AuthorHeads

§

fn eq(&self, other: &AuthorHeads) -> 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.
source§

impl Eq for AuthorHeads

source§

impl StructuralPartialEq for AuthorHeads

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

§

impl Eq for AuthorHeads

§

impl StructuralPartialEq for AuthorHeads

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/2547/docs/iroh/docs/struct.AuthorId.html b/pr/2547/docs/iroh/docs/struct.AuthorId.html index 3f29a510a7..e645e4f811 100644 --- a/pr/2547/docs/iroh/docs/struct.AuthorId.html +++ b/pr/2547/docs/iroh/docs/struct.AuthorId.html @@ -1,33 +1,33 @@ -AuthorId in iroh::docs - Rust

Struct iroh::docs::AuthorId

source ·
pub struct AuthorId([u8; 32]);
Expand description

AuthorPublicKey in bytes

-

Tuple Fields§

§0: [u8; 32]

Implementations§

source§

impl AuthorId

source

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

Convert to byte array.

-
source

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

Convert to byte slice.

-
source

pub fn public_key<S>(&self, store: &S) -> Result<AuthorPublicKey, Error>
where +AuthorId in iroh::docs - Rust

Struct iroh::docs::AuthorId

pub struct AuthorId([u8; 32]);
Expand description

AuthorPublicKey in bytes

+

Tuple Fields§

§0: [u8; 32]

Implementations§

§

impl AuthorId

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

Convert to byte array.

+

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

Convert to byte slice.

+

pub fn public_key<S>(&self, store: &S) -> Result<AuthorPublicKey, Error>
where S: PublicKeyStore,

Convert into AuthorPublicKey by fetching from a PublicKeyStore.

Fails if the bytes of this AuthorId are not a valid [ed25519_dalek] curve point.

-
source

pub fn into_public_key(&self) -> Result<AuthorPublicKey, Error>

Convert into AuthorPublicKey.

+

pub fn into_public_key(&self) -> Result<AuthorPublicKey, Error>

Convert into AuthorPublicKey.

Fails if the bytes of this AuthorId are not a valid [ed25519_dalek] curve point.

-
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +

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§

source§

impl AsRef<[u8]> for AuthorId

source§

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

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

impl AsRef<[u8; 32]> for AuthorId

source§

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

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

impl Clone for AuthorId

source§

fn clone(&self) -> AuthorId

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 AuthorId

source§

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

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

impl Default for AuthorId

source§

fn default() -> AuthorId

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

impl<'de> Deserialize<'de> for AuthorId

Trait Implementations§

§

impl AsRef<[u8]> for AuthorId

§

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

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

impl AsRef<[u8; 32]> for AuthorId

§

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

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

impl Clone for AuthorId

§

fn clone(&self) -> AuthorId

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 AuthorId

§

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

Formats the value using the given formatter. Read more
§

impl Default for AuthorId

§

fn default() -> AuthorId

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

impl<'de> Deserialize<'de> for AuthorId

§

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

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

impl Display for AuthorId

source§

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

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

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

source§

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

Converts to this type from the input type.
source§

impl From<&AuthorPublicKey> for AuthorId

source§

fn from(value: &AuthorPublicKey) -> AuthorId

Converts to this type from the input type.
source§

impl From<[u8; 32]> for AuthorId

source§

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

Converts to this type from the input type.
source§

impl From<Author> for AuthorId

source§

fn from(value: Author) -> AuthorId

Converts to this type from the input type.
source§

impl From<AuthorId> for [u8; 32]

source§

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

Converts to this type from the input type.
source§

impl From<AuthorId> for AuthorFilter

source§

fn from(value: AuthorId) -> AuthorFilter

Converts to this type from the input type.
source§

impl From<AuthorPublicKey> for AuthorId

source§

fn from(value: AuthorPublicKey) -> AuthorId

Converts to this type from the input type.
source§

impl FromStr for AuthorId

§

type Err = Error

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

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

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

impl Hash for AuthorId

source§

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

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

impl Display for AuthorId

§

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

Formats the value using the given formatter. Read more
§

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

§

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

Converts to this type from the input type.
§

impl From<&AuthorPublicKey> for AuthorId

§

fn from(value: &AuthorPublicKey) -> AuthorId

Converts to this type from the input type.
§

impl From<[u8; 32]> for AuthorId

§

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

Converts to this type from the input type.
§

impl From<Author> for AuthorId

§

fn from(value: Author) -> AuthorId

Converts to this type from the input type.
§

impl From<AuthorId> for [u8; 32]

§

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

Converts to this type from the input type.
§

impl From<AuthorId> for AuthorFilter

§

fn from(value: AuthorId) -> AuthorFilter

Converts to this type from the input type.
§

impl From<AuthorPublicKey> for AuthorId

§

fn from(value: AuthorPublicKey) -> AuthorId

Converts to this type from the input type.
§

impl FromStr for AuthorId

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Hash for AuthorId

§

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

impl Ord for AuthorId

source§

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

impl Ord for AuthorId

§

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

impl PartialEq for AuthorId

source§

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

§

impl PartialEq for AuthorId

§

fn eq(&self, other: &AuthorId) -> 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.
source§

impl PartialOrd for AuthorId

source§

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

impl PartialOrd for AuthorId

§

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

impl Serialize for AuthorId

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for AuthorId

§

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

impl TryFrom<AuthorId> for AuthorPublicKey

§

type Error = Error

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

fn try_from( + __S: Serializer,

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

impl TryFrom<AuthorId> for AuthorPublicKey

§

type Error = Error

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

fn try_from( value: AuthorId -) -> Result<AuthorPublicKey, <AuthorPublicKey as TryFrom<AuthorId>>::Error>

Performs the conversion.
source§

impl Copy for AuthorId

source§

impl Eq for AuthorId

source§

impl StructuralPartialEq for AuthorId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T

Performs the conversion.
§

impl Copy for AuthorId

§

impl Eq for AuthorId

§

impl StructuralPartialEq for AuthorId

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> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where diff --git a/pr/2547/docs/iroh/docs/struct.AuthorPublicKey.html b/pr/2547/docs/iroh/docs/struct.AuthorPublicKey.html index 35ecd839c3..8d132f01cf 100644 --- a/pr/2547/docs/iroh/docs/struct.AuthorPublicKey.html +++ b/pr/2547/docs/iroh/docs/struct.AuthorPublicKey.html @@ -1,35 +1,35 @@ -AuthorPublicKey in iroh::docs - Rust

Struct iroh::docs::AuthorPublicKey

source ·
pub struct AuthorPublicKey(VerifyingKey);
Expand description

Identifier for an Author

+AuthorPublicKey in iroh::docs - Rust

Struct iroh::docs::AuthorPublicKey

pub struct AuthorPublicKey(VerifyingKey);
Expand description

Identifier for an Author

This is the corresponding [VerifyingKey] for an author. It is used as an identifier, and can be used to verify Signatures.

-

Tuple Fields§

§0: VerifyingKey

Implementations§

source§

impl AuthorPublicKey

source

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

Verify that a signature matches the msg bytes and was created with the Author +

Tuple Fields§

§0: VerifyingKey

Implementations§

§

impl AuthorPublicKey

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

Verify that a signature matches the msg bytes and was created with the Author that corresponds to this AuthorId.

-
source

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

Get the byte representation of this AuthorId.

-
source

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

Create from a slice of bytes.

+

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

Get the byte representation of this AuthorId.

+

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

Create from a slice of bytes.

Will return an error if the input bytes do not represent a valid [ed25519_dalek] curve point. Will never fail for a byte array returned from Self::as_bytes. See [VerifyingKey::from_bytes] for details.

-

Trait Implementations§

source§

impl Clone for AuthorPublicKey

source§

fn clone(&self) -> AuthorPublicKey

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 AuthorPublicKey

source§

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

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

impl Default for AuthorPublicKey

source§

fn default() -> AuthorPublicKey

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

impl<'de> Deserialize<'de> for AuthorPublicKey

Trait Implementations§

§

impl Clone for AuthorPublicKey

§

fn clone(&self) -> AuthorPublicKey

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 AuthorPublicKey

§

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

Formats the value using the given formatter. Read more
§

impl Default for AuthorPublicKey

§

fn default() -> AuthorPublicKey

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

impl<'de> Deserialize<'de> for AuthorPublicKey

§

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

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

impl Display for AuthorPublicKey

source§

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

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

impl From<&Author> for AuthorPublicKey

source§

fn from(value: &Author) -> AuthorPublicKey

Converts to this type from the input type.
source§

impl From<&AuthorPublicKey> for AuthorId

source§

fn from(value: &AuthorPublicKey) -> AuthorId

Converts to this type from the input type.
source§

impl From<Author> for AuthorPublicKey

source§

fn from(value: Author) -> AuthorPublicKey

Converts to this type from the input type.
source§

impl From<AuthorPublicKey> for AuthorId

source§

fn from(value: AuthorPublicKey) -> AuthorId

Converts to this type from the input type.
source§

impl From<VerifyingKey> for AuthorPublicKey

source§

fn from(value: VerifyingKey) -> AuthorPublicKey

Converts to this type from the input type.
source§

impl FromStr for AuthorPublicKey

§

type Err = Error

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

fn from_str( + __D: Deserializer<'de>,

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

impl Display for AuthorPublicKey

§

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

Formats the value using the given formatter. Read more
§

impl From<&Author> for AuthorPublicKey

§

fn from(value: &Author) -> AuthorPublicKey

Converts to this type from the input type.
§

impl From<&AuthorPublicKey> for AuthorId

§

fn from(value: &AuthorPublicKey) -> AuthorId

Converts to this type from the input type.
§

impl From<Author> for AuthorPublicKey

§

fn from(value: Author) -> AuthorPublicKey

Converts to this type from the input type.
§

impl From<AuthorPublicKey> for AuthorId

§

fn from(value: AuthorPublicKey) -> AuthorId

Converts to this type from the input type.
§

impl From<VerifyingKey> for AuthorPublicKey

§

fn from(value: VerifyingKey) -> AuthorPublicKey

Converts to this type from the input type.
§

impl FromStr for AuthorPublicKey

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Hash for AuthorPublicKey

source§

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

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

impl Hash for AuthorPublicKey

§

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

impl Ord for AuthorPublicKey

source§

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

impl Ord for AuthorPublicKey

§

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

impl PartialEq for AuthorPublicKey

source§

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

impl PartialEq for AuthorPublicKey

§

fn eq(&self, other: &AuthorPublicKey) -> 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.
source§

impl PartialOrd for AuthorPublicKey

source§

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

impl PartialOrd for AuthorPublicKey

§

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

impl Serialize for AuthorPublicKey

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for AuthorPublicKey

§

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

impl TryFrom<AuthorId> for AuthorPublicKey

§

type Error = Error

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

fn try_from( + __S: Serializer,

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

impl TryFrom<AuthorId> for AuthorPublicKey

§

type Error = Error

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

fn try_from( value: AuthorId -) -> Result<AuthorPublicKey, <AuthorPublicKey as TryFrom<AuthorId>>::Error>

Performs the conversion.
source§

impl Copy for AuthorPublicKey

source§

impl Eq for AuthorPublicKey

source§

impl StructuralPartialEq for AuthorPublicKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T

Performs the conversion.
§

impl Copy for AuthorPublicKey

§

impl Eq for AuthorPublicKey

§

impl StructuralPartialEq for AuthorPublicKey

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/2547/docs/iroh/docs/struct.DocTicket.html b/pr/2547/docs/iroh/docs/struct.DocTicket.html index 4ec9319a55..40348e9033 100644 --- a/pr/2547/docs/iroh/docs/struct.DocTicket.html +++ b/pr/2547/docs/iroh/docs/struct.DocTicket.html @@ -1,18 +1,18 @@ -DocTicket in iroh::docs - Rust

Struct iroh::docs::DocTicket

source ·
pub struct DocTicket {
+DocTicket in iroh::docs - Rust

Struct iroh::docs::DocTicket

pub struct DocTicket {
     pub capability: Capability,
     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>) -> DocTicket

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<(), Error>

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

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

Implementations§

§

impl DocTicket

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

Create a new doc ticket

+

Trait Implementations§

§

impl Clone for DocTicket

§

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
§

impl Debug for DocTicket

§

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

Formats the value using the given formatter. Read more
§

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

§

fn deserialize<__D>( __deserializer: __D ) -> Result<DocTicket, <__D as Deserializer<'de>>::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<(), Error>

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<DocTicket, <DocTicket as FromStr>::Err>

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

impl Serialize for DocTicket

source§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl Display for DocTicket

§

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

Formats the value using the given formatter. Read more
§

impl FromStr for DocTicket

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Serialize for DocTicket

§

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
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<DocTicket, 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 + __S: Serializer,

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

impl Ticket for DocTicket

§

const KIND: &'static str = "doc"

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<DocTicket, 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 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/2547/docs/iroh/docs/struct.Entry.html b/pr/2547/docs/iroh/docs/struct.Entry.html index 897dd55d16..ee879d9e32 100644 --- a/pr/2547/docs/iroh/docs/struct.Entry.html +++ b/pr/2547/docs/iroh/docs/struct.Entry.html @@ -1,40 +1,40 @@ -Entry in iroh::docs - Rust

Struct iroh::docs::Entry

source ·
pub struct Entry {
+Entry in iroh::docs - Rust

Struct iroh::docs::Entry

pub struct Entry {
     id: RecordIdentifier,
     record: Record,
 }
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 of the entry’s content data, the size of this content data, and a timestamp.

-

Fields§

§id: RecordIdentifier§record: Record

Implementations§

source§

impl Entry

source

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

Create a new entry

-
source

pub fn new_empty(id: RecordIdentifier) -> Entry

Create a new empty entry with the current timestamp.

-
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 id(&self) -> &RecordIdentifier

Get the RecordIdentifier for this entry.

-
source

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this entry.

-
source

pub fn author(&self) -> AuthorId

Get the AuthorId of this entry.

-
source

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

Get the key of this entry.

-
source

pub fn record(&self) -> &Record

Get the Record contained in this entry.

-
source

pub fn encode(&self, out: &mut Vec<u8>)

Serialize this entry into its canonical byte representation used for signing.

-
source

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

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

-
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 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<(), Error>

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) -> &<Entry as Deref>::Target

Dereferences the value.
source§

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

Fields§

§id: RecordIdentifier§record: Record

Implementations§

§

impl Entry

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

Create a new entry

+

pub fn new_empty(id: RecordIdentifier) -> Entry

Create a new empty entry with the current timestamp.

+

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.

+

pub fn id(&self) -> &RecordIdentifier

Get the RecordIdentifier for this entry.

+

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this entry.

+

pub fn author(&self) -> AuthorId

Get the AuthorId of this entry.

+

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

Get the key of this entry.

+

pub fn record(&self) -> &Record

Get the Record contained in this entry.

+

pub fn encode(&self, out: &mut Vec<u8>)

Serialize this entry into its canonical byte representation used for signing.

+

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

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

+

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

Sign this entry with a NamespaceSecret and Author.

+

Methods from Deref<Target = Record>§

pub fn is_empty(&self) -> bool

Return true if the entry is empty.

+

pub fn content_len(&self) -> u64

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

+

pub fn content_hash(&self) -> Hash

Get the Hash of the content data of this record.

+

pub fn timestamp(&self) -> u64

Get the timestamp of this record.

+

Trait Implementations§

§

impl Clone for Entry

§

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
§

impl Debug for Entry

§

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

Formats the value using the given formatter. Read more
§

impl Deref for Entry

§

type Target = Record

The resulting type after dereferencing.
§

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

Dereferences the value.
§

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

§

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

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

impl From<Entry> for Entry

source§

fn from(value: Entry) -> Self

Converts to this type from the input type.
source§

impl From<SignedEntry> for Entry

source§

fn from(value: SignedEntry) -> Entry

Converts to this type from the input type.
source§

impl Ord for Entry

source§

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

source§

fn from(value: Entry) -> Self

Converts to this type from the input type.
§

impl From<SignedEntry> for Entry

§

fn from(value: SignedEntry) -> Entry

Converts to this type from the input type.
§

impl Ord for Entry

§

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

impl PartialEq for Entry

source§

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

impl PartialEq for Entry

§

fn eq(&self, other: &Entry) -> 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.
source§

impl PartialOrd for Entry

source§

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

impl PartialOrd for Entry

§

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

impl Serialize for Entry

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for Entry

§

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

impl Eq for Entry

source§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl !Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnwindSafe for Entry

Blanket Implementations§

source§

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

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

impl Eq for Entry

§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl !Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnwindSafe for Entry

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/2547/docs/iroh/docs/struct.EntrySignature.html b/pr/2547/docs/iroh/docs/struct.EntrySignature.html index f4b52d72c5..4200d3f9c4 100644 --- a/pr/2547/docs/iroh/docs/struct.EntrySignature.html +++ b/pr/2547/docs/iroh/docs/struct.EntrySignature.html @@ -1,29 +1,29 @@ -EntrySignature in iroh::docs - Rust

Struct iroh::docs::EntrySignature

source ·
pub struct EntrySignature {
+EntrySignature in iroh::docs - Rust

Struct iroh::docs::EntrySignature

pub struct EntrySignature {
     author_signature: Signature,
     namespace_signature: Signature,
 }
Expand description

Signature over an entry.

-

Fields§

§author_signature: Signature§namespace_signature: Signature

Implementations§

source§

impl EntrySignature

Fields§

§author_signature: Signature§namespace_signature: Signature

Implementations§

§

impl EntrySignature

pub fn from_entry( entry: &Entry, namespace: &NamespaceSecret, author: &Author ) -> EntrySignature

Create a new signature by signing an entry with the namespace and author.

-
source

pub fn verify( +

pub fn verify( &self, entry: &Entry, namespace: &NamespacePublicKey, author: &AuthorPublicKey ) -> Result<(), Error>

Verify that this signature was created by signing the entry with the secret keys of the specified author and namespace.

-

Trait Implementations§

source§

impl Clone for EntrySignature

source§

fn clone(&self) -> EntrySignature

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 EntrySignature

source§

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

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

impl<'de> Deserialize<'de> for EntrySignature

Trait Implementations§

§

impl Clone for EntrySignature

§

fn clone(&self) -> EntrySignature

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 EntrySignature

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for EntrySignature

§

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

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

impl PartialEq for EntrySignature

source§

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

impl PartialEq for EntrySignature

§

fn eq(&self, other: &EntrySignature) -> 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.
source§

impl Serialize for EntrySignature

source§

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

§

impl Serialize for EntrySignature

§

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

impl Eq for EntrySignature

source§

impl StructuralPartialEq for EntrySignature

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for EntrySignature

§

impl StructuralPartialEq for EntrySignature

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/2547/docs/iroh/docs/struct.NamespaceId.html b/pr/2547/docs/iroh/docs/struct.NamespaceId.html index a9be966fc3..bda26c93b6 100644 --- a/pr/2547/docs/iroh/docs/struct.NamespaceId.html +++ b/pr/2547/docs/iroh/docs/struct.NamespaceId.html @@ -1,33 +1,33 @@ -NamespaceId in iroh::docs - Rust

Struct iroh::docs::NamespaceId

source ·
pub struct NamespaceId([u8; 32]);
Expand description

Tuple Fields§

§0: [u8; 32]

Implementations§

source§

impl NamespaceId

source

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

Convert to byte array.

-
source

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

Convert to byte slice.

-
source

pub fn public_key<S>(&self, store: &S) -> Result<NamespacePublicKey, Error>
where +NamespaceId in iroh::docs - Rust

Struct iroh::docs::NamespaceId

pub struct NamespaceId([u8; 32]);
Expand description

Tuple Fields§

§0: [u8; 32]

Implementations§

§

impl NamespaceId

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

Convert to byte array.

+

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

Convert to byte slice.

+

pub fn public_key<S>(&self, store: &S) -> Result<NamespacePublicKey, Error>
where S: PublicKeyStore,

Convert into NamespacePublicKey by fetching from a PublicKeyStore.

Fails if the bytes of this NamespaceId are not a valid [ed25519_dalek] curve point.

-
source

pub fn into_public_key(&self) -> Result<NamespacePublicKey, Error>

Convert into NamespacePublicKey.

+

pub fn into_public_key(&self) -> Result<NamespacePublicKey, Error>

Convert into NamespacePublicKey.

Fails if the bytes of this NamespaceId are not a valid [ed25519_dalek] curve point.

-
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +

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§

source§

impl AsRef<[u8]> for NamespaceId

source§

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

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

impl AsRef<[u8; 32]> for NamespaceId

source§

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

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

impl Clone for NamespaceId

source§

fn clone(&self) -> NamespaceId

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 NamespaceId

source§

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

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

impl Default for NamespaceId

source§

fn default() -> NamespaceId

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

impl<'de> Deserialize<'de> for NamespaceId

Trait Implementations§

§

impl AsRef<[u8]> for NamespaceId

§

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

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

impl AsRef<[u8; 32]> for NamespaceId

§

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

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

impl Clone for NamespaceId

§

fn clone(&self) -> NamespaceId

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 NamespaceId

§

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

Formats the value using the given formatter. Read more
§

impl Default for NamespaceId

§

fn default() -> NamespaceId

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

impl<'de> Deserialize<'de> for NamespaceId

§

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

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

impl Display for NamespaceId

source§

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

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

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

source§

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

Converts to this type from the input type.
source§

impl From<&NamespacePublicKey> for NamespaceId

source§

fn from(value: &NamespacePublicKey) -> NamespaceId

Converts to this type from the input type.
source§

impl From<[u8; 32]> for NamespaceId

source§

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

Converts to this type from the input type.
source§

impl From<NamespaceId> for [u8; 32]

source§

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

Converts to this type from the input type.
source§

impl From<NamespaceId> for Capability

source§

fn from(value: NamespaceId) -> Capability

Converts to this type from the input type.
source§

impl From<NamespacePublicKey> for NamespaceId

source§

fn from(value: NamespacePublicKey) -> NamespaceId

Converts to this type from the input type.
source§

impl From<NamespaceSecret> for NamespaceId

source§

fn from(value: NamespaceSecret) -> NamespaceId

Converts to this type from the input type.
source§

impl FromStr for NamespaceId

§

type Err = Error

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

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

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

impl Hash for NamespaceId

source§

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

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

impl Display for NamespaceId

§

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

Formats the value using the given formatter. Read more
§

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

§

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

Converts to this type from the input type.
§

impl From<&NamespacePublicKey> for NamespaceId

§

fn from(value: &NamespacePublicKey) -> NamespaceId

Converts to this type from the input type.
§

impl From<[u8; 32]> for NamespaceId

§

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

Converts to this type from the input type.
§

impl From<NamespaceId> for [u8; 32]

§

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

Converts to this type from the input type.
§

impl From<NamespaceId> for Capability

§

fn from(value: NamespaceId) -> Capability

Converts to this type from the input type.
§

impl From<NamespacePublicKey> for NamespaceId

§

fn from(value: NamespacePublicKey) -> NamespaceId

Converts to this type from the input type.
§

impl From<NamespaceSecret> for NamespaceId

§

fn from(value: NamespaceSecret) -> NamespaceId

Converts to this type from the input type.
§

impl FromStr for NamespaceId

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Hash for NamespaceId

§

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

impl Ord for NamespaceId

source§

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

impl Ord for NamespaceId

§

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

impl PartialEq for NamespaceId

source§

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

impl PartialEq for NamespaceId

§

fn eq(&self, other: &NamespaceId) -> 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.
source§

impl PartialOrd for NamespaceId

source§

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

impl PartialOrd for NamespaceId

§

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

impl Serialize for NamespaceId

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for NamespaceId

§

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

impl TryFrom<NamespaceId> for NamespacePublicKey

§

type Error = Error

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

fn try_from( + __S: Serializer,

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

impl TryFrom<NamespaceId> for NamespacePublicKey

§

type Error = Error

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

fn try_from( value: NamespaceId -) -> Result<NamespacePublicKey, <NamespacePublicKey as TryFrom<NamespaceId>>::Error>

Performs the conversion.
source§

impl Copy for NamespaceId

source§

impl Eq for NamespaceId

source§

impl StructuralPartialEq for NamespaceId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T

Performs the conversion.
§

impl Copy for NamespaceId

§

impl Eq for NamespaceId

§

impl StructuralPartialEq for NamespaceId

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> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where diff --git a/pr/2547/docs/iroh/docs/struct.NamespacePublicKey.html b/pr/2547/docs/iroh/docs/struct.NamespacePublicKey.html index c3d17c155e..adae9cbfab 100644 --- a/pr/2547/docs/iroh/docs/struct.NamespacePublicKey.html +++ b/pr/2547/docs/iroh/docs/struct.NamespacePublicKey.html @@ -1,34 +1,34 @@ -NamespacePublicKey in iroh::docs - Rust

Struct iroh::docs::NamespacePublicKey

source ·
pub struct NamespacePublicKey(VerifyingKey);
Expand description

The corresponding [VerifyingKey] for a NamespaceSecret. +NamespacePublicKey in iroh::docs - Rust

Struct iroh::docs::NamespacePublicKey

pub struct NamespacePublicKey(VerifyingKey);
Expand description

The corresponding [VerifyingKey] for a NamespaceSecret. It is used as an identifier, and can be used to verify Signatures.

-

Tuple Fields§

§0: VerifyingKey

Implementations§

source§

impl NamespacePublicKey

source

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

Verify that a signature matches the msg bytes and was created with the NamespaceSecret +

Tuple Fields§

§0: VerifyingKey

Implementations§

§

impl NamespacePublicKey

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

Verify that a signature matches the msg bytes and was created with the NamespaceSecret that corresponds to this NamespaceId.

-
source

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

Get the byte representation of this NamespaceId.

-
source

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

Create from a slice of bytes.

+

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

Get the byte representation of this NamespaceId.

+

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

Create from a slice of bytes.

Will return an error if the input bytes do not represent a valid [ed25519_dalek] curve point. Will never fail for a byte array returned from Self::as_bytes. See [VerifyingKey::from_bytes] for details.

-

Trait Implementations§

source§

impl Clone for NamespacePublicKey

source§

fn clone(&self) -> NamespacePublicKey

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 NamespacePublicKey

source§

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

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

impl Default for NamespacePublicKey

source§

fn default() -> NamespacePublicKey

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

impl<'de> Deserialize<'de> for NamespacePublicKey

Trait Implementations§

§

impl Clone for NamespacePublicKey

§

fn clone(&self) -> NamespacePublicKey

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 NamespacePublicKey

§

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

Formats the value using the given formatter. Read more
§

impl Default for NamespacePublicKey

§

fn default() -> NamespacePublicKey

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

impl<'de> Deserialize<'de> for NamespacePublicKey

§

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

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

impl Display for NamespacePublicKey

source§

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

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

impl From<&NamespacePublicKey> for NamespaceId

source§

fn from(value: &NamespacePublicKey) -> NamespaceId

Converts to this type from the input type.
source§

impl From<&NamespaceSecret> for NamespacePublicKey

source§

fn from(value: &NamespaceSecret) -> NamespacePublicKey

Converts to this type from the input type.
source§

impl From<NamespacePublicKey> for NamespaceId

source§

fn from(value: NamespacePublicKey) -> NamespaceId

Converts to this type from the input type.
source§

impl From<NamespaceSecret> for NamespacePublicKey

source§

fn from(value: NamespaceSecret) -> NamespacePublicKey

Converts to this type from the input type.
source§

impl From<VerifyingKey> for NamespacePublicKey

source§

fn from(value: VerifyingKey) -> NamespacePublicKey

Converts to this type from the input type.
source§

impl FromStr for NamespacePublicKey

§

type Err = Error

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

fn from_str( + __D: Deserializer<'de>,

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

impl Display for NamespacePublicKey

§

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

Formats the value using the given formatter. Read more
§

impl From<&NamespacePublicKey> for NamespaceId

§

fn from(value: &NamespacePublicKey) -> NamespaceId

Converts to this type from the input type.
§

impl From<&NamespaceSecret> for NamespacePublicKey

§

fn from(value: &NamespaceSecret) -> NamespacePublicKey

Converts to this type from the input type.
§

impl From<NamespacePublicKey> for NamespaceId

§

fn from(value: NamespacePublicKey) -> NamespaceId

Converts to this type from the input type.
§

impl From<NamespaceSecret> for NamespacePublicKey

§

fn from(value: NamespaceSecret) -> NamespacePublicKey

Converts to this type from the input type.
§

impl From<VerifyingKey> for NamespacePublicKey

§

fn from(value: VerifyingKey) -> NamespacePublicKey

Converts to this type from the input type.
§

impl FromStr for NamespacePublicKey

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Hash for NamespacePublicKey

source§

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

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

impl Hash for NamespacePublicKey

§

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

impl Ord for NamespacePublicKey

source§

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

impl Ord for NamespacePublicKey

§

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

impl PartialEq for NamespacePublicKey

source§

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

impl PartialEq for NamespacePublicKey

§

fn eq(&self, other: &NamespacePublicKey) -> 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.
source§

impl PartialOrd for NamespacePublicKey

source§

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

impl PartialOrd for NamespacePublicKey

§

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

impl Serialize for NamespacePublicKey

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for NamespacePublicKey

§

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

impl TryFrom<NamespaceId> for NamespacePublicKey

§

type Error = Error

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

fn try_from( + __S: Serializer,

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

impl TryFrom<NamespaceId> for NamespacePublicKey

§

type Error = Error

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

fn try_from( value: NamespaceId -) -> Result<NamespacePublicKey, <NamespacePublicKey as TryFrom<NamespaceId>>::Error>

Performs the conversion.
source§

impl Copy for NamespacePublicKey

source§

impl Eq for NamespacePublicKey

source§

impl StructuralPartialEq for NamespacePublicKey

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T

Performs the conversion.
§

impl Copy for NamespacePublicKey

§

impl Eq for NamespacePublicKey

§

impl StructuralPartialEq for NamespacePublicKey

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/2547/docs/iroh/docs/struct.NamespaceSecret.html b/pr/2547/docs/iroh/docs/struct.NamespaceSecret.html index e8771f7fba..a26f00cb11 100644 --- a/pr/2547/docs/iroh/docs/struct.NamespaceSecret.html +++ b/pr/2547/docs/iroh/docs/struct.NamespaceSecret.html @@ -1,22 +1,22 @@ -NamespaceSecret in iroh::docs - Rust

Struct iroh::docs::NamespaceSecret

source ·
pub struct NamespaceSecret {
+NamespaceSecret in iroh::docs - Rust

Struct iroh::docs::NamespaceSecret

pub struct NamespaceSecret {
     signing_key: SigningKey,
 }
Expand description

Namespace key of a crate::Replica.

Holders of this key can insert new entries into a crate::Replica. Internally, a NamespaceSecret is a [SigningKey] which is used to sign entries.

-

Fields§

§signing_key: SigningKey

Implementations§

source§

impl NamespaceSecret

source

pub fn new<R>(rng: &mut R) -> NamespaceSecret
where +

Fields§

§signing_key: SigningKey

Implementations§

§

impl NamespaceSecret

pub fn new<R>(rng: &mut R) -> NamespaceSecret
where R: CryptoRngCore + ?Sized,

Create a new NamespaceSecret with a random key.

-
source

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

Create a NamespaceSecret from a byte array.

-
source

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

Returns the NamespaceSecret byte representation.

-
source

pub fn public_key(&self) -> NamespacePublicKey

Get the NamespacePublicKey for this namespace.

-
source

pub fn id(&self) -> NamespaceId

Get the NamespaceId for this namespace.

-
source

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

Sign a message with this NamespaceSecret key.

-
source

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

Strictly verify a signature on a message with this NamespaceSecret’s public key.

-

Trait Implementations§

source§

impl Clone for NamespaceSecret

source§

fn clone(&self) -> NamespaceSecret

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 NamespaceSecret

source§

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

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

impl<'de> Deserialize<'de> for NamespaceSecret

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

Create a NamespaceSecret from a byte array.

+

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

Returns the NamespaceSecret byte representation.

+

pub fn public_key(&self) -> NamespacePublicKey

Get the NamespacePublicKey for this namespace.

+

pub fn id(&self) -> NamespaceId

Get the NamespaceId for this namespace.

+

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

Sign a message with this NamespaceSecret key.

+

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

Strictly verify a signature on a message with this NamespaceSecret’s public key.

+

Trait Implementations§

§

impl Clone for NamespaceSecret

§

fn clone(&self) -> NamespaceSecret

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 NamespaceSecret

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for NamespaceSecret

§

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

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

impl Display for NamespaceSecret

source§

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

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

impl From<&NamespaceSecret> for NamespacePublicKey

source§

fn from(value: &NamespaceSecret) -> NamespacePublicKey

Converts to this type from the input type.
source§

impl From<NamespaceSecret> for Capability

source§

fn from(value: NamespaceSecret) -> Capability

Converts to this type from the input type.
source§

impl From<NamespaceSecret> for NamespaceId

source§

fn from(value: NamespaceSecret) -> NamespaceId

Converts to this type from the input type.
source§

impl From<NamespaceSecret> for NamespacePublicKey

source§

fn from(value: NamespaceSecret) -> NamespacePublicKey

Converts to this type from the input type.
source§

impl From<SigningKey> for NamespaceSecret

source§

fn from(signing_key: SigningKey) -> NamespaceSecret

Converts to this type from the input type.
source§

impl FromStr for NamespaceSecret

§

type Err = Error

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

fn from_str( + __D: Deserializer<'de>,

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

impl Display for NamespaceSecret

§

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

Formats the value using the given formatter. Read more
§

impl From<&NamespaceSecret> for NamespacePublicKey

§

fn from(value: &NamespaceSecret) -> NamespacePublicKey

Converts to this type from the input type.
§

impl From<NamespaceSecret> for Capability

§

fn from(value: NamespaceSecret) -> Capability

Converts to this type from the input type.
§

impl From<NamespaceSecret> for NamespaceId

§

fn from(value: NamespaceSecret) -> NamespaceId

Converts to this type from the input type.
§

impl From<NamespaceSecret> for NamespacePublicKey

§

fn from(value: NamespaceSecret) -> NamespacePublicKey

Converts to this type from the input type.
§

impl From<SigningKey> for NamespaceSecret

§

fn from(signing_key: SigningKey) -> NamespaceSecret

Converts to this type from the input type.
§

impl FromStr for NamespaceSecret

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Serialize for NamespaceSecret

source§

fn serialize<__S>( +) -> Result<NamespaceSecret, <NamespaceSecret as FromStr>::Err>

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

impl Serialize for NamespaceSecret

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2547/docs/iroh/docs/struct.ReadOnly.html b/pr/2547/docs/iroh/docs/struct.ReadOnly.html index ec23213a8d..330e5a30bf 100644 --- a/pr/2547/docs/iroh/docs/struct.ReadOnly.html +++ b/pr/2547/docs/iroh/docs/struct.ReadOnly.html @@ -1,5 +1,5 @@ -ReadOnly in iroh::docs - Rust

Struct iroh::docs::ReadOnly

source ·
pub struct ReadOnly;
Expand description

Error that occurs trying to access the NamespaceSecret of a read-only Capability.

-

Trait Implementations§

source§

impl Debug for ReadOnly

source§

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

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

impl Display for ReadOnly

source§

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

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

impl Error for ReadOnly

1.30.0 · 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<ReadOnly> for InsertError

source§

fn from(value: ReadOnly) -> InsertError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +ReadOnly in iroh::docs - Rust

Struct iroh::docs::ReadOnly

pub struct ReadOnly;
Expand description

Error that occurs trying to access the NamespaceSecret of a read-only Capability.

+

Trait Implementations§

§

impl Debug for ReadOnly

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReadOnly

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReadOnly

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

impl From<ReadOnly> for InsertError

§

fn from(value: ReadOnly) -> InsertError

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/2547/docs/iroh/docs/struct.Record.html b/pr/2547/docs/iroh/docs/struct.Record.html index b593403395..453ed51841 100644 --- a/pr/2547/docs/iroh/docs/struct.Record.html +++ b/pr/2547/docs/iroh/docs/struct.Record.html @@ -1,33 +1,33 @@ -Record in iroh::docs - Rust

Struct iroh::docs::Record

source ·
pub struct Record {
+Record in iroh::docs - Rust

Struct iroh::docs::Record

pub struct Record {
     len: u64,
     hash: Hash,
     timestamp: u64,
 }
Expand description

The data part of an entry in a Replica.

-

Fields§

§len: u64§hash: Hash§timestamp: u64

Implementations§

source§

impl Record

source

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

Create a new record.

-
source

pub fn empty(timestamp: u64) -> Record

Create a tombstone record (empty content)

-
source

pub fn empty_current() -> Record

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) -> Record

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 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<(), Error>

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

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

Fields§

§len: u64§hash: Hash§timestamp: u64

Implementations§

§

impl Record

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

Create a new record.

+

pub fn empty(timestamp: u64) -> Record

Create a tombstone record (empty content)

+

pub fn empty_current() -> Record

Create a tombstone record with the timestamp set to now.

+

pub fn is_empty(&self) -> bool

Return true if the entry is empty.

+

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

Create a new Record with the timestamp set to now.

+

pub fn content_len(&self) -> u64

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

+

pub fn content_hash(&self) -> Hash

Get the Hash of the content data of this record.

+

pub fn timestamp(&self) -> u64

Get the timestamp of this record.

+

Trait Implementations§

§

impl Clone for Record

§

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
§

impl Debug for Record

§

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

Formats the value using the given formatter. Read more
§

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

§

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

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

impl Ord for Record

Ordering for entry values.

+ __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Ord for Record

Ordering for entry values.

Compares first the timestamp, then the content hash.

-
source§

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

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

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

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

source§

impl PartialEq for Record

source§

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

impl PartialEq for Record

§

fn eq(&self, other: &Record) -> 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.
source§

impl PartialOrd for Record

source§

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

impl PartialOrd for Record

§

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

impl Serialize for Record

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for Record

§

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

impl Eq for Record

source§

impl StructuralPartialEq for Record

Auto Trait Implementations§

§

impl Freeze for Record

§

impl RefUnwindSafe for Record

§

impl Send for Record

§

impl Sync for Record

§

impl Unpin for Record

§

impl UnwindSafe for Record

Blanket Implementations§

source§

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

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

impl Eq for Record

§

impl StructuralPartialEq for Record

Auto Trait Implementations§

§

impl Freeze for Record

§

impl RefUnwindSafe for Record

§

impl Send for Record

§

impl Sync for Record

§

impl Unpin for Record

§

impl UnwindSafe for Record

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/2547/docs/iroh/docs/struct.RecordIdentifier.html b/pr/2547/docs/iroh/docs/struct.RecordIdentifier.html index 30c76ed64d..3714186496 100644 --- a/pr/2547/docs/iroh/docs/struct.RecordIdentifier.html +++ b/pr/2547/docs/iroh/docs/struct.RecordIdentifier.html @@ -1,31 +1,31 @@ -RecordIdentifier in iroh::docs - Rust

Struct iroh::docs::RecordIdentifier

source ·
pub struct RecordIdentifier(Bytes);
Expand description

The identifier of a record.

-

Tuple Fields§

§0: Bytes

Implementations§

source§

impl RecordIdentifier

source

pub fn new( +RecordIdentifier in iroh::docs - Rust

Struct iroh::docs::RecordIdentifier

pub struct RecordIdentifier(Bytes);
Expand description

The identifier of a record.

+

Tuple Fields§

§0: Bytes

Implementations§

§

impl RecordIdentifier

pub fn new( namespace: impl Into<NamespaceId>, author: impl Into<AuthorId>, key: impl AsRef<[u8]> ) -> RecordIdentifier

Create a new RecordIdentifier.

-
source

pub fn as_bytes(&self) -> Bytes

Get this RecordIdentifier as [Bytes].

-
source

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

Get this RecordIdentifier as a tuple of byte slices.

-
source

pub fn to_byte_tuple(&self) -> ([u8; 32], [u8; 32], Bytes)

Get this RecordIdentifier as a tuple of bytes.

-
source

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

Get the key of this record.

-
source

pub fn key_bytes(&self) -> Bytes

Get the key of this record as [Bytes].

-
source

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this record as byte array.

-
source

pub fn author(&self) -> AuthorId

Get the AuthorId of this record as byte array.

-

Trait Implementations§

source§

impl AsRef<[u8]> for RecordIdentifier

source§

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

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

impl Clone for RecordIdentifier

source§

fn clone(&self) -> RecordIdentifier

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 RecordIdentifier

source§

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

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

impl Default for RecordIdentifier

source§

fn default() -> RecordIdentifier

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

impl<'de> Deserialize<'de> for RecordIdentifier

pub fn as_bytes(&self) -> Bytes

Get this RecordIdentifier as [Bytes].

+

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

Get this RecordIdentifier as a tuple of byte slices.

+

pub fn to_byte_tuple(&self) -> ([u8; 32], [u8; 32], Bytes)

Get this RecordIdentifier as a tuple of bytes.

+

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

Get the key of this record.

+

pub fn key_bytes(&self) -> Bytes

Get the key of this record as [Bytes].

+

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this record as byte array.

+

pub fn author(&self) -> AuthorId

Get the AuthorId of this record as byte array.

+

Trait Implementations§

§

impl AsRef<[u8]> for RecordIdentifier

§

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

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

impl Clone for RecordIdentifier

§

fn clone(&self) -> RecordIdentifier

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 RecordIdentifier

§

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

Formats the value using the given formatter. Read more
§

impl Default for RecordIdentifier

§

fn default() -> RecordIdentifier

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

impl<'de> Deserialize<'de> for RecordIdentifier

§

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

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

impl Ord for RecordIdentifier

source§

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

impl Ord for RecordIdentifier

§

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

impl PartialEq for RecordIdentifier

source§

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

impl PartialEq for RecordIdentifier

§

fn eq(&self, other: &RecordIdentifier) -> 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.
source§

impl PartialOrd for RecordIdentifier

source§

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

impl PartialOrd for RecordIdentifier

§

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

impl Serialize for RecordIdentifier

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for RecordIdentifier

§

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

impl Eq for RecordIdentifier

source§

impl StructuralPartialEq for RecordIdentifier

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for RecordIdentifier

§

impl StructuralPartialEq for RecordIdentifier

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> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where diff --git a/pr/2547/docs/iroh/docs/struct.Replica.html b/pr/2547/docs/iroh/docs/struct.Replica.html index f1bbb3cde8..f6572cc3bc 100644 --- a/pr/2547/docs/iroh/docs/struct.Replica.html +++ b/pr/2547/docs/iroh/docs/struct.Replica.html @@ -1,10 +1,10 @@ -Replica in iroh::docs - Rust

Struct iroh::docs::Replica

source ·
pub struct Replica<'a, I = Box<ReplicaInfo>> {
+Replica in iroh::docs - Rust

Struct iroh::docs::Replica

pub struct Replica<'a, I = Box<ReplicaInfo>> {
     pub(crate) store: StoreInstance<'a>,
     pub(crate) info: I,
 }
Expand description

Local representation of a mutable, synchronizable key-value store.

-

Fields§

§store: StoreInstance<'a>§info: I

Implementations§

source§

impl<'a, I> Replica<'a, I>
where - I: Deref<Target = ReplicaInfo> + DerefMut,

source

pub fn new(store: StoreInstance<'a>, info: I) -> Replica<'a, I>

Create a new replica.

-
source

pub fn insert( +

Fields§

§store: StoreInstance<'a>§info: I

Implementations§

§

impl<'a, I> Replica<'a, I>
where + I: Deref<Target = ReplicaInfo> + DerefMut,

pub fn new(store: StoreInstance<'a>, info: I) -> Replica<'a, I>

Create a new replica.

+

pub fn insert( &mut self, key: impl AsRef<[u8]>, author: &Author, @@ -15,7 +15,7 @@ The len must be the byte length of the data identified by hash.

Returns the number of entries removed as a consequence of this insertion, or an error either if the entry failed to validate or if a store operation failed.

-

source

pub fn delete_prefix( +

pub fn delete_prefix( &mut self, prefix: impl AsRef<[u8]>, author: &Author @@ -23,7 +23,7 @@ or an error either if the entry failed to validate or if a store operation faile

This inserts an empty entry with the key set to prefix, effectively clearing all other entries whose key starts with or is equal to the given prefix.

Returns the number of entries deleted.

-

source

pub fn insert_remote_entry( +

pub fn insert_remote_entry( &mut self, entry: SignedEntry, received_from: [u8; 32], @@ -33,7 +33,7 @@ entries whose key starts with or is equal to the given prefix.

event, and insert the entry into the replica store.

Returns the number of entries removed as a consequence of this insertion, or an error if the entry failed to validate or if a store operation failed.

-

source

pub fn hash_and_insert( +

pub fn hash_and_insert( &mut self, key: impl AsRef<[u8]>, author: &Author, @@ -41,26 +41,26 @@ or an error if the entry failed to validate or if a store operation failed.

) -> 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( +

pub fn record_id( &self, key: impl AsRef<[u8]>, author: &Author ) -> RecordIdentifier

Get the identifier for an entry in this replica.

-
source

pub fn sync_initial_message(&mut self) -> Result<Message<SignedEntry>, Error>

Create the initial message for the set reconciliation flow with a remote peer.

-
source

pub fn sync_process_message( +

pub fn sync_initial_message(&mut self) -> Result<Message<SignedEntry>, Error>

Create the initial message for the set reconciliation flow with a remote peer.

+

pub fn sync_process_message( &mut self, - message: Message<SignedEntry>, + message: Message<SignedEntry>, from_peer: [u8; 32], state: &mut SyncOutcome -) -> Result<Option<Message<SignedEntry>>, Error>

Process a set reconciliation message from a remote peer.

+) -> Result<Option<Message<SignedEntry>>, Error>

Process a set reconciliation message from a remote peer.

Returns the next message to be sent to the peer, if any.

-
source

pub fn id(&self) -> NamespaceId

Get the namespace identifier for this Replica.

-
source

pub fn capability(&self) -> &Capability

Get the Capability of this Replica.

-
source

pub fn secret_key(&self) -> Result<&NamespaceSecret, ReadOnly>

Get the byte representation of the NamespaceSecret key for this replica. Will fail if +

pub fn id(&self) -> NamespaceId

Get the namespace identifier for this Replica.

+

pub fn capability(&self) -> &Capability

Get the Capability of this Replica.

+

pub fn secret_key(&self) -> Result<&NamespaceSecret, ReadOnly>

Get the byte representation of the NamespaceSecret key for this replica. Will fail if the replica is read only

-

Trait Implementations§

source§

impl<'a, I> Debug for Replica<'a, I>
where +

Trait Implementations§

§

impl<'a, I> Debug for Replica<'a, I>
where StoreInstance<'a>: Debug, - I: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, I> Freeze for Replica<'a, I>
where + I: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, I> Freeze for Replica<'a, I>
where I: Freeze,

§

impl<'a, I = Box<ReplicaInfo>> !RefUnwindSafe for Replica<'a, I>

§

impl<'a, I> Send for Replica<'a, I>
where I: Send,

§

impl<'a, I> Sync for Replica<'a, I>
where I: Sync,

§

impl<'a, I> Unpin for Replica<'a, I>
where diff --git a/pr/2547/docs/iroh/docs/struct.ReplicaInfo.html b/pr/2547/docs/iroh/docs/struct.ReplicaInfo.html index 61c4a45e2b..f005b4f66b 100644 --- a/pr/2547/docs/iroh/docs/struct.ReplicaInfo.html +++ b/pr/2547/docs/iroh/docs/struct.ReplicaInfo.html @@ -1,40 +1,40 @@ -ReplicaInfo in iroh::docs - Rust

Struct iroh::docs::ReplicaInfo

source ·
pub struct ReplicaInfo {
+ReplicaInfo in iroh::docs - Rust

Struct iroh::docs::ReplicaInfo

pub struct ReplicaInfo {
     pub(crate) capability: Capability,
-    subscribers: Subscribers,
+    subscribers: Subscribers,
     content_status_cb: Option<Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>>,
     closed: bool,
 }
Expand description

In memory information about an open replica.

-

Fields§

§capability: Capability§subscribers: Subscribers§content_status_cb: Option<Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>>§closed: bool

Implementations§

source§

impl ReplicaInfo

source

pub fn new(capability: Capability) -> ReplicaInfo

Create a new replica.

-
source

pub fn subscribe(&mut self, sender: Sender<Event>)

Subscribe to insert events.

+

Fields§

§capability: Capability§subscribers: Subscribers§content_status_cb: Option<Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>>§closed: bool

Implementations§

§

impl ReplicaInfo

pub fn new(capability: Capability) -> ReplicaInfo

Create a new replica.

+

pub fn subscribe(&mut self, sender: Sender<Event>)

Subscribe to insert events.

When subscribing to a replica, you must ensure that the corresponding [flume::Receiver] is received from in a loop. If not receiving, local and remote inserts will hang waiting for the receiver to be received from.

-
source

pub fn unsubscribe(&mut self, sender: &Sender<Event>)

Explicitly unsubscribe a sender.

+

pub fn unsubscribe(&mut self, sender: &Sender<Event>)

Explicitly unsubscribe a sender.

Simply dropping the receiver is fine too. If you cloned a single sender to subscribe to multiple replicas, you can use this method to explicitly unsubscribe the sender from this replica without having to drop the receiver.

-
source

pub fn subscribers_count(&self) -> usize

Get the number of current event subscribers.

-
source

pub fn set_content_status_callback( +

pub fn subscribers_count(&self) -> usize

Get the number of current event subscribers.

+

pub fn set_content_status_callback( &mut self, cb: Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync> ) -> bool

Set the content status callback.

Only one callback can be active at a time. If a previous callback was registered, this will return false.

-
source

pub fn closed(&self) -> bool

Returns true if the replica is closed.

+

pub fn closed(&self) -> bool

Returns true if the replica is closed.

If a replica is closed, no further operations can be performed. A replica cannot be closed manually, it must be closed via store::Store::close_replica or store::Store::remove_replica

-
source

pub fn merge_capability( +

pub fn merge_capability( &mut self, capability: Capability ) -> Result<bool, CapabilityError>

Merge a capability.

The capability must refer to the the same namespace, otherwise an error will be returned.

This will upgrade the replica’s capability when passing a Capability::Write. It is a no-op if capability is a Capability::Read`.

-

Trait Implementations§

source§

impl Debug for ReplicaInfo
where +

Trait Implementations§

§

impl Debug for ReplicaInfo

source§

fn fmt(&self, __derive_more_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 + Subscribers: Debug, + bool: Debug,

§

fn fmt(&self, __derive_more_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/2547/docs/iroh/docs/struct.SignedEntry.html b/pr/2547/docs/iroh/docs/struct.SignedEntry.html index 4b0cbd9dcd..ae5148b6dc 100644 --- a/pr/2547/docs/iroh/docs/struct.SignedEntry.html +++ b/pr/2547/docs/iroh/docs/struct.SignedEntry.html @@ -1,55 +1,55 @@ -SignedEntry in iroh::docs - Rust

Struct iroh::docs::SignedEntry

source ·
pub struct SignedEntry {
+SignedEntry in iroh::docs - Rust

Struct iroh::docs::SignedEntry

pub struct SignedEntry {
     signature: EntrySignature,
     entry: Entry,
 }
Expand description

A signed entry.

-

Fields§

§signature: EntrySignature§entry: Entry

Implementations§

source§

impl SignedEntry

Fields§

§signature: EntrySignature§entry: Entry

Implementations§

§

impl SignedEntry

pub fn from_entry( entry: Entry, namespace: &NamespaceSecret, author: &Author ) -> SignedEntry

Create a new signed entry by signing an entry with the namespace and author.

-
source

pub fn from_parts( +

pub fn from_parts( namespace: &NamespaceSecret, author: &Author, key: impl AsRef<[u8]>, record: Record ) -> SignedEntry

Create a new signed entries from its parts.

-
source

pub fn verify<S>(&self, store: &S) -> Result<(), Error>
where +

pub fn verify<S>(&self, store: &S) -> Result<(), Error>
where S: PublicKeyStore,

Verify the signatures on this entry.

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

-
source

pub fn timestamp(&self) -> u64

Get the timestamp of the entry.

-

Methods from Deref<Target = Entry>§

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 id(&self) -> &RecordIdentifier

Get the RecordIdentifier for this entry.

-
source

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this entry.

-
source

pub fn author(&self) -> AuthorId

Get the AuthorId of this entry.

-
source

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

Get the key of this entry.

-
source

pub fn record(&self) -> &Record

Get the Record contained in this entry.

-
source

pub fn encode(&self, out: &mut Vec<u8>)

Serialize this entry into its canonical byte representation used for signing.

-
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 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<(), Error>

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) -> &<SignedEntry as Deref>::Target

Dereferences the value.
source§

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

pub fn signature(&self) -> &EntrySignature

Get the signature.

+

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.

+

pub fn entry(&self) -> &Entry

Get the Entry.

+

pub fn content_hash(&self) -> Hash

Get the content Hash of the entry.

+

pub fn content_len(&self) -> u64

Get the content length of the entry.

+

pub fn author_bytes(&self) -> AuthorId

Get the author bytes of this entry.

+

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

Get the key of the entry.

+

pub fn timestamp(&self) -> u64

Get the timestamp of the entry.

+

Methods from Deref<Target = Entry>§

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.

+

pub fn id(&self) -> &RecordIdentifier

Get the RecordIdentifier for this entry.

+

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this entry.

+

pub fn author(&self) -> AuthorId

Get the AuthorId of this entry.

+

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

Get the key of this entry.

+

pub fn record(&self) -> &Record

Get the Record contained in this entry.

+

pub fn encode(&self, out: &mut Vec<u8>)

Serialize this entry into its canonical byte representation used for signing.

+

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

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

+

Methods from Deref<Target = Record>§

pub fn is_empty(&self) -> bool

Return true if the entry is empty.

+

pub fn content_len(&self) -> u64

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

+

pub fn content_hash(&self) -> Hash

Get the Hash of the content data of this record.

+

pub fn timestamp(&self) -> u64

Get the timestamp of this record.

+

Trait Implementations§

§

impl Clone for SignedEntry

§

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
§

impl Debug for SignedEntry

§

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

Formats the value using the given formatter. Read more
§

impl Deref for SignedEntry

§

type Target = Entry

The resulting type after dereferencing.
§

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

Dereferences the value.
§

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

§

fn deserialize<__D>( __deserializer: __D ) -> Result<SignedEntry, <__D as Deserializer<'de>>::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) -> Entry

Converts to this type from the input type.
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: &SignedEntry) -> 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
§

impl From<SignedEntry> for Entry

§

fn from(value: SignedEntry) -> Entry

Converts to this type from the input type.
source§

impl From<SignedEntry> for Entry

source§

fn from(value: SignedEntry) -> Self

Converts to this type from the input type.
§

impl Ord for SignedEntry

§

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

impl PartialEq for SignedEntry

source§

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

impl PartialEq for SignedEntry

§

fn eq(&self, other: &SignedEntry) -> 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.
source§

impl PartialOrd for SignedEntry

source§

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

impl PartialOrd for SignedEntry

§

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

impl Serialize for SignedEntry

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for SignedEntry

§

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

impl Eq for SignedEntry

source§

impl StructuralPartialEq for SignedEntry

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for SignedEntry

§

impl StructuralPartialEq for SignedEntry

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/2547/docs/iroh/docs/struct.SyncOutcome.html b/pr/2547/docs/iroh/docs/struct.SyncOutcome.html index c87a43d660..d97cc4980d 100644 --- a/pr/2547/docs/iroh/docs/struct.SyncOutcome.html +++ b/pr/2547/docs/iroh/docs/struct.SyncOutcome.html @@ -1,4 +1,4 @@ -SyncOutcome in iroh::docs - Rust

Struct iroh::docs::SyncOutcome

source ·
pub struct SyncOutcome {
+SyncOutcome in iroh::docs - Rust

Struct iroh::docs::SyncOutcome

pub struct SyncOutcome {
     pub heads_received: AuthorHeads,
     pub num_recv: usize,
     pub num_sent: usize,
@@ -6,7 +6,7 @@
 

Fields§

§heads_received: AuthorHeads

Timestamp of the latest entry for each author in the set we received.

§num_recv: usize

Number of entries we received.

§num_sent: usize

Number of entries we sent.

-

Trait Implementations§

source§

impl Clone for SyncOutcome

source§

fn clone(&self) -> SyncOutcome

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 SyncOutcome

source§

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

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

impl Default for SyncOutcome

source§

fn default() -> SyncOutcome

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

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for SyncOutcome

§

fn clone(&self) -> SyncOutcome

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 SyncOutcome

§

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

Formats the value using the given formatter. Read more
§

impl Default for SyncOutcome

§

fn default() -> SyncOutcome

Returns the “default value” for a type. 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/2547/docs/iroh/docs/sync/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html b/pr/2547/docs/iroh/docs/sync/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html index dfe28e9952..c5e025d3ce 100644 --- a/pr/2547/docs/iroh/docs/sync/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html +++ b/pr/2547/docs/iroh/docs/sync/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html @@ -1,3 +1,3 @@ -MAX_TIMESTAMP_FUTURE_SHIFT in iroh::docs::sync - Rust

Constant iroh::docs::sync::MAX_TIMESTAMP_FUTURE_SHIFT

source ·
pub const MAX_TIMESTAMP_FUTURE_SHIFT: u64 = _; // 600_000u64
Expand description

Max time in the future from our wall clock time that we accept entries for. +MAX_TIMESTAMP_FUTURE_SHIFT in iroh::docs::sync - Rust

Constant iroh::docs::sync::MAX_TIMESTAMP_FUTURE_SHIFT

pub const MAX_TIMESTAMP_FUTURE_SHIFT: u64 = _; // 600_000u64
Expand description

Max time in the future from our wall clock time that we accept entries for. Value is 10 minutes.

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/sync/enum.Capability.html b/pr/2547/docs/iroh/docs/sync/enum.Capability.html index 5ff6524a0a..b898bce847 100644 --- a/pr/2547/docs/iroh/docs/sync/enum.Capability.html +++ b/pr/2547/docs/iroh/docs/sync/enum.Capability.html @@ -1,22 +1,22 @@ -Capability in iroh::docs::sync - Rust

Enum iroh::docs::sync::Capability

source ·
pub enum Capability {
+Capability in iroh::docs::sync - Rust

Enum iroh::docs::sync::Capability

pub enum Capability {
     Write(NamespaceSecret),
     Read(NamespaceId),
 }
Expand description

The capability of the namespace.

Variants§

§

Write(NamespaceSecret)

Write access to the namespace.

§

Read(NamespaceId)

Read only access to the namespace.

-

Implementations§

source§

impl Capability

source

pub fn id(&self) -> NamespaceId

Get the NamespaceId for this Capability.

-
source

pub fn secret_key(&self) -> Result<&NamespaceSecret, ReadOnly>

Get the NamespaceSecret of this Capability. +

Implementations§

§

impl Capability

pub fn id(&self) -> NamespaceId

Get the NamespaceId for this Capability.

+

pub fn secret_key(&self) -> Result<&NamespaceSecret, ReadOnly>

Get the NamespaceSecret of this Capability. Will fail if the Capability is read only.

-
source

pub fn kind(&self) -> CapabilityKind

Get the kind of capability.

-
source

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

Get the raw representation of this namespace capability.

-
source

pub fn from_raw(kind: u8, bytes: &[u8; 32]) -> Result<Capability, Error>

Create a Capability from its raw representation.

-
source

pub fn merge(&mut self, other: Capability) -> Result<bool, CapabilityError>

Merge this capability with another capability.

+

pub fn kind(&self) -> CapabilityKind

Get the kind of capability.

+

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

Get the raw representation of this namespace capability.

+

pub fn from_raw(kind: u8, bytes: &[u8; 32]) -> Result<Capability, Error>

Create a Capability from its raw representation.

+

pub fn merge(&mut self, other: Capability) -> Result<bool, CapabilityError>

Merge this capability with another capability.

Will return an error if other is not a capability for the same namespace.

Returns true if the capability was changed, false otherwise.

-

Trait Implementations§

source§

impl Clone for Capability

source§

fn clone(&self) -> Capability

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 Capability

source§

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

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

impl<'de> Deserialize<'de> for Capability

Trait Implementations§

§

impl Clone for Capability

§

fn clone(&self) -> Capability

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 Capability

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Capability

§

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

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

impl From<NamespaceId> for Capability

source§

fn from(value: NamespaceId) -> Capability

Converts to this type from the input type.
source§

impl From<NamespaceSecret> for Capability

source§

fn from(value: NamespaceSecret) -> Capability

Converts to this type from the input type.
source§

impl Serialize for Capability

source§

fn serialize<__S>( + __D: Deserializer<'de>,

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

impl From<NamespaceId> for Capability

§

fn from(value: NamespaceId) -> Capability

Converts to this type from the input type.
§

impl From<NamespaceSecret> for Capability

§

fn from(value: NamespaceSecret) -> Capability

Converts to this type from the input type.
§

impl Serialize for Capability

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2547/docs/iroh/docs/sync/enum.CapabilityError.html b/pr/2547/docs/iroh/docs/sync/enum.CapabilityError.html index 55014ae5cc..372244b551 100644 --- a/pr/2547/docs/iroh/docs/sync/enum.CapabilityError.html +++ b/pr/2547/docs/iroh/docs/sync/enum.CapabilityError.html @@ -1,8 +1,8 @@ -CapabilityError in iroh::docs::sync - Rust

Enum iroh::docs::sync::CapabilityError

source ·
pub enum CapabilityError {
+CapabilityError in iroh::docs::sync - Rust

Enum iroh::docs::sync::CapabilityError

pub enum CapabilityError {
     NamespaceMismatch,
 }
Expand description

Errors for capability operations

Variants§

§

NamespaceMismatch

Namespaces are not the same

-

Trait Implementations§

source§

impl Debug for CapabilityError

source§

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

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

impl Display for CapabilityError

source§

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

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

impl Error for CapabilityError

1.30.0 · 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 +

Trait Implementations§

§

impl Debug for CapabilityError

§

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

Formats the value using the given formatter. Read more
§

impl Display for CapabilityError

§

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

Formats the value using the given formatter. Read more
§

impl Error for CapabilityError

1.30.0 · 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 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/2547/docs/iroh/docs/sync/enum.CapabilityKind.html b/pr/2547/docs/iroh/docs/sync/enum.CapabilityKind.html index 5953e0cc5f..3bac2a22a8 100644 --- a/pr/2547/docs/iroh/docs/sync/enum.CapabilityKind.html +++ b/pr/2547/docs/iroh/docs/sync/enum.CapabilityKind.html @@ -1,21 +1,21 @@ -CapabilityKind in iroh::docs::sync - Rust

Enum iroh::docs::sync::CapabilityKind

source ·
#[repr(u8)]
pub enum CapabilityKind { +CapabilityKind in iroh::docs::sync - Rust

Enum iroh::docs::sync::CapabilityKind

#[repr(u8)]
pub enum CapabilityKind { Write = 1, Read = 2, }
Expand description

Kind of capability of the namespace.

Variants§

§

Write = 1

A writable replica.

§

Read = 2

A readable replica.

-

Trait Implementations§

source§

impl Clone for CapabilityKind

source§

fn clone(&self) -> CapabilityKind

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 CapabilityKind

source§

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

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

impl<'de> Deserialize<'de> for CapabilityKind

Trait Implementations§

§

impl Clone for CapabilityKind

§

fn clone(&self) -> CapabilityKind

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 CapabilityKind

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for CapabilityKind

§

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

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

impl Display for CapabilityKind

source§

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

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

impl Serialize for CapabilityKind

source§

fn serialize<__S>( + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Display for CapabilityKind

§

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

Formats the value using the given formatter. Read more
§

impl Serialize for CapabilityKind

§

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

impl TryFrom<u8> for CapabilityKind

§

type Error = TryFromPrimitiveError<CapabilityKind>

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

fn try_from( + __S: Serializer,

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

impl TryFrom<u8> for CapabilityKind

§

type Error = TryFromPrimitiveError<CapabilityKind>

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

fn try_from( number: u8 -) -> Result<CapabilityKind, TryFromPrimitiveError<CapabilityKind>>

Performs the conversion.
source§

impl TryFromPrimitive for CapabilityKind

§

type Primitive = u8

§

type Error = TryFromPrimitiveError<CapabilityKind>

source§

const NAME: &'static str = "CapabilityKind"

source§

fn try_from_primitive( +) -> Result<CapabilityKind, TryFromPrimitiveError<CapabilityKind>>

Performs the conversion.
§

impl TryFromPrimitive for CapabilityKind

§

type Primitive = u8

§

type Error = TryFromPrimitiveError<CapabilityKind>

§

const NAME: &'static str = "CapabilityKind"

§

fn try_from_primitive( number: <CapabilityKind as TryFromPrimitive>::Primitive -) -> Result<CapabilityKind, TryFromPrimitiveError<CapabilityKind>>

source§

impl Copy for CapabilityKind

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +) -> Result<CapabilityKind, TryFromPrimitiveError<CapabilityKind>>

§

impl Copy for CapabilityKind

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/2547/docs/iroh/docs/sync/enum.ContentStatus.html b/pr/2547/docs/iroh/docs/sync/enum.ContentStatus.html index 765c42b147..2197cd3ef0 100644 --- a/pr/2547/docs/iroh/docs/sync/enum.ContentStatus.html +++ b/pr/2547/docs/iroh/docs/sync/enum.ContentStatus.html @@ -1,4 +1,4 @@ -ContentStatus in iroh::docs::sync - Rust

Enum iroh::docs::sync::ContentStatus

source ·
pub enum ContentStatus {
+ContentStatus in iroh::docs::sync - Rust

Enum iroh::docs::sync::ContentStatus

pub enum ContentStatus {
     Complete,
     Incomplete,
     Missing,
@@ -6,16 +6,16 @@
 

Variants§

§

Complete

The content is completely available.

§

Incomplete

The content is partially available.

§

Missing

The content is missing.

-

Trait Implementations§

source§

impl Clone for ContentStatus

source§

fn clone(&self) -> ContentStatus

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 ContentStatus

source§

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

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

impl<'de> Deserialize<'de> for ContentStatus

Trait Implementations§

§

impl Clone for ContentStatus

§

fn clone(&self) -> ContentStatus

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 ContentStatus

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for ContentStatus

§

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

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

impl PartialEq for ContentStatus

source§

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

impl PartialEq for ContentStatus

§

fn eq(&self, other: &ContentStatus) -> 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.
source§

impl Serialize for ContentStatus

source§

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

§

impl Serialize for ContentStatus

§

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

impl Copy for ContentStatus

source§

impl Eq for ContentStatus

source§

impl StructuralPartialEq for ContentStatus

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Copy for ContentStatus

§

impl Eq for ContentStatus

§

impl StructuralPartialEq for ContentStatus

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/2547/docs/iroh/docs/sync/enum.Event.html b/pr/2547/docs/iroh/docs/sync/enum.Event.html index e2ef00c4bf..f17c344c3c 100644 --- a/pr/2547/docs/iroh/docs/sync/enum.Event.html +++ b/pr/2547/docs/iroh/docs/sync/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::docs::sync - Rust

Enum iroh::docs::sync::Event

source ·
pub enum Event {
+Event in iroh::docs::sync - Rust

Enum iroh::docs::sync::Event

pub enum Event {
     LocalInsert {
         namespace: NamespaceId,
         entry: SignedEntry,
@@ -20,7 +20,7 @@
 
§from: [u8; 32]

Peer that provided the inserted entry.

§should_download: bool

Whether download policies require the content to be downloaded.

§remote_content_status: ContentStatus

ContentStatus for this entry in the remote’s replica.

-

Trait Implementations§

source§

impl Clone for Event

source§

fn clone(&self) -> Event

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 Event

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Event

§

fn clone(&self) -> Event

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 Event

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

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/2547/docs/iroh/docs/sync/enum.InsertError.html b/pr/2547/docs/iroh/docs/sync/enum.InsertError.html index 73411a152e..b133df37a0 100644 --- a/pr/2547/docs/iroh/docs/sync/enum.InsertError.html +++ b/pr/2547/docs/iroh/docs/sync/enum.InsertError.html @@ -1,4 +1,4 @@ -InsertError in iroh::docs::sync - Rust

Enum iroh::docs::sync::InsertError

source ·
pub enum InsertError {
+InsertError in iroh::docs::sync - Rust

Enum iroh::docs::sync::InsertError

pub enum InsertError {
     Store(Error),
     Validation(ValidationFailure),
     NewerEntryExists,
@@ -12,9 +12,9 @@
 
§

EntryIsEmpty

Attempted to insert an empty entry.

§

ReadOnly

Replica is read only.

§

Closed

The replica is closed, no operations may be performed.

-

Trait Implementations§

source§

impl Debug for InsertError
where +

Trait Implementations§

§

impl Debug for InsertError

source§

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

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

impl Display for InsertError

source§

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

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

impl Error for InsertError

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<ReadOnly> for InsertError

source§

fn from(value: ReadOnly) -> InsertError

Converts to this type from the input type.
source§

impl From<ValidationFailure> for InsertError

source§

fn from(source: ValidationFailure) -> InsertError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T

§

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

Formats the value using the given formatter. Read more
§

impl Display for InsertError

§

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

Formats the value using the given formatter. Read more
§

impl Error for InsertError

§

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<ReadOnly> for InsertError

§

fn from(value: ReadOnly) -> InsertError

Converts to this type from the input type.
§

impl From<ValidationFailure> for InsertError

§

fn from(source: ValidationFailure) -> InsertError

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/2547/docs/iroh/docs/sync/enum.InsertOrigin.html b/pr/2547/docs/iroh/docs/sync/enum.InsertOrigin.html index b28b5bd182..63145d5154 100644 --- a/pr/2547/docs/iroh/docs/sync/enum.InsertOrigin.html +++ b/pr/2547/docs/iroh/docs/sync/enum.InsertOrigin.html @@ -1,4 +1,4 @@ -InsertOrigin in iroh::docs::sync - Rust

Enum iroh::docs::sync::InsertOrigin

source ·
pub enum InsertOrigin {
+InsertOrigin in iroh::docs::sync - Rust

Enum iroh::docs::sync::InsertOrigin

pub enum InsertOrigin {
     Local,
     Sync {
         from: [u8; 32],
@@ -9,7 +9,7 @@
 
§

Sync

The entry was received from the remote node identified by PeerIdBytes.

Fields

§from: [u8; 32]

The peer from which we received this entry.

§remote_content_status: ContentStatus

Whether the peer claims to have the content blob for this entry.

-

Trait Implementations§

source§

impl Clone for InsertOrigin

source§

fn clone(&self) -> InsertOrigin

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 InsertOrigin

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 +

Trait Implementations§

§

impl Clone for InsertOrigin

§

fn clone(&self) -> InsertOrigin

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 InsertOrigin

§

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/2547/docs/iroh/docs/sync/enum.ValidationFailure.html b/pr/2547/docs/iroh/docs/sync/enum.ValidationFailure.html index 1e5059e314..e907f74197 100644 --- a/pr/2547/docs/iroh/docs/sync/enum.ValidationFailure.html +++ b/pr/2547/docs/iroh/docs/sync/enum.ValidationFailure.html @@ -1,4 +1,4 @@ -ValidationFailure in iroh::docs::sync - Rust

Enum iroh::docs::sync::ValidationFailure

source ·
pub enum ValidationFailure {
+ValidationFailure in iroh::docs::sync - Rust

Enum iroh::docs::sync::ValidationFailure

pub enum ValidationFailure {
     InvalidNamespace,
     BadSignature,
     TooFarInTheFuture,
@@ -8,7 +8,7 @@
 
§

BadSignature

Entry signature is invalid.

§

TooFarInTheFuture

Entry timestamp is too far in the future.

§

InvalidEmptyEntry

Entry has length 0 but not the empty hash, or the empty hash but not length 0.

-

Trait Implementations§

source§

impl Debug for ValidationFailure

source§

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

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

impl Display for ValidationFailure

source§

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

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

impl Error for ValidationFailure

1.30.0 · 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<ValidationFailure> for InsertError

source§

fn from(source: ValidationFailure) -> InsertError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Debug for ValidationFailure

§

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

Formats the value using the given formatter. Read more
§

impl Display for ValidationFailure

§

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

Formats the value using the given formatter. Read more
§

impl Error for ValidationFailure

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

impl From<ValidationFailure> for InsertError

§

fn from(source: ValidationFailure) -> InsertError

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/2547/docs/iroh/docs/sync/index.html b/pr/2547/docs/iroh/docs/sync/index.html index 04c74e6f30..accf41902a 100644 --- a/pr/2547/docs/iroh/docs/sync/index.html +++ b/pr/2547/docs/iroh/docs/sync/index.html @@ -1,3 +1,3 @@ -iroh::docs::sync - Rust

Module iroh::docs::sync

source ·
Expand description

API for iroh-docs replicas

+iroh::docs::sync - Rust

Module iroh::docs::sync

Expand description

API for iroh-docs replicas

Structs§

Enums§

Constants§

Type Aliases§

  • Callback that may be set on a replica to determine the availability status for a content hash.
  • Byte representation of a PeerId from iroh-net.
  • Protocol message for the set reconciliation protocol.
\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/sync/struct.AuthorHeads.html b/pr/2547/docs/iroh/docs/sync/struct.AuthorHeads.html index 3b3e25a951..1f028a10cd 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.AuthorHeads.html +++ b/pr/2547/docs/iroh/docs/sync/struct.AuthorHeads.html @@ -1,22 +1,22 @@ -AuthorHeads in iroh::docs::sync - Rust

Struct iroh::docs::sync::AuthorHeads

source ·
pub struct AuthorHeads {
+AuthorHeads in iroh::docs::sync - Rust

Struct iroh::docs::sync::AuthorHeads

pub struct AuthorHeads {
     heads: BTreeMap<AuthorId, u64>,
 }
Expand description

Timestamps of the latest entry for each author.

-

Fields§

§heads: BTreeMap<AuthorId, u64>

Implementations§

source§

impl AuthorHeads

source

pub fn insert(&mut self, author: AuthorId, timestamp: u64)

Insert a new timestamp.

-
source

pub fn len(&self) -> usize

Number of author-timestamp pairs.

-
source

pub fn is_empty(&self) -> bool

Whether this AuthorHeads is empty.

-
source

pub fn get(&self, author: &AuthorId) -> Option<u64>

Get the timestamp for an author.

-
source

pub fn has_news_for(&self, other: &AuthorHeads) -> Option<NonZero<u64>>

Can this state offer newer stuff to other?

-
source

pub fn merge(&mut self, other: &AuthorHeads)

Merge another author head state into this one.

-
source

pub fn iter(&self) -> Iter<'_, AuthorId, u64>

Create an iterator over the entries in this state.

-
source

pub fn encode(&self, size_limit: Option<usize>) -> Result<Vec<u8>, Error>

Encode into a byte array with a limited size.

+

Fields§

§heads: BTreeMap<AuthorId, u64>

Implementations§

§

impl AuthorHeads

pub fn insert(&mut self, author: AuthorId, timestamp: u64)

Insert a new timestamp.

+

pub fn len(&self) -> usize

Number of author-timestamp pairs.

+

pub fn is_empty(&self) -> bool

Whether this AuthorHeads is empty.

+

pub fn get(&self, author: &AuthorId) -> Option<u64>

Get the timestamp for an author.

+

pub fn has_news_for(&self, other: &AuthorHeads) -> Option<NonZero<u64>>

Can this state offer newer stuff to other?

+

pub fn merge(&mut self, other: &AuthorHeads)

Merge another author head state into this one.

+

pub fn iter(&self) -> Iter<'_, AuthorId, u64>

Create an iterator over the entries in this state.

+

pub fn encode(&self, size_limit: Option<usize>) -> Result<Vec<u8>, Error>

Encode into a byte array with a limited size.

Will skip oldest entries if the size limit is reached. Returns a byte array with a maximum length of size_limit.

-
source

pub fn decode(bytes: &[u8]) -> Result<AuthorHeads, Error>

Decode from byte slice created with Self::encode.

-

Trait Implementations§

source§

impl Clone for AuthorHeads

source§

fn clone(&self) -> AuthorHeads

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 AuthorHeads

source§

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

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

impl Default for AuthorHeads

source§

fn default() -> AuthorHeads

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

impl FromIterator<(AuthorId, u64)> for AuthorHeads

source§

fn from_iter<T>(iter: T) -> AuthorHeads
where - T: IntoIterator<Item = (AuthorId, u64)>,

Creates a value from an iterator. Read more
source§

impl FromIterator<(u64, AuthorId)> for AuthorHeads

source§

fn from_iter<T>(iter: T) -> AuthorHeads
where - T: IntoIterator<Item = (u64, AuthorId)>,

Creates a value from an iterator. Read more
source§

impl PartialEq for AuthorHeads

source§

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

This method tests for self and other values to be equal, and is used +

pub fn decode(bytes: &[u8]) -> Result<AuthorHeads, Error>

Decode from byte slice created with Self::encode.

+

Trait Implementations§

§

impl Clone for AuthorHeads

§

fn clone(&self) -> AuthorHeads

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 AuthorHeads

§

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

Formats the value using the given formatter. Read more
§

impl Default for AuthorHeads

§

fn default() -> AuthorHeads

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

impl FromIterator<(AuthorId, u64)> for AuthorHeads

§

fn from_iter<T>(iter: T) -> AuthorHeads
where + T: IntoIterator<Item = (AuthorId, u64)>,

Creates a value from an iterator. Read more
§

impl FromIterator<(u64, AuthorId)> for AuthorHeads

§

fn from_iter<T>(iter: T) -> AuthorHeads
where + T: IntoIterator<Item = (u64, AuthorId)>,

Creates a value from an iterator. Read more
§

impl PartialEq for AuthorHeads

§

fn eq(&self, other: &AuthorHeads) -> 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.
source§

impl Eq for AuthorHeads

source§

impl StructuralPartialEq for AuthorHeads

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +sufficient, and should not be overridden without very good reason.

§

impl Eq for AuthorHeads

§

impl StructuralPartialEq for AuthorHeads

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/2547/docs/iroh/docs/sync/struct.Entry.html b/pr/2547/docs/iroh/docs/sync/struct.Entry.html index ea2ebd89b5..aa9278f1b4 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.Entry.html +++ b/pr/2547/docs/iroh/docs/sync/struct.Entry.html @@ -1,40 +1,40 @@ -Entry in iroh::docs::sync - Rust

Struct iroh::docs::sync::Entry

source ·
pub struct Entry {
+Entry in iroh::docs::sync - Rust

Struct iroh::docs::sync::Entry

pub struct Entry {
     id: RecordIdentifier,
     record: Record,
 }
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 of the entry’s content data, the size of this content data, and a timestamp.

-

Fields§

§id: RecordIdentifier§record: Record

Implementations§

source§

impl Entry

source

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

Create a new entry

-
source

pub fn new_empty(id: RecordIdentifier) -> Entry

Create a new empty entry with the current timestamp.

-
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 id(&self) -> &RecordIdentifier

Get the RecordIdentifier for this entry.

-
source

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this entry.

-
source

pub fn author(&self) -> AuthorId

Get the AuthorId of this entry.

-
source

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

Get the key of this entry.

-
source

pub fn record(&self) -> &Record

Get the Record contained in this entry.

-
source

pub fn encode(&self, out: &mut Vec<u8>)

Serialize this entry into its canonical byte representation used for signing.

-
source

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

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

-
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 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<(), Error>

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) -> &<Entry as Deref>::Target

Dereferences the value.
source§

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

Fields§

§id: RecordIdentifier§record: Record

Implementations§

§

impl Entry

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

Create a new entry

+

pub fn new_empty(id: RecordIdentifier) -> Entry

Create a new empty entry with the current timestamp.

+

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.

+

pub fn id(&self) -> &RecordIdentifier

Get the RecordIdentifier for this entry.

+

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this entry.

+

pub fn author(&self) -> AuthorId

Get the AuthorId of this entry.

+

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

Get the key of this entry.

+

pub fn record(&self) -> &Record

Get the Record contained in this entry.

+

pub fn encode(&self, out: &mut Vec<u8>)

Serialize this entry into its canonical byte representation used for signing.

+

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

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

+

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

Sign this entry with a NamespaceSecret and Author.

+

Methods from Deref<Target = Record>§

pub fn is_empty(&self) -> bool

Return true if the entry is empty.

+

pub fn content_len(&self) -> u64

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

+

pub fn content_hash(&self) -> Hash

Get the Hash of the content data of this record.

+

pub fn timestamp(&self) -> u64

Get the timestamp of this record.

+

Trait Implementations§

§

impl Clone for Entry

§

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
§

impl Debug for Entry

§

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

Formats the value using the given formatter. Read more
§

impl Deref for Entry

§

type Target = Record

The resulting type after dereferencing.
§

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

Dereferences the value.
§

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

§

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

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

impl From<Entry> for Entry

source§

fn from(value: Entry) -> Self

Converts to this type from the input type.
source§

impl From<SignedEntry> for Entry

source§

fn from(value: SignedEntry) -> Entry

Converts to this type from the input type.
source§

impl Ord for Entry

source§

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

source§

fn from(value: Entry) -> Self

Converts to this type from the input type.
§

impl From<SignedEntry> for Entry

§

fn from(value: SignedEntry) -> Entry

Converts to this type from the input type.
§

impl Ord for Entry

§

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

impl PartialEq for Entry

source§

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

impl PartialEq for Entry

§

fn eq(&self, other: &Entry) -> 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.
source§

impl PartialOrd for Entry

source§

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

impl PartialOrd for Entry

§

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

impl Serialize for Entry

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for Entry

§

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

impl Eq for Entry

source§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl !Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnwindSafe for Entry

Blanket Implementations§

source§

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

Serialize this value into the given Serde serializer. Read more

§

impl Eq for Entry

§

impl StructuralPartialEq for Entry

Auto Trait Implementations§

§

impl !Freeze for Entry

§

impl RefUnwindSafe for Entry

§

impl Send for Entry

§

impl Sync for Entry

§

impl Unpin for Entry

§

impl UnwindSafe for Entry

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/2547/docs/iroh/docs/sync/struct.EntrySignature.html b/pr/2547/docs/iroh/docs/sync/struct.EntrySignature.html index 870c7d3e8e..5892fab935 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.EntrySignature.html +++ b/pr/2547/docs/iroh/docs/sync/struct.EntrySignature.html @@ -1,29 +1,29 @@ -EntrySignature in iroh::docs::sync - Rust

Struct iroh::docs::sync::EntrySignature

source ·
pub struct EntrySignature {
+EntrySignature in iroh::docs::sync - Rust

Struct iroh::docs::sync::EntrySignature

pub struct EntrySignature {
     author_signature: Signature,
     namespace_signature: Signature,
 }
Expand description

Signature over an entry.

-

Fields§

§author_signature: Signature§namespace_signature: Signature

Implementations§

source§

impl EntrySignature

Fields§

§author_signature: Signature§namespace_signature: Signature

Implementations§

§

impl EntrySignature

pub fn from_entry( entry: &Entry, namespace: &NamespaceSecret, author: &Author ) -> EntrySignature

Create a new signature by signing an entry with the namespace and author.

-
source

pub fn verify( +

pub fn verify( &self, entry: &Entry, namespace: &NamespacePublicKey, author: &AuthorPublicKey ) -> Result<(), Error>

Verify that this signature was created by signing the entry with the secret keys of the specified author and namespace.

-

Trait Implementations§

source§

impl Clone for EntrySignature

source§

fn clone(&self) -> EntrySignature

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 EntrySignature

source§

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

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

impl<'de> Deserialize<'de> for EntrySignature

Trait Implementations§

§

impl Clone for EntrySignature

§

fn clone(&self) -> EntrySignature

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 EntrySignature

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for EntrySignature

§

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

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

impl PartialEq for EntrySignature

source§

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

impl PartialEq for EntrySignature

§

fn eq(&self, other: &EntrySignature) -> 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.
source§

impl Serialize for EntrySignature

source§

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

§

impl Serialize for EntrySignature

§

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

impl Eq for EntrySignature

source§

impl StructuralPartialEq for EntrySignature

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for EntrySignature

§

impl StructuralPartialEq for EntrySignature

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/2547/docs/iroh/docs/sync/struct.ReadOnly.html b/pr/2547/docs/iroh/docs/sync/struct.ReadOnly.html index f5038ca3be..fa64b4c35f 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.ReadOnly.html +++ b/pr/2547/docs/iroh/docs/sync/struct.ReadOnly.html @@ -1,5 +1,5 @@ -ReadOnly in iroh::docs::sync - Rust

Struct iroh::docs::sync::ReadOnly

source ·
pub struct ReadOnly;
Expand description

Error that occurs trying to access the NamespaceSecret of a read-only Capability.

-

Trait Implementations§

source§

impl Debug for ReadOnly

source§

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

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

impl Display for ReadOnly

source§

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

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

impl Error for ReadOnly

1.30.0 · 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<ReadOnly> for InsertError

source§

fn from(value: ReadOnly) -> InsertError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +ReadOnly in iroh::docs::sync - Rust

Struct iroh::docs::sync::ReadOnly

pub struct ReadOnly;
Expand description

Error that occurs trying to access the NamespaceSecret of a read-only Capability.

+

Trait Implementations§

§

impl Debug for ReadOnly

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReadOnly

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReadOnly

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

impl From<ReadOnly> for InsertError

§

fn from(value: ReadOnly) -> InsertError

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/2547/docs/iroh/docs/sync/struct.Record.html b/pr/2547/docs/iroh/docs/sync/struct.Record.html index 36f654f16c..23177e15ec 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.Record.html +++ b/pr/2547/docs/iroh/docs/sync/struct.Record.html @@ -1,33 +1,33 @@ -Record in iroh::docs::sync - Rust

Struct iroh::docs::sync::Record

source ·
pub struct Record {
+Record in iroh::docs::sync - Rust

Struct iroh::docs::sync::Record

pub struct Record {
     len: u64,
     hash: Hash,
     timestamp: u64,
 }
Expand description

The data part of an entry in a Replica.

-

Fields§

§len: u64§hash: Hash§timestamp: u64

Implementations§

source§

impl Record

source

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

Create a new record.

-
source

pub fn empty(timestamp: u64) -> Record

Create a tombstone record (empty content)

-
source

pub fn empty_current() -> Record

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) -> Record

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 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<(), Error>

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

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

Fields§

§len: u64§hash: Hash§timestamp: u64

Implementations§

§

impl Record

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

Create a new record.

+

pub fn empty(timestamp: u64) -> Record

Create a tombstone record (empty content)

+

pub fn empty_current() -> Record

Create a tombstone record with the timestamp set to now.

+

pub fn is_empty(&self) -> bool

Return true if the entry is empty.

+

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

Create a new Record with the timestamp set to now.

+

pub fn content_len(&self) -> u64

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

+

pub fn content_hash(&self) -> Hash

Get the Hash of the content data of this record.

+

pub fn timestamp(&self) -> u64

Get the timestamp of this record.

+

Trait Implementations§

§

impl Clone for Record

§

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
§

impl Debug for Record

§

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

Formats the value using the given formatter. Read more
§

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

§

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

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

impl Ord for Record

Ordering for entry values.

+ __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

§

impl Ord for Record

Ordering for entry values.

Compares first the timestamp, then the content hash.

-
source§

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

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

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

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

source§

impl PartialEq for Record

source§

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

impl PartialEq for Record

§

fn eq(&self, other: &Record) -> 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.
source§

impl PartialOrd for Record

source§

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

impl PartialOrd for Record

§

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

impl Serialize for Record

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for Record

§

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

impl Eq for Record

source§

impl StructuralPartialEq for Record

Auto Trait Implementations§

§

impl Freeze for Record

§

impl RefUnwindSafe for Record

§

impl Send for Record

§

impl Sync for Record

§

impl Unpin for Record

§

impl UnwindSafe for Record

Blanket Implementations§

source§

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

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

impl Eq for Record

§

impl StructuralPartialEq for Record

Auto Trait Implementations§

§

impl Freeze for Record

§

impl RefUnwindSafe for Record

§

impl Send for Record

§

impl Sync for Record

§

impl Unpin for Record

§

impl UnwindSafe for Record

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/2547/docs/iroh/docs/sync/struct.RecordIdentifier.html b/pr/2547/docs/iroh/docs/sync/struct.RecordIdentifier.html index 0f7bf5e397..8c6e478bcc 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.RecordIdentifier.html +++ b/pr/2547/docs/iroh/docs/sync/struct.RecordIdentifier.html @@ -1,31 +1,31 @@ -RecordIdentifier in iroh::docs::sync - Rust

Struct iroh::docs::sync::RecordIdentifier

source ·
pub struct RecordIdentifier(Bytes);
Expand description

The identifier of a record.

-

Tuple Fields§

§0: Bytes

Implementations§

source§

impl RecordIdentifier

source

pub fn new( +RecordIdentifier in iroh::docs::sync - Rust

Struct iroh::docs::sync::RecordIdentifier

pub struct RecordIdentifier(Bytes);
Expand description

The identifier of a record.

+

Tuple Fields§

§0: Bytes

Implementations§

§

impl RecordIdentifier

pub fn new( namespace: impl Into<NamespaceId>, author: impl Into<AuthorId>, key: impl AsRef<[u8]> ) -> RecordIdentifier

Create a new RecordIdentifier.

-
source

pub fn as_bytes(&self) -> Bytes

Get this RecordIdentifier as [Bytes].

-
source

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

Get this RecordIdentifier as a tuple of byte slices.

-
source

pub fn to_byte_tuple(&self) -> ([u8; 32], [u8; 32], Bytes)

Get this RecordIdentifier as a tuple of bytes.

-
source

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

Get the key of this record.

-
source

pub fn key_bytes(&self) -> Bytes

Get the key of this record as [Bytes].

-
source

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this record as byte array.

-
source

pub fn author(&self) -> AuthorId

Get the AuthorId of this record as byte array.

-

Trait Implementations§

source§

impl AsRef<[u8]> for RecordIdentifier

source§

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

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

impl Clone for RecordIdentifier

source§

fn clone(&self) -> RecordIdentifier

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 RecordIdentifier

source§

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

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

impl Default for RecordIdentifier

source§

fn default() -> RecordIdentifier

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

impl<'de> Deserialize<'de> for RecordIdentifier

pub fn as_bytes(&self) -> Bytes

Get this RecordIdentifier as [Bytes].

+

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

Get this RecordIdentifier as a tuple of byte slices.

+

pub fn to_byte_tuple(&self) -> ([u8; 32], [u8; 32], Bytes)

Get this RecordIdentifier as a tuple of bytes.

+

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

Get the key of this record.

+

pub fn key_bytes(&self) -> Bytes

Get the key of this record as [Bytes].

+

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this record as byte array.

+

pub fn author(&self) -> AuthorId

Get the AuthorId of this record as byte array.

+

Trait Implementations§

§

impl AsRef<[u8]> for RecordIdentifier

§

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

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

impl Clone for RecordIdentifier

§

fn clone(&self) -> RecordIdentifier

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 RecordIdentifier

§

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

Formats the value using the given formatter. Read more
§

impl Default for RecordIdentifier

§

fn default() -> RecordIdentifier

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

impl<'de> Deserialize<'de> for RecordIdentifier

§

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

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

impl Ord for RecordIdentifier

source§

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

impl Ord for RecordIdentifier

§

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

impl PartialEq for RecordIdentifier

source§

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

impl PartialEq for RecordIdentifier

§

fn eq(&self, other: &RecordIdentifier) -> 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.
source§

impl PartialOrd for RecordIdentifier

source§

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

impl PartialOrd for RecordIdentifier

§

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

impl Serialize for RecordIdentifier

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for RecordIdentifier

§

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

impl Eq for RecordIdentifier

source§

impl StructuralPartialEq for RecordIdentifier

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Eq for RecordIdentifier

§

impl StructuralPartialEq for RecordIdentifier

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> AsBits<T> for A
where A: AsRef<[T]>, T: BitStore,

§

fn as_bits<O>(&self) -> &BitSlice<T, O>
where diff --git a/pr/2547/docs/iroh/docs/sync/struct.Replica.html b/pr/2547/docs/iroh/docs/sync/struct.Replica.html index 31562e26fd..9bcdcc9bc8 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.Replica.html +++ b/pr/2547/docs/iroh/docs/sync/struct.Replica.html @@ -1,10 +1,10 @@ -Replica in iroh::docs::sync - Rust

Struct iroh::docs::sync::Replica

source ·
pub struct Replica<'a, I = Box<ReplicaInfo>> {
+Replica in iroh::docs::sync - Rust

Struct iroh::docs::sync::Replica

pub struct Replica<'a, I = Box<ReplicaInfo>> {
     pub(crate) store: StoreInstance<'a>,
     pub(crate) info: I,
 }
Expand description

Local representation of a mutable, synchronizable key-value store.

-

Fields§

§store: StoreInstance<'a>§info: I

Implementations§

source§

impl<'a, I> Replica<'a, I>
where - I: Deref<Target = ReplicaInfo> + DerefMut,

source

pub fn new(store: StoreInstance<'a>, info: I) -> Replica<'a, I>

Create a new replica.

-
source

pub fn insert( +

Fields§

§store: StoreInstance<'a>§info: I

Implementations§

§

impl<'a, I> Replica<'a, I>
where + I: Deref<Target = ReplicaInfo> + DerefMut,

pub fn new(store: StoreInstance<'a>, info: I) -> Replica<'a, I>

Create a new replica.

+

pub fn insert( &mut self, key: impl AsRef<[u8]>, author: &Author, @@ -15,7 +15,7 @@ The len must be the byte length of the data identified by hash.

Returns the number of entries removed as a consequence of this insertion, or an error either if the entry failed to validate or if a store operation failed.

-

source

pub fn delete_prefix( +

pub fn delete_prefix( &mut self, prefix: impl AsRef<[u8]>, author: &Author @@ -23,7 +23,7 @@ or an error either if the entry failed to validate or if a store operation faile

This inserts an empty entry with the key set to prefix, effectively clearing all other entries whose key starts with or is equal to the given prefix.

Returns the number of entries deleted.

-

source

pub fn insert_remote_entry( +

pub fn insert_remote_entry( &mut self, entry: SignedEntry, received_from: [u8; 32], @@ -33,7 +33,7 @@ entries whose key starts with or is equal to the given prefix.

event, and insert the entry into the replica store.

Returns the number of entries removed as a consequence of this insertion, or an error if the entry failed to validate or if a store operation failed.

-

source

pub fn hash_and_insert( +

pub fn hash_and_insert( &mut self, key: impl AsRef<[u8]>, author: &Author, @@ -41,26 +41,26 @@ or an error if the entry failed to validate or if a store operation failed.

) -> 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( +

pub fn record_id( &self, key: impl AsRef<[u8]>, author: &Author ) -> RecordIdentifier

Get the identifier for an entry in this replica.

-
source

pub fn sync_initial_message(&mut self) -> Result<Message<SignedEntry>, Error>

Create the initial message for the set reconciliation flow with a remote peer.

-
source

pub fn sync_process_message( +

pub fn sync_initial_message(&mut self) -> Result<Message<SignedEntry>, Error>

Create the initial message for the set reconciliation flow with a remote peer.

+

pub fn sync_process_message( &mut self, - message: Message<SignedEntry>, + message: Message<SignedEntry>, from_peer: [u8; 32], state: &mut SyncOutcome -) -> Result<Option<Message<SignedEntry>>, Error>

Process a set reconciliation message from a remote peer.

+) -> Result<Option<Message<SignedEntry>>, Error>

Process a set reconciliation message from a remote peer.

Returns the next message to be sent to the peer, if any.

-
source

pub fn id(&self) -> NamespaceId

Get the namespace identifier for this Replica.

-
source

pub fn capability(&self) -> &Capability

Get the Capability of this Replica.

-
source

pub fn secret_key(&self) -> Result<&NamespaceSecret, ReadOnly>

Get the byte representation of the NamespaceSecret key for this replica. Will fail if +

pub fn id(&self) -> NamespaceId

Get the namespace identifier for this Replica.

+

pub fn capability(&self) -> &Capability

Get the Capability of this Replica.

+

pub fn secret_key(&self) -> Result<&NamespaceSecret, ReadOnly>

Get the byte representation of the NamespaceSecret key for this replica. Will fail if the replica is read only

-

Trait Implementations§

source§

impl<'a, I> Debug for Replica<'a, I>
where +

Trait Implementations§

§

impl<'a, I> Debug for Replica<'a, I>
where StoreInstance<'a>: Debug, - I: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, I> Freeze for Replica<'a, I>
where + I: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, I> Freeze for Replica<'a, I>
where I: Freeze,

§

impl<'a, I = Box<ReplicaInfo>> !RefUnwindSafe for Replica<'a, I>

§

impl<'a, I> Send for Replica<'a, I>
where I: Send,

§

impl<'a, I> Sync for Replica<'a, I>
where I: Sync,

§

impl<'a, I> Unpin for Replica<'a, I>
where diff --git a/pr/2547/docs/iroh/docs/sync/struct.ReplicaInfo.html b/pr/2547/docs/iroh/docs/sync/struct.ReplicaInfo.html index 731f03cb59..f80f22ec73 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.ReplicaInfo.html +++ b/pr/2547/docs/iroh/docs/sync/struct.ReplicaInfo.html @@ -1,40 +1,40 @@ -ReplicaInfo in iroh::docs::sync - Rust

Struct iroh::docs::sync::ReplicaInfo

source ·
pub struct ReplicaInfo {
+ReplicaInfo in iroh::docs::sync - Rust

Struct iroh::docs::sync::ReplicaInfo

pub struct ReplicaInfo {
     pub(crate) capability: Capability,
-    subscribers: Subscribers,
+    subscribers: Subscribers,
     content_status_cb: Option<Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>>,
     closed: bool,
 }
Expand description

In memory information about an open replica.

-

Fields§

§capability: Capability§subscribers: Subscribers§content_status_cb: Option<Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>>§closed: bool

Implementations§

source§

impl ReplicaInfo

source

pub fn new(capability: Capability) -> ReplicaInfo

Create a new replica.

-
source

pub fn subscribe(&mut self, sender: Sender<Event>)

Subscribe to insert events.

+

Fields§

§capability: Capability§subscribers: Subscribers§content_status_cb: Option<Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>>§closed: bool

Implementations§

§

impl ReplicaInfo

pub fn new(capability: Capability) -> ReplicaInfo

Create a new replica.

+

pub fn subscribe(&mut self, sender: Sender<Event>)

Subscribe to insert events.

When subscribing to a replica, you must ensure that the corresponding [flume::Receiver] is received from in a loop. If not receiving, local and remote inserts will hang waiting for the receiver to be received from.

-
source

pub fn unsubscribe(&mut self, sender: &Sender<Event>)

Explicitly unsubscribe a sender.

+

pub fn unsubscribe(&mut self, sender: &Sender<Event>)

Explicitly unsubscribe a sender.

Simply dropping the receiver is fine too. If you cloned a single sender to subscribe to multiple replicas, you can use this method to explicitly unsubscribe the sender from this replica without having to drop the receiver.

-
source

pub fn subscribers_count(&self) -> usize

Get the number of current event subscribers.

-
source

pub fn set_content_status_callback( +

pub fn subscribers_count(&self) -> usize

Get the number of current event subscribers.

+

pub fn set_content_status_callback( &mut self, cb: Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync> ) -> bool

Set the content status callback.

Only one callback can be active at a time. If a previous callback was registered, this will return false.

-
source

pub fn closed(&self) -> bool

Returns true if the replica is closed.

+

pub fn closed(&self) -> bool

Returns true if the replica is closed.

If a replica is closed, no further operations can be performed. A replica cannot be closed manually, it must be closed via store::Store::close_replica or store::Store::remove_replica

-
source

pub fn merge_capability( +

pub fn merge_capability( &mut self, capability: Capability ) -> Result<bool, CapabilityError>

Merge a capability.

The capability must refer to the the same namespace, otherwise an error will be returned.

This will upgrade the replica’s capability when passing a Capability::Write. It is a no-op if capability is a Capability::Read`.

-

Trait Implementations§

source§

impl Debug for ReplicaInfo
where +

Trait Implementations§

§

impl Debug for ReplicaInfo

source§

fn fmt(&self, __derive_more_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 + Subscribers: Debug, + bool: Debug,

§

fn fmt(&self, __derive_more_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/2547/docs/iroh/docs/sync/struct.SignedEntry.html b/pr/2547/docs/iroh/docs/sync/struct.SignedEntry.html index c7972fa77d..307a5b3b5b 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.SignedEntry.html +++ b/pr/2547/docs/iroh/docs/sync/struct.SignedEntry.html @@ -1,55 +1,55 @@ -SignedEntry in iroh::docs::sync - Rust

Struct iroh::docs::sync::SignedEntry

source ·
pub struct SignedEntry {
+SignedEntry in iroh::docs::sync - Rust

Struct iroh::docs::sync::SignedEntry

pub struct SignedEntry {
     signature: EntrySignature,
     entry: Entry,
 }
Expand description

A signed entry.

-

Fields§

§signature: EntrySignature§entry: Entry

Implementations§

source§

impl SignedEntry

Fields§

§signature: EntrySignature§entry: Entry

Implementations§

§

impl SignedEntry

pub fn from_entry( entry: Entry, namespace: &NamespaceSecret, author: &Author ) -> SignedEntry

Create a new signed entry by signing an entry with the namespace and author.

-
source

pub fn from_parts( +

pub fn from_parts( namespace: &NamespaceSecret, author: &Author, key: impl AsRef<[u8]>, record: Record ) -> SignedEntry

Create a new signed entries from its parts.

-
source

pub fn verify<S>(&self, store: &S) -> Result<(), Error>
where +

pub fn verify<S>(&self, store: &S) -> Result<(), Error>
where S: PublicKeyStore,

Verify the signatures on this entry.

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

-
source

pub fn timestamp(&self) -> u64

Get the timestamp of the entry.

-

Methods from Deref<Target = Entry>§

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 id(&self) -> &RecordIdentifier

Get the RecordIdentifier for this entry.

-
source

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this entry.

-
source

pub fn author(&self) -> AuthorId

Get the AuthorId of this entry.

-
source

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

Get the key of this entry.

-
source

pub fn record(&self) -> &Record

Get the Record contained in this entry.

-
source

pub fn encode(&self, out: &mut Vec<u8>)

Serialize this entry into its canonical byte representation used for signing.

-
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 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<(), Error>

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) -> &<SignedEntry as Deref>::Target

Dereferences the value.
source§

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

pub fn signature(&self) -> &EntrySignature

Get the signature.

+

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.

+

pub fn entry(&self) -> &Entry

Get the Entry.

+

pub fn content_hash(&self) -> Hash

Get the content Hash of the entry.

+

pub fn content_len(&self) -> u64

Get the content length of the entry.

+

pub fn author_bytes(&self) -> AuthorId

Get the author bytes of this entry.

+

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

Get the key of the entry.

+

pub fn timestamp(&self) -> u64

Get the timestamp of the entry.

+

Methods from Deref<Target = Entry>§

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.

+

pub fn id(&self) -> &RecordIdentifier

Get the RecordIdentifier for this entry.

+

pub fn namespace(&self) -> NamespaceId

Get the NamespaceId of this entry.

+

pub fn author(&self) -> AuthorId

Get the AuthorId of this entry.

+

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

Get the key of this entry.

+

pub fn record(&self) -> &Record

Get the Record contained in this entry.

+

pub fn encode(&self, out: &mut Vec<u8>)

Serialize this entry into its canonical byte representation used for signing.

+

pub fn to_vec(&self) -> Vec<u8> ⓘ

Serialize this entry into a new vector with its canonical byte representation.

+

Methods from Deref<Target = Record>§

pub fn is_empty(&self) -> bool

Return true if the entry is empty.

+

pub fn content_len(&self) -> u64

Get the length of the data addressed by this record’s content hash.

+

pub fn content_hash(&self) -> Hash

Get the Hash of the content data of this record.

+

pub fn timestamp(&self) -> u64

Get the timestamp of this record.

+

Trait Implementations§

§

impl Clone for SignedEntry

§

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
§

impl Debug for SignedEntry

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for SignedEntry

§

type Target = Entry

The resulting type after dereferencing.
§

fn deref(&self) -> &<SignedEntry as Deref>::Target

Dereferences the value.
§

impl<'de> Deserialize<'de> for SignedEntry

§

fn deserialize<__D>( __deserializer: __D ) -> Result<SignedEntry, <__D as Deserializer<'de>>::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) -> Entry

Converts to this type from the input type.
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: &SignedEntry) -> 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
§

impl From<SignedEntry> for Entry

§

fn from(value: SignedEntry) -> Entry

Converts to this type from the input type.
source§

impl From<SignedEntry> for Entry

source§

fn from(value: SignedEntry) -> Self

Converts to this type from the input type.
§

impl Ord for SignedEntry

§

fn cmp(&self, other: &SignedEntry) -> 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
source§

impl PartialEq for SignedEntry

source§

fn eq(&self, other: &SignedEntry) -> 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
§

impl PartialEq for SignedEntry

§

fn eq(&self, other: &SignedEntry) -> 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.
source§

impl PartialOrd for SignedEntry

source§

fn partial_cmp(&self, other: &SignedEntry) -> 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.
§

impl PartialOrd for SignedEntry

§

fn partial_cmp(&self, other: &SignedEntry) -> 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
source§

impl Serialize for SignedEntry

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for SignedEntry

§

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
source§

impl Eq for SignedEntry

source§

impl StructuralPartialEq for SignedEntry

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl Eq for SignedEntry

§

impl StructuralPartialEq for SignedEntry

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/2547/docs/iroh/docs/sync/struct.SyncOutcome.html b/pr/2547/docs/iroh/docs/sync/struct.SyncOutcome.html index d2fdd05fa0..0b31207af7 100644 --- a/pr/2547/docs/iroh/docs/sync/struct.SyncOutcome.html +++ b/pr/2547/docs/iroh/docs/sync/struct.SyncOutcome.html @@ -1,4 +1,4 @@ -SyncOutcome in iroh::docs::sync - Rust

Struct iroh::docs::sync::SyncOutcome

source ·
pub struct SyncOutcome {
+SyncOutcome in iroh::docs::sync - Rust

Struct iroh::docs::sync::SyncOutcome

pub struct SyncOutcome {
     pub heads_received: AuthorHeads,
     pub num_recv: usize,
     pub num_sent: usize,
@@ -6,7 +6,7 @@
 

Fields§

§heads_received: AuthorHeads

Timestamp of the latest entry for each author in the set we received.

§num_recv: usize

Number of entries we received.

§num_sent: usize

Number of entries we sent.

-

Trait Implementations§

source§

impl Clone for SyncOutcome

source§

fn clone(&self) -> SyncOutcome

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 SyncOutcome

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for SyncOutcome

source§

fn default() -> SyncOutcome

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for SyncOutcome

§

fn clone(&self) -> SyncOutcome

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 SyncOutcome

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Default for SyncOutcome

§

fn default() -> SyncOutcome

Returns the “default value” for a type. 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/2547/docs/iroh/docs/sync/type.ContentStatusCallback.html b/pr/2547/docs/iroh/docs/sync/type.ContentStatusCallback.html index 0d12e8f5c2..27baca9f1a 100644 --- a/pr/2547/docs/iroh/docs/sync/type.ContentStatusCallback.html +++ b/pr/2547/docs/iroh/docs/sync/type.ContentStatusCallback.html @@ -1,4 +1,4 @@ -ContentStatusCallback in iroh::docs::sync - Rust

Type Alias iroh::docs::sync::ContentStatusCallback

source ·
pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>;
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

pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>;
Expand description

Callback that may be set on a replica to determine the availability status for a content hash.

Aliased Type§

struct ContentStatusCallback {
     ptr: NonNull<ArcInner<dyn Fn(Hash) -> ContentStatus + Send + Sync>>,
     phantom: PhantomData<ArcInner<dyn Fn(Hash) -> ContentStatus + Send + Sync>>,
diff --git a/pr/2547/docs/iroh/docs/sync/type.PeerIdBytes.html b/pr/2547/docs/iroh/docs/sync/type.PeerIdBytes.html
index 2c1b62c594..44ddba4562 100644
--- a/pr/2547/docs/iroh/docs/sync/type.PeerIdBytes.html
+++ b/pr/2547/docs/iroh/docs/sync/type.PeerIdBytes.html
@@ -1,2 +1,2 @@
-PeerIdBytes in iroh::docs::sync - Rust

Type Alias iroh::docs::sync::PeerIdBytes

source ·
pub type PeerIdBytes = [u8; 32];
Expand description

Byte representation of a PeerId from iroh-net.

+PeerIdBytes in iroh::docs::sync - Rust

Type Alias iroh::docs::sync::PeerIdBytes

pub type PeerIdBytes = [u8; 32];
Expand description

Byte representation of a PeerId from iroh-net.

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/sync/type.ProtocolMessage.html b/pr/2547/docs/iroh/docs/sync/type.ProtocolMessage.html index e50ad55afb..5ba0ad6a1a 100644 --- a/pr/2547/docs/iroh/docs/sync/type.ProtocolMessage.html +++ b/pr/2547/docs/iroh/docs/sync/type.ProtocolMessage.html @@ -1,5 +1,5 @@ -ProtocolMessage in iroh::docs::sync - Rust

Type Alias iroh::docs::sync::ProtocolMessage

source ·
pub type ProtocolMessage = Message<SignedEntry>;
Expand description

Protocol message for the set reconciliation protocol.

+ProtocolMessage in iroh::docs::sync - Rust

Type Alias iroh::docs::sync::ProtocolMessage

pub type ProtocolMessage = Message<SignedEntry>;
Expand description

Protocol message for the set reconciliation protocol.

Can be serialized to bytes with serde to transfer between peers.

Aliased Type§

struct ProtocolMessage {
-    parts: Vec<MessagePart<SignedEntry>>,
-}

Fields§

§parts: Vec<MessagePart<SignedEntry>>
\ No newline at end of file + parts: Vec<MessagePart<SignedEntry>>, +}

Fields§

§parts: Vec<MessagePart<SignedEntry>>
\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/type.ContentStatusCallback.html b/pr/2547/docs/iroh/docs/type.ContentStatusCallback.html index 926895933f..3ab5609ab1 100644 --- a/pr/2547/docs/iroh/docs/type.ContentStatusCallback.html +++ b/pr/2547/docs/iroh/docs/type.ContentStatusCallback.html @@ -1,4 +1,4 @@ -ContentStatusCallback in iroh::docs - Rust

Type Alias iroh::docs::ContentStatusCallback

source ·
pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>;
Expand description

Callback that may be set on a replica to determine the availability status for a content hash.

+ContentStatusCallback in iroh::docs - Rust

Type Alias iroh::docs::ContentStatusCallback

pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>;
Expand description

Callback that may be set on a replica to determine the availability status for a content hash.

Aliased Type§

struct ContentStatusCallback {
     ptr: NonNull<ArcInner<dyn Fn(Hash) -> ContentStatus + Send + Sync>>,
     phantom: PhantomData<ArcInner<dyn Fn(Hash) -> ContentStatus + Send + Sync>>,
diff --git a/pr/2547/docs/iroh/docs/type.PeerIdBytes.html b/pr/2547/docs/iroh/docs/type.PeerIdBytes.html
index 360a55d0b2..8eeb6b3c4e 100644
--- a/pr/2547/docs/iroh/docs/type.PeerIdBytes.html
+++ b/pr/2547/docs/iroh/docs/type.PeerIdBytes.html
@@ -1,2 +1,2 @@
-PeerIdBytes in iroh::docs - Rust

Type Alias iroh::docs::PeerIdBytes

source ·
pub type PeerIdBytes = [u8; 32];
Expand description

Byte representation of a PeerId from iroh-net.

+PeerIdBytes in iroh::docs - Rust

Type Alias iroh::docs::PeerIdBytes

pub type PeerIdBytes = [u8; 32];
Expand description

Byte representation of a PeerId from iroh-net.

\ No newline at end of file diff --git a/pr/2547/docs/iroh/docs/type.ProtocolMessage.html b/pr/2547/docs/iroh/docs/type.ProtocolMessage.html index 24afe85c6a..4b8c82891b 100644 --- a/pr/2547/docs/iroh/docs/type.ProtocolMessage.html +++ b/pr/2547/docs/iroh/docs/type.ProtocolMessage.html @@ -1,5 +1,5 @@ -ProtocolMessage in iroh::docs - Rust

Type Alias iroh::docs::ProtocolMessage

source ·
pub type ProtocolMessage = Message<SignedEntry>;
Expand description

Protocol message for the set reconciliation protocol.

+ProtocolMessage in iroh::docs - Rust

Type Alias iroh::docs::ProtocolMessage

pub type ProtocolMessage = Message<SignedEntry>;
Expand description

Protocol message for the set reconciliation protocol.

Can be serialized to bytes with serde to transfer between peers.

Aliased Type§

struct ProtocolMessage {
-    parts: Vec<MessagePart<SignedEntry>>,
-}

Fields§

§parts: Vec<MessagePart<SignedEntry>>
\ No newline at end of file + parts: Vec<MessagePart<SignedEntry>>, +}

Fields§

§parts: Vec<MessagePart<SignedEntry>>
\ No newline at end of file diff --git a/pr/2547/docs/iroh/node/docs/struct.DocsEngine.html b/pr/2547/docs/iroh/node/docs/struct.DocsEngine.html index ac859a581c..20eb9f484b 100644 --- a/pr/2547/docs/iroh/node/docs/struct.DocsEngine.html +++ b/pr/2547/docs/iroh/node/docs/struct.DocsEngine.html @@ -61,26 +61,26 @@ ) -> RpcResult<GetDownloadPolicyResponse>

source

pub async fn doc_get_sync_peers( &self, req: GetSyncPeersRequest -) -> RpcResult<GetSyncPeersResponse>

Methods from Deref<Target = Engine>§

Methods from Deref<Target = Engine>§

pub async fn start_sync( &self, namespace: NamespaceId, peers: Vec<NodeAddr> ) -> Result<(), Error>

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.

-
source

pub async fn leave( +

pub async fn leave( &self, namespace: NamespaceId, kill_subscribers: bool ) -> Result<(), Error>

Stop the live sync for a document and leave the gossip swarm.

If kill_subscribers is true, all existing event subscribers will be dropped. This means they will receive None and no further events in case of rejoining the document.

-
source

pub async fn subscribe( +

pub async fn subscribe( &self, namespace: NamespaceId ) -> Result<impl Stream<Item = Result<LiveEvent, Error>> + Unpin + 'static, Error>

Subscribe to replica and sync progress events.

-
source

pub async fn handle_connection(&self, conn: Connecting) -> Result<(), Error>

Handle an incoming iroh-docs connection.

-
source

pub async fn shutdown(&self) -> Result<(), Error>

Shutdown the engine.

+

pub async fn handle_connection(&self, conn: Connecting) -> Result<(), Error>

Handle an incoming iroh-docs connection.

+

pub async fn shutdown(&self) -> Result<(), Error>

Shutdown the engine.

Trait Implementations§

source§

impl Clone for DocsEngine

source§

fn clone(&self) -> DocsEngine

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 DocsEngine

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for DocsEngine

§

type Target = Engine

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl ProtocolHandler for DocsEngine

source§

fn accept(self: Arc<Self>, conn: Connecting) -> BoxedFuture<Result<()>>

Handle an incoming connection. Read more
source§

fn shutdown(self: Arc<Self>) -> BoxedFuture<()>

Called when the node shuts down.

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 diff --git a/pr/2547/docs/type.impl/std/primitive.array.js b/pr/2547/docs/type.impl/std/primitive.array.js index b821e5bec5..52e5a13479 100644 --- a/pr/2547/docs/type.impl/std/primitive.array.js +++ b/pr/2547/docs/type.impl/std/primitive.array.js @@ -1,5 +1,5 @@ (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"],["
§

impl From<Hash> for [u8; 32]

§

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":[["
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"],["
§

impl From<AuthorId> for [u8; 32]

§

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"],["
§

impl From<Hash> for [u8; 32]

§

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"],["
§

impl From<NamespaceId> for [u8; 32]

§

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_dns_server":[["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl<const N: usize, I, O, E, P> Alt<I, O, E> for [P; N]
where\n I: Stream,\n E: ParserError<I>,\n P: Parser<I, O, E>,

§

fn choice(&mut self, input: &mut I) -> Result<O, ErrMode<E>>

Tests each parser in the tuple and returns the result of the first one that succeeds
","Alt","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl AsBytes for [u8; 32]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl<const LEN: usize, C> ContainsToken<C> for [u8; LEN]
where\n C: AsChar,

§

fn contains_token(&self, token: C) -> bool

Returns true if self contains the token
","ContainsToken","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl FindToken<u8> for [u8; 32]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl From<&Signature> for [u8; 64]

§

fn from(sig: &Signature) -> [u8; 64]

Converts to this type from the input type.
","From<&Signature>","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
source§

impl From<PublicKeyBytes> for [u8; 32]

source§

fn from(value: PublicKeyBytes) -> Self

Converts to this type from the input type.
","From","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl From<Signature> for [u8; 64]

§

fn from(sig: Signature) -> [u8; 64]

Converts to this type from the input type.
","From","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl<const N: usize> IntoResponse for [u8; N]

§

fn into_response(self) -> Response<Body>

Create a response.
","IntoResponse","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl<const N: usize> Replacer for [u8; N]

§

fn replace_append(&mut self, caps: &Captures<'_>, dst: &mut Vec<u8>)

Appends possibly empty data to dst to replace the current match. Read more
§

fn no_expansion(&mut self) -> Option<Cow<'_, [u8]>>

Return a fixed unchanging replacement byte string. Read more
§

fn by_ref<'r>(&'r mut self) -> ReplacerRef<'r, Self>

Returns a type that implements Replacer, but that borrows and wraps\nthis Replacer. Read more
","Replacer","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl<T, const LEN: usize> SliceLen for [T; LEN]

§

fn slice_len(&self) -> usize

Calculates the input length, as indicated by its name,\nand the name of the trait itself
","SliceLen","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"],["
source§

impl<T, const N: usize> ConstParamTy for [T; N]
where\n T: ConstParamTy,

","ConstParamTy","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
1.58.0 · source§

impl<T, const N: usize> Copy for [T; N]
where\n T: Copy,

","Copy","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
1.0.0 · source§

impl<T, const N: usize> Eq for [T; N]
where\n T: Eq,

","Eq","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
source§

impl<T, const N: usize> StructuralPartialEq for [T; N]

","StructuralPartialEq","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
§

impl<const N: usize, T> Unaligned for [T; N]
where\n T: Unaligned,

","Unaligned","iroh_dns_server::store::signed_packets::SignedPacketsKey"],["
§

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_dns_server::store::signed_packets::SignedPacketsKey"]], "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"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file