diff --git a/pr/2737/docs/help.html b/pr/2737/docs/help.html index 522384bdd1..bb0a3f1cfe 100644 --- a/pr/2737/docs/help.html +++ b/pr/2737/docs/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

Rustdoc help

Back
\ No newline at end of file diff --git a/pr/2737/docs/iroh/base/hash/enum.BlobFormat.html b/pr/2737/docs/iroh/base/hash/enum.BlobFormat.html index c1d03f4ff9..e3890deb56 100644 --- a/pr/2737/docs/iroh/base/hash/enum.BlobFormat.html +++ b/pr/2737/docs/iroh/base/hash/enum.BlobFormat.html @@ -142,7 +142,7 @@ builds.
Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/base/hash/struct.Hash.html b/pr/2737/docs/iroh/base/hash/struct.Hash.html index a89c471fe7..d12267e879 100644 --- a/pr/2737/docs/iroh/base/hash/struct.Hash.html +++ b/pr/2737/docs/iroh/base/hash/struct.Hash.html @@ -159,7 +159,7 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/base/hash/struct.HashAndFormat.html b/pr/2737/docs/iroh/base/hash/struct.HashAndFormat.html index 093b053dd2..119d1ef543 100644 --- a/pr/2737/docs/iroh/base/hash/struct.HashAndFormat.html +++ b/pr/2737/docs/iroh/base/hash/struct.HashAndFormat.html @@ -149,7 +149,7 @@ builds.
Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/base/key/struct.PublicKey.html b/pr/2737/docs/iroh/base/key/struct.PublicKey.html index cee6ec9a7d..d8386e63f6 100644 --- a/pr/2737/docs/iroh/base/key/struct.PublicKey.html +++ b/pr/2737/docs/iroh/base/key/struct.PublicKey.html @@ -167,7 +167,7 @@ letters are used (e.g. F9B4CA)
Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/base/ticket/trait.Ticket.html b/pr/2737/docs/iroh/base/ticket/trait.Ticket.html index 5a2cf62192..912f56dd54 100644 --- a/pr/2737/docs/iroh/base/ticket/trait.Ticket.html +++ b/pr/2737/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/2737/docs/iroh/blobs/enum.BlobFormat.html b/pr/2737/docs/iroh/blobs/enum.BlobFormat.html index 222b1aff01..86797a6390 100644 --- a/pr/2737/docs/iroh/blobs/enum.BlobFormat.html +++ b/pr/2737/docs/iroh/blobs/enum.BlobFormat.html @@ -142,7 +142,7 @@ builds.
Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/blobs/get/db/enum.BlobId.html b/pr/2737/docs/iroh/blobs/get/db/enum.BlobId.html index eae91343f6..c2d79aa134 100644 --- a/pr/2737/docs/iroh/blobs/get/db/enum.BlobId.html +++ b/pr/2737/docs/iroh/blobs/get/db/enum.BlobId.html @@ -138,7 +138,7 @@ builds.
Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

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

\ No newline at end of file diff --git a/pr/2737/docs/iroh/blobs/struct.Hash.html b/pr/2737/docs/iroh/blobs/struct.Hash.html index 8af99de50f..2063766b6a 100644 --- a/pr/2737/docs/iroh/blobs/struct.Hash.html +++ b/pr/2737/docs/iroh/blobs/struct.Hash.html @@ -159,7 +159,7 @@ letters are used (e.g. F9B4CA)Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/blobs/struct.HashAndFormat.html b/pr/2737/docs/iroh/blobs/struct.HashAndFormat.html index f762e47076..2cd7c1db9f 100644 --- a/pr/2737/docs/iroh/blobs/struct.HashAndFormat.html +++ b/pr/2737/docs/iroh/blobs/struct.HashAndFormat.html @@ -149,7 +149,7 @@ builds.
Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/client/docs/enum.Origin.html b/pr/2737/docs/iroh/client/docs/enum.Origin.html index 13308a4eb2..7e955abb42 100644 --- a/pr/2737/docs/iroh/client/docs/enum.Origin.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/client/docs/enum.SyncReason.html b/pr/2737/docs/iroh/client/docs/enum.SyncReason.html index 0df0063dcb..2fad1cba28 100644 --- a/pr/2737/docs/iroh/client/docs/enum.SyncReason.html +++ b/pr/2737/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§

§

impl Freeze for SyncReason

§

impl RefUnwindSafe for SyncReason

§

impl Send for SyncReason

§

impl Sync for SyncReason

§

impl Unpin for SyncReason

§

impl UnwindSafe for SyncReason

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§

§

impl Freeze for SyncReason

§

impl RefUnwindSafe for SyncReason

§

impl Send for SyncReason

§

impl Sync for SyncReason

§

impl Unpin for SyncReason

§

impl UnwindSafe for SyncReason

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/client/docs/struct.SyncEvent.html b/pr/2737/docs/iroh/client/docs/struct.SyncEvent.html index c23b3708fd..75c317105c 100644 --- a/pr/2737/docs/iroh/client/docs/struct.SyncEvent.html +++ b/pr/2737/docs/iroh/client/docs/struct.SyncEvent.html @@ -1,4 +1,4 @@ -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,
@@ -10,16 +10,16 @@
 
§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

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§

§

impl Freeze for SyncEvent

§

impl RefUnwindSafe for SyncEvent

§

impl Send for SyncEvent

§

impl Sync for SyncEvent

§

impl Unpin for SyncEvent

§

impl UnwindSafe for SyncEvent

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§

§

impl Freeze for SyncEvent

§

impl RefUnwindSafe for SyncEvent

§

impl Send for SyncEvent

§

impl Sync for SyncEvent

§

impl Unpin for SyncEvent

§

impl UnwindSafe for SyncEvent

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/client/gossip/enum.SubscribeResponse.html b/pr/2737/docs/iroh/client/gossip/enum.SubscribeResponse.html index c6df8544b4..25d09d1782 100644 --- a/pr/2737/docs/iroh/client/gossip/enum.SubscribeResponse.html +++ b/pr/2737/docs/iroh/client/gossip/enum.SubscribeResponse.html @@ -1,4 +1,4 @@ -SubscribeResponse in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeResponse

source ·
pub enum SubscribeResponse {
+SubscribeResponse in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeResponse

pub enum SubscribeResponse {
     Gossip(GossipEvent),
     Lagged,
 }
Expand description

Events emitted from a gossip topic with a lagging notification.

@@ -6,16 +6,16 @@ provide a notification if we missed gossip events for the topic.

Variants§

§

Gossip(GossipEvent)

We received an event.

§

Lagged

We missed some messages because our GossipReceiver was not progressing fast enough.

-

Trait Implementations§

source§

impl Debug for Event

source§

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

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

impl<'de> Deserialize<'de> for Event

Trait Implementations§

§

impl Debug for Event

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Event

§

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

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

impl PartialEq for Event

source§

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

§

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

source§

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

§

impl Serialize for Event

§

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 Event

source§

impl StructuralPartialEq for Event

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 + __S: Serializer,

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

impl Eq for Event

§

impl StructuralPartialEq for Event

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/client/gossip/enum.SubscribeUpdate.html b/pr/2737/docs/iroh/client/gossip/enum.SubscribeUpdate.html index d70ec1f2e8..ed598c3767 100644 --- a/pr/2737/docs/iroh/client/gossip/enum.SubscribeUpdate.html +++ b/pr/2737/docs/iroh/client/gossip/enum.SubscribeUpdate.html @@ -1,4 +1,4 @@ -SubscribeUpdate in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeUpdate

source ·
pub enum SubscribeUpdate {
+SubscribeUpdate in iroh::client::gossip - Rust

Enum iroh::client::gossip::SubscribeUpdate

pub enum SubscribeUpdate {
     Broadcast(Bytes),
     BroadcastNeighbors(Bytes),
     JoinPeers(Vec<PublicKey>),
@@ -6,10 +6,10 @@
 

Variants§

§

Broadcast(Bytes)

Broadcast a message to all nodes in the swarm

§

BroadcastNeighbors(Bytes)

Broadcast a message to all direct neighbors

§

JoinPeers(Vec<PublicKey>)

Connect to a set of peers

-

Trait Implementations§

source§

impl Debug for Command

source§

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

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

impl<'de> Deserialize<'de> for Command

Trait Implementations§

§

impl Debug for Command

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Command

§

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

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

impl Serialize for Command

source§

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

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

impl Serialize for Command

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2737/docs/iroh/docs/actor/index.html b/pr/2737/docs/iroh/docs/actor/index.html index 481304bc4a..12a47912b5 100644 --- a/pr/2737/docs/iroh/docs/actor/index.html +++ b/pr/2737/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/2737/docs/iroh/docs/actor/struct.OpenOpts.html b/pr/2737/docs/iroh/docs/actor/struct.OpenOpts.html index 1376af9274..b788677ee1 100644 --- a/pr/2737/docs/iroh/docs/actor/struct.OpenOpts.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/actor/struct.OpenState.html b/pr/2737/docs/iroh/docs/actor/struct.OpenState.html index 35a2b29e72..e74feba2e0 100644 --- a/pr/2737/docs/iroh/docs/actor/struct.OpenState.html +++ b/pr/2737/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§

§

impl Freeze for OpenState

§

impl RefUnwindSafe for OpenState

§

impl Send for OpenState

§

impl Sync for OpenState

§

impl Unpin for OpenState

§

impl UnwindSafe for OpenState

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§

§

impl Freeze for OpenState

§

impl RefUnwindSafe for OpenState

§

impl Send for OpenState

§

impl Sync for OpenState

§

impl Unpin for OpenState

§

impl UnwindSafe for OpenState

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/actor/struct.SyncHandle.html b/pr/2737/docs/iroh/docs/actor/struct.SyncHandle.html index 6e0e8c8593..fa826bebca 100644 --- a/pr/2737/docs/iroh/docs/actor/struct.SyncHandle.html +++ b/pr/2737/docs/iroh/docs/actor/struct.SyncHandle.html @@ -1,4 +1,4 @@ -SyncHandle in iroh::docs::actor - Rust

Struct iroh::docs::actor::SyncHandle

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

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

+SyncHandle in iroh::docs::actor - Rust

Struct iroh::docs::actor::SyncHandle

pub struct SyncHandle { /* private fields */ }
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 returning something via a return channel. The actor thread itself is a regular std::thread which processes incoming messages sequentially.

@@ -8,109 +8,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.

-

Implementations§

source§

impl SyncHandle

source

pub fn spawn( +

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

§

impl Freeze for SyncHandle

§

impl !RefUnwindSafe for SyncHandle

§

impl Send for SyncHandle

§

impl Sync for SyncHandle

§

impl Unpin for SyncHandle

§

impl !UnwindSafe for SyncHandle

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§

§

impl Freeze for SyncHandle

§

impl !RefUnwindSafe for SyncHandle

§

impl Send for SyncHandle

§

impl Sync for SyncHandle

§

impl Unpin for SyncHandle

§

impl !UnwindSafe for SyncHandle

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html b/pr/2737/docs/iroh/docs/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html index ba3e0f8b27..c4e92bf30f 100644 --- a/pr/2737/docs/iroh/docs/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html +++ b/pr/2737/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/2737/docs/iroh/docs/engine/enum.DefaultAuthorStorage.html b/pr/2737/docs/iroh/docs/engine/enum.DefaultAuthorStorage.html index 95ecaa2adc..3c84be3f14 100644 --- a/pr/2737/docs/iroh/docs/engine/enum.DefaultAuthorStorage.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/engine/enum.LiveEvent.html b/pr/2737/docs/iroh/docs/engine/enum.LiveEvent.html index e50ea25708..0c782b48ea 100644 --- a/pr/2737/docs/iroh/docs/engine/enum.LiveEvent.html +++ b/pr/2737/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§

§

impl !Freeze for LiveEvent

§

impl RefUnwindSafe for LiveEvent

§

impl Send for LiveEvent

§

impl Sync for LiveEvent

§

impl Unpin for LiveEvent

§

impl UnwindSafe for LiveEvent

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§

§

impl !Freeze for LiveEvent

§

impl RefUnwindSafe for LiveEvent

§

impl Send for LiveEvent

§

impl Sync for LiveEvent

§

impl Unpin for LiveEvent

§

impl UnwindSafe for LiveEvent

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/engine/enum.Origin.html b/pr/2737/docs/iroh/docs/engine/enum.Origin.html index c1117f44af..8f87a1237e 100644 --- a/pr/2737/docs/iroh/docs/engine/enum.Origin.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/engine/enum.SyncReason.html b/pr/2737/docs/iroh/docs/engine/enum.SyncReason.html index bf04e60e03..1b49e54bbc 100644 --- a/pr/2737/docs/iroh/docs/engine/enum.SyncReason.html +++ b/pr/2737/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§

§

impl Freeze for SyncReason

§

impl RefUnwindSafe for SyncReason

§

impl Send for SyncReason

§

impl Sync for SyncReason

§

impl Unpin for SyncReason

§

impl UnwindSafe for SyncReason

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§

§

impl Freeze for SyncReason

§

impl RefUnwindSafe for SyncReason

§

impl Send for SyncReason

§

impl Sync for SyncReason

§

impl Unpin for SyncReason

§

impl UnwindSafe for SyncReason

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/engine/fn.entry_to_content_status.html b/pr/2737/docs/iroh/docs/engine/fn.entry_to_content_status.html index 358e56f995..2c2d395bf0 100644 --- a/pr/2737/docs/iroh/docs/engine/fn.entry_to_content_status.html +++ b/pr/2737/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/2737/docs/iroh/docs/engine/index.html b/pr/2737/docs/iroh/docs/engine/index.html index 12d8e1f28b..c26ff5624d 100644 --- a/pr/2737/docs/iroh/docs/engine/index.html +++ b/pr/2737/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/2737/docs/iroh/docs/engine/struct.DefaultAuthor.html b/pr/2737/docs/iroh/docs/engine/struct.DefaultAuthor.html index efae3bd77c..2bf1f1ef77 100644 --- a/pr/2737/docs/iroh/docs/engine/struct.DefaultAuthor.html +++ b/pr/2737/docs/iroh/docs/engine/struct.DefaultAuthor.html @@ -1,16 +1,16 @@ -DefaultAuthor in iroh::docs::engine - Rust

Struct iroh::docs::engine::DefaultAuthor

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

Persistent default author for a docs engine.

-

Implementations§

source§

impl DefaultAuthor

source

pub async fn load( +DefaultAuthor in iroh::docs::engine - Rust

Struct iroh::docs::engine::DefaultAuthor

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

Persistent default author for a docs engine.

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/engine/struct.Engine.html b/pr/2737/docs/iroh/docs/engine/struct.Engine.html index 02d48502e4..30294764d7 100644 --- a/pr/2737/docs/iroh/docs/engine/struct.Engine.html +++ b/pr/2737/docs/iroh/docs/engine/struct.Engine.html @@ -1,4 +1,4 @@ -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>,
@@ -8,7 +8,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.

-

Implementations§

source§

impl Engine

source

pub async fn spawn<B>( +

Implementations§

§

impl Engine

pub async fn spawn<B>( endpoint: Endpoint, gossip: Gossip, replica_store: Store, @@ -19,27 +19,27 @@ 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

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 +

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

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/engine/struct.SyncEvent.html b/pr/2737/docs/iroh/docs/engine/struct.SyncEvent.html index 8e21229553..8b90a5de21 100644 --- a/pr/2737/docs/iroh/docs/engine/struct.SyncEvent.html +++ b/pr/2737/docs/iroh/docs/engine/struct.SyncEvent.html @@ -1,4 +1,4 @@ -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,
@@ -10,16 +10,16 @@
 
§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

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§

§

impl Freeze for SyncEvent

§

impl RefUnwindSafe for SyncEvent

§

impl Send for SyncEvent

§

impl Sync for SyncEvent

§

impl Unpin for SyncEvent

§

impl UnwindSafe for SyncEvent

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§

§

impl Freeze for SyncEvent

§

impl RefUnwindSafe for SyncEvent

§

impl Send for SyncEvent

§

impl Sync for SyncEvent

§

impl Unpin for SyncEvent

§

impl UnwindSafe for SyncEvent

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/enum.Capability.html b/pr/2737/docs/iroh/docs/enum.Capability.html index a6c163b2af..d2e167cf10 100644 --- a/pr/2737/docs/iroh/docs/enum.Capability.html +++ b/pr/2737/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/2737/docs/iroh/docs/enum.CapabilityError.html b/pr/2737/docs/iroh/docs/enum.CapabilityError.html index 4374fe4c4a..08fbad3318 100644 --- a/pr/2737/docs/iroh/docs/enum.CapabilityError.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/enum.CapabilityKind.html b/pr/2737/docs/iroh/docs/enum.CapabilityKind.html index ab9d9b55c0..1e4cbaa20e 100644 --- a/pr/2737/docs/iroh/docs/enum.CapabilityKind.html +++ b/pr/2737/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§

§

impl Freeze for CapabilityKind

§

impl RefUnwindSafe for CapabilityKind

§

impl Send for CapabilityKind

§

impl Sync for CapabilityKind

§

impl Unpin for CapabilityKind

§

impl UnwindSafe for CapabilityKind

Blanket Implementations§

source§

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

§

impl Copy for CapabilityKind

Auto Trait Implementations§

§

impl Freeze for CapabilityKind

§

impl RefUnwindSafe for CapabilityKind

§

impl Send for CapabilityKind

§

impl Sync for CapabilityKind

§

impl Unpin for CapabilityKind

§

impl UnwindSafe for CapabilityKind

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/enum.ContentStatus.html b/pr/2737/docs/iroh/docs/enum.ContentStatus.html index 4bb093cfc8..fb1728175e 100644 --- a/pr/2737/docs/iroh/docs/enum.ContentStatus.html +++ b/pr/2737/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§

§

impl Freeze for ContentStatus

§

impl RefUnwindSafe for ContentStatus

§

impl Send for ContentStatus

§

impl Sync for ContentStatus

§

impl Unpin for ContentStatus

§

impl UnwindSafe for ContentStatus

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§

§

impl Freeze for ContentStatus

§

impl RefUnwindSafe for ContentStatus

§

impl Send for ContentStatus

§

impl Sync for ContentStatus

§

impl Unpin for ContentStatus

§

impl UnwindSafe for ContentStatus

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/enum.Event.html b/pr/2737/docs/iroh/docs/enum.Event.html index 56f1879ae6..a2e5b862fe 100644 --- a/pr/2737/docs/iroh/docs/enum.Event.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/enum.InsertError.html b/pr/2737/docs/iroh/docs/enum.InsertError.html index 6f2b025f33..c6be9adce4 100644 --- a/pr/2737/docs/iroh/docs/enum.InsertError.html +++ b/pr/2737/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,7 +12,7 @@
 
§

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

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

Trait Implementations§

§

impl Debug for InsertError

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/enum.InsertOrigin.html b/pr/2737/docs/iroh/docs/enum.InsertOrigin.html index 20fe02812b..3b01053977 100644 --- a/pr/2737/docs/iroh/docs/enum.InsertOrigin.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/enum.ValidationFailure.html b/pr/2737/docs/iroh/docs/enum.ValidationFailure.html index 6a318afc08..bf7e85daf2 100644 --- a/pr/2737/docs/iroh/docs/enum.ValidationFailure.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/index.html b/pr/2737/docs/iroh/docs/index.html index 658c5d3190..7d3e2ca14c 100644 --- a/pr/2737/docs/iroh/docs/index.html +++ b/pr/2737/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/2737/docs/iroh/docs/metrics/index.html b/pr/2737/docs/iroh/docs/metrics/index.html index b9eb981786..4e78344871 100644 --- a/pr/2737/docs/iroh/docs/metrics/index.html +++ b/pr/2737/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/2737/docs/iroh/docs/metrics/struct.Metrics.html b/pr/2737/docs/iroh/docs/metrics/struct.Metrics.html index c3cd061f3c..b6c3256e7d 100644 --- a/pr/2737/docs/iroh/docs/metrics/struct.Metrics.html +++ b/pr/2737/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/2737/docs/iroh/docs/net/constant.DOCS_ALPN.html b/pr/2737/docs/iroh/docs/net/constant.DOCS_ALPN.html index 6ccf22c9fe..fa8a83f1cc 100644 --- a/pr/2737/docs/iroh/docs/net/constant.DOCS_ALPN.html +++ b/pr/2737/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/2737/docs/iroh/docs/net/enum.AbortReason.html b/pr/2737/docs/iroh/docs/net/enum.AbortReason.html index d6794131df..2b73098f2d 100644 --- a/pr/2737/docs/iroh/docs/net/enum.AbortReason.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/net/enum.AcceptError.html b/pr/2737/docs/iroh/docs/net/enum.AcceptError.html index 67e4a3ec9f..031aa86098 100644 --- a/pr/2737/docs/iroh/docs/net/enum.AcceptError.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/net/enum.AcceptOutcome.html b/pr/2737/docs/iroh/docs/net/enum.AcceptOutcome.html index 8b76571b3a..628944d466 100644 --- a/pr/2737/docs/iroh/docs/net/enum.AcceptOutcome.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/net/enum.ConnectError.html b/pr/2737/docs/iroh/docs/net/enum.ConnectError.html index 659c06626b..3566a94f40 100644 --- a/pr/2737/docs/iroh/docs/net/enum.ConnectError.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/net/fn.connect_and_sync.html b/pr/2737/docs/iroh/docs/net/fn.connect_and_sync.html index 056a141bd7..2773a3154e 100644 --- a/pr/2737/docs/iroh/docs/net/fn.connect_and_sync.html +++ b/pr/2737/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/2737/docs/iroh/docs/net/fn.handle_connection.html b/pr/2737/docs/iroh/docs/net/fn.handle_connection.html
index 5caf4fd365..3909b550c4 100644
--- a/pr/2737/docs/iroh/docs/net/fn.handle_connection.html
+++ b/pr/2737/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/2737/docs/iroh/docs/net/index.html b/pr/2737/docs/iroh/docs/net/index.html
index 6fe643483b..90efc3ef53 100644
--- a/pr/2737/docs/iroh/docs/net/index.html
+++ b/pr/2737/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/2737/docs/iroh/docs/net/struct.SyncFinished.html b/pr/2737/docs/iroh/docs/net/struct.SyncFinished.html index 0ce91998a7..8eb07db717 100644 --- a/pr/2737/docs/iroh/docs/net/struct.SyncFinished.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/net/struct.Timings.html b/pr/2737/docs/iroh/docs/net/struct.Timings.html index 2d76a4fad3..8206bebd22 100644 --- a/pr/2737/docs/iroh/docs/net/struct.Timings.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/enum.AuthorFilter.html b/pr/2737/docs/iroh/docs/store/enum.AuthorFilter.html index bbddcad86e..4e2f2c409d 100644 --- a/pr/2737/docs/iroh/docs/store/enum.AuthorFilter.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/enum.DownloadPolicy.html b/pr/2737/docs/iroh/docs/store/enum.DownloadPolicy.html index 64b58eb81c..886a620e69 100644 --- a/pr/2737/docs/iroh/docs/store/enum.DownloadPolicy.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/enum.FilterKind.html b/pr/2737/docs/iroh/docs/store/enum.FilterKind.html index ae3080a040..2b072b9904 100644 --- a/pr/2737/docs/iroh/docs/store/enum.FilterKind.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/enum.ImportNamespaceOutcome.html b/pr/2737/docs/iroh/docs/store/enum.ImportNamespaceOutcome.html index adcdbbb7e8..c3484eeb5f 100644 --- a/pr/2737/docs/iroh/docs/store/enum.ImportNamespaceOutcome.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/enum.KeyFilter.html b/pr/2737/docs/iroh/docs/store/enum.KeyFilter.html index 391debaabc..40d41e7b3f 100644 --- a/pr/2737/docs/iroh/docs/store/enum.KeyFilter.html +++ b/pr/2737/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§

§

impl !Freeze for KeyFilter

§

impl RefUnwindSafe for KeyFilter

§

impl Send for KeyFilter

§

impl Sync for KeyFilter

§

impl Unpin for KeyFilter

§

impl UnwindSafe for KeyFilter

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§

§

impl !Freeze for KeyFilter

§

impl RefUnwindSafe for KeyFilter

§

impl Send for KeyFilter

§

impl Sync for KeyFilter

§

impl Unpin for KeyFilter

§

impl UnwindSafe for KeyFilter

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/enum.OpenError.html b/pr/2737/docs/iroh/docs/store/enum.OpenError.html index 38287444e8..8a11b8ca47 100644 --- a/pr/2737/docs/iroh/docs/store/enum.OpenError.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/enum.SortBy.html b/pr/2737/docs/iroh/docs/store/enum.SortBy.html index bd566c7aed..fd5b353c22 100644 --- a/pr/2737/docs/iroh/docs/store/enum.SortBy.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/enum.SortDirection.html b/pr/2737/docs/iroh/docs/store/enum.SortDirection.html index d16407739b..a3f0543871 100644 --- a/pr/2737/docs/iroh/docs/store/enum.SortDirection.html +++ b/pr/2737/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§

§

impl Freeze for SortDirection

§

impl RefUnwindSafe for SortDirection

§

impl Send for SortDirection

§

impl Sync for SortDirection

§

impl Unpin for SortDirection

§

impl UnwindSafe for SortDirection

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§

§

impl Freeze for SortDirection

§

impl RefUnwindSafe for SortDirection

§

impl Send for SortDirection

§

impl Sync for SortDirection

§

impl Unpin for SortDirection

§

impl UnwindSafe for SortDirection

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/fs/index.html b/pr/2737/docs/iroh/docs/store/fs/index.html index 2ee6a9bb55..077e6be0f1 100644 --- a/pr/2737/docs/iroh/docs/store/fs/index.html +++ b/pr/2737/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/2737/docs/iroh/docs/store/fs/struct.ContentHashesIterator.html b/pr/2737/docs/iroh/docs/store/fs/struct.ContentHashesIterator.html index 32c82dee16..ee7b94c558 100644 --- a/pr/2737/docs/iroh/docs/store/fs/struct.ContentHashesIterator.html +++ b/pr/2737/docs/iroh/docs/store/fs/struct.ContentHashesIterator.html @@ -1,12 +1,12 @@ -ContentHashesIterator in iroh::docs::store::fs - Rust

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

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

Iterator for all content hashes

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

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

pub struct ContentHashesIterator { /* private fields */ }
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.

-

Implementations§

source§

impl ContentHashesIterator

source

pub fn all( +

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/2737/docs/iroh/docs/store/fs/struct.LatestIterator.html b/pr/2737/docs/iroh/docs/store/fs/struct.LatestIterator.html index 7a439770b7..8b02c7a75a 100644 --- a/pr/2737/docs/iroh/docs/store/fs/struct.LatestIterator.html +++ b/pr/2737/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>(/* private fields */);
Expand description

Iterator over the latest entry per author.

-

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>(/* private fields */);
Expand description

Iterator over the latest entry per author.

+

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/2737/docs/iroh/docs/store/fs/struct.ParentIterator.html b/pr/2737/docs/iroh/docs/store/fs/struct.ParentIterator.html index 51eecced20..52169b44b0 100644 --- a/pr/2737/docs/iroh/docs/store/fs/struct.ParentIterator.html +++ b/pr/2737/docs/iroh/docs/store/fs/struct.ParentIterator.html @@ -1,6 +1,6 @@ -ParentIterator in iroh::docs::store::fs - Rust

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

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

Iterator over parent entries, i.e. entries with the same namespace and author, and a key which +ParentIterator in iroh::docs::store::fs - Rust

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

pub struct ParentIterator { /* private fields */ }
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.

-

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>( +

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/2737/docs/iroh/docs/store/fs/struct.RecordsRange.html b/pr/2737/docs/iroh/docs/store/fs/struct.RecordsRange.html index e08deeeac6..2d2ee3cd40 100644 --- a/pr/2737/docs/iroh/docs/store/fs/struct.RecordsRange.html +++ b/pr/2737/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>(/* private fields */);
Expand description

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

-

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>(/* private fields */);
Expand description

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

+

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/2737/docs/iroh/docs/store/fs/struct.Store.html b/pr/2737/docs/iroh/docs/store/fs/struct.Store.html index e246735c18..8a514ac561 100644 --- a/pr/2737/docs/iroh/docs/store/fs/struct.Store.html +++ b/pr/2737/docs/iroh/docs/store/fs/struct.Store.html @@ -1,102 +1,102 @@ -Store in iroh::docs::store::fs - Rust

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

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

Manages the replicas and authors for an instance.

-

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.

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

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

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

Manages the replicas and authors for an instance.

+

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( +

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/fs/struct.StoreInstance.html b/pr/2737/docs/iroh/docs/store/fs/struct.StoreInstance.html index 20e5d7b2e4..b3f4c42c6f 100644 --- a/pr/2737/docs/iroh/docs/store/fs/struct.StoreInstance.html +++ b/pr/2737/docs/iroh/docs/store/fs/struct.StoreInstance.html @@ -1,11 +1,11 @@ -StoreInstance in iroh::docs::store::fs - Rust

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

source ·
pub struct StoreInstance<'a> { /* private fields */ }
Expand description

A wrapper around Store for a specific NamespaceId

-

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>

source§

fn get_download_policy( +StoreInstance in iroh::docs::store::fs - Rust

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

pub struct StoreInstance<'a> { /* private fields */ }
Expand description

A wrapper around Store for a specific NamespaceId

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/index.html b/pr/2737/docs/iroh/docs/store/index.html index c88c65a575..148f4fba5c 100644 --- a/pr/2737/docs/iroh/docs/store/index.html +++ b/pr/2737/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/2737/docs/iroh/docs/store/struct.FlatQuery.html b/pr/2737/docs/iroh/docs/store/struct.FlatQuery.html index 13f393378d..a1fe77f117 100644 --- a/pr/2737/docs/iroh/docs/store/struct.FlatQuery.html +++ b/pr/2737/docs/iroh/docs/store/struct.FlatQuery.html @@ -1,8 +1,8 @@ -FlatQuery in iroh::docs::store - Rust

Struct iroh::docs::store::FlatQuery

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

Query on all entries without aggregation.

-

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

source§

fn deserialize<__D>( +FlatQuery in iroh::docs::store - Rust

Struct iroh::docs::store::FlatQuery

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

Query on all entries without aggregation.

+

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/2737/docs/iroh/docs/store/struct.MemPublicKeyStore.html b/pr/2737/docs/iroh/docs/store/struct.MemPublicKeyStore.html index 08697f45c0..18f9e3f994 100644 --- a/pr/2737/docs/iroh/docs/store/struct.MemPublicKeyStore.html +++ b/pr/2737/docs/iroh/docs/store/struct.MemPublicKeyStore.html @@ -1,8 +1,8 @@ -MemPublicKeyStore in iroh::docs::store - Rust

Struct iroh::docs::store::MemPublicKeyStore

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

In-memory key storage

-

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( +MemPublicKeyStore in iroh::docs::store - Rust

Struct iroh::docs::store::MemPublicKeyStore

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

In-memory key storage

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/struct.Query.html b/pr/2737/docs/iroh/docs/store/struct.Query.html index f942cf823c..6ddaf1f381 100644 --- a/pr/2737/docs/iroh/docs/store/struct.Query.html +++ b/pr/2737/docs/iroh/docs/store/struct.Query.html @@ -1,17 +1,17 @@ -Query in iroh::docs::store - Rust

Struct iroh::docs::store::Query

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

Note: When using the SingleLatestPerKey query kind, the key filter is applied before the +Query in iroh::docs::store - Rust

Struct iroh::docs::store::Query

pub struct Query { /* private fields */ }
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.

-

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 +

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/2737/docs/iroh/docs/store/struct.QueryBuilder.html b/pr/2737/docs/iroh/docs/store/struct.QueryBuilder.html index 5cd7c5c683..4c73ca3bbb 100644 --- a/pr/2737/docs/iroh/docs/store/struct.QueryBuilder.html +++ b/pr/2737/docs/iroh/docs/store/struct.QueryBuilder.html @@ -1,27 +1,27 @@ -QueryBuilder in iroh::docs::store - Rust

Struct iroh::docs::store::QueryBuilder

source ·
pub struct QueryBuilder<K> { /* private fields */ }
Expand description

A query builder for document queries.

-

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( +QueryBuilder in iroh::docs::store - Rust

Struct iroh::docs::store::QueryBuilder

pub struct QueryBuilder<K> { /* private fields */ }
Expand description

A query builder for document queries.

+

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/2737/docs/iroh/docs/store/struct.SingleLatestPerKeyQuery.html b/pr/2737/docs/iroh/docs/store/struct.SingleLatestPerKeyQuery.html index 1100e01de0..7490ebdd0e 100644 --- a/pr/2737/docs/iroh/docs/store/struct.SingleLatestPerKeyQuery.html +++ b/pr/2737/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/2737/docs/iroh/docs/store/struct.Store.html b/pr/2737/docs/iroh/docs/store/struct.Store.html index 02d53a8ae6..01b3c68d0c 100644 --- a/pr/2737/docs/iroh/docs/store/struct.Store.html +++ b/pr/2737/docs/iroh/docs/store/struct.Store.html @@ -1,102 +1,102 @@ -Store in iroh::docs::store - Rust

Struct iroh::docs::store::Store

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

Manages the replicas and authors for an instance.

-

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.

+Store in iroh::docs::store - Rust

Struct iroh::docs::store::Store

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

Manages the replicas and authors for an instance.

+

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( +

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/store/trait.DownloadPolicyStore.html b/pr/2737/docs/iroh/docs/store/trait.DownloadPolicyStore.html index f35bfd8971..7fe0110845 100644 --- a/pr/2737/docs/iroh/docs/store/trait.DownloadPolicyStore.html +++ b/pr/2737/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§

source§

impl DownloadPolicyStore for Store

source§

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

\ No newline at end of file +) -> Result<DownloadPolicy, Error>

Implementors§

\ No newline at end of file diff --git a/pr/2737/docs/iroh/docs/store/trait.PublicKeyStore.html b/pr/2737/docs/iroh/docs/store/trait.PublicKeyStore.html index 12f53e7753..479b19c5c0 100644 --- a/pr/2737/docs/iroh/docs/store/trait.PublicKeyStore.html +++ b/pr/2737/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/2737/docs/iroh/docs/struct.Author.html b/pr/2737/docs/iroh/docs/struct.Author.html index 4c139d8e05..f7d58ae359 100644 --- a/pr/2737/docs/iroh/docs/struct.Author.html +++ b/pr/2737/docs/iroh/docs/struct.Author.html @@ -1,17 +1,17 @@ -Author in iroh::docs - Rust

Struct iroh::docs::Author

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

Author key to insert entries in a crate::Replica

+Author in iroh::docs - Rust

Struct iroh::docs::Author

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

Author key to insert entries in a crate::Replica

Internally, an author is a [SigningKey] which is used to sign entries.

-

Implementations§

source§

impl Author

source

pub fn new<R>(rng: &mut R) -> Author
where +

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/2737/docs/iroh/docs/struct.AuthorHeads.html b/pr/2737/docs/iroh/docs/struct.AuthorHeads.html index 67f06de57d..371d7484b3 100644 --- a/pr/2737/docs/iroh/docs/struct.AuthorHeads.html +++ b/pr/2737/docs/iroh/docs/struct.AuthorHeads.html @@ -1,20 +1,20 @@ -AuthorHeads in iroh::docs - Rust

Struct iroh::docs::AuthorHeads

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

Timestamps of the latest entry for each author.

-

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.

+AuthorHeads in iroh::docs - Rust

Struct iroh::docs::AuthorHeads

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

Timestamps of the latest entry for each author.

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/struct.AuthorId.html b/pr/2737/docs/iroh/docs/struct.AuthorId.html index 4c90159030..357813c947 100644 --- a/pr/2737/docs/iroh/docs/struct.AuthorId.html +++ b/pr/2737/docs/iroh/docs/struct.AuthorId.html @@ -1,33 +1,33 @@ -AuthorId in iroh::docs - Rust

Struct iroh::docs::AuthorId

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

AuthorPublicKey in bytes

-

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(/* private fields */);
Expand description

AuthorPublicKey in bytes

+

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 @@ -155,7 +155,7 @@ letters are used (e.g. F9B4CA)

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/docs/struct.AuthorPublicKey.html b/pr/2737/docs/iroh/docs/struct.AuthorPublicKey.html index f16af8c404..4b888a487a 100644 --- a/pr/2737/docs/iroh/docs/struct.AuthorPublicKey.html +++ b/pr/2737/docs/iroh/docs/struct.AuthorPublicKey.html @@ -1,35 +1,35 @@ -AuthorPublicKey in iroh::docs - Rust

Struct iroh::docs::AuthorPublicKey

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

Identifier for an Author

+AuthorPublicKey in iroh::docs - Rust

Struct iroh::docs::AuthorPublicKey

pub struct AuthorPublicKey(/* private fields */);
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.

-

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 +

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

§

fn implicit( @@ -147,7 +147,7 @@ builds.

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/docs/struct.DocTicket.html b/pr/2737/docs/iroh/docs/struct.DocTicket.html index e3e1ee1ee1..051cbbc616 100644 --- a/pr/2737/docs/iroh/docs/struct.DocTicket.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/struct.Entry.html b/pr/2737/docs/iroh/docs/struct.Entry.html index 05ff8c58a4..2e79edef9b 100644 --- a/pr/2737/docs/iroh/docs/struct.Entry.html +++ b/pr/2737/docs/iroh/docs/struct.Entry.html @@ -1,37 +1,37 @@ -Entry in iroh::docs - Rust

Struct iroh::docs::Entry

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

A single entry in a Replica

+Entry in iroh::docs - Rust

Struct iroh::docs::Entry

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

A single entry in a Replica

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

-

Implementations§

source§

impl Entry

source

pub fn new(id: RecordIdentifier, record: Record) -> 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

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/struct.EntrySignature.html b/pr/2737/docs/iroh/docs/struct.EntrySignature.html index ac8f532d6e..5ce12e68d6 100644 --- a/pr/2737/docs/iroh/docs/struct.EntrySignature.html +++ b/pr/2737/docs/iroh/docs/struct.EntrySignature.html @@ -1,26 +1,26 @@ -EntrySignature in iroh::docs - Rust

Struct iroh::docs::EntrySignature

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

Signature over an entry.

-

Implementations§

source§

impl EntrySignature

source

pub fn from_entry( +EntrySignature in iroh::docs - Rust

Struct iroh::docs::EntrySignature

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

Signature over an entry.

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/struct.NamespaceId.html b/pr/2737/docs/iroh/docs/struct.NamespaceId.html index 0b10466d09..a20c0d6a5c 100644 --- a/pr/2737/docs/iroh/docs/struct.NamespaceId.html +++ b/pr/2737/docs/iroh/docs/struct.NamespaceId.html @@ -1,33 +1,33 @@ -NamespaceId in iroh::docs - Rust

Struct iroh::docs::NamespaceId

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

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(/* private fields */);
Expand description

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 @@ -155,7 +155,7 @@ letters are used (e.g. F9B4CA)

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/docs/struct.NamespacePublicKey.html b/pr/2737/docs/iroh/docs/struct.NamespacePublicKey.html index cf82851257..b47211a929 100644 --- a/pr/2737/docs/iroh/docs/struct.NamespacePublicKey.html +++ b/pr/2737/docs/iroh/docs/struct.NamespacePublicKey.html @@ -1,34 +1,34 @@ -NamespacePublicKey in iroh::docs - Rust

Struct iroh::docs::NamespacePublicKey

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

The corresponding [VerifyingKey] for a NamespaceSecret. +NamespacePublicKey in iroh::docs - Rust

Struct iroh::docs::NamespacePublicKey

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

The corresponding [VerifyingKey] for a NamespaceSecret. It is used as an identifier, and can be used to verify Signatures.

-

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 +

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

§

fn implicit( @@ -146,7 +146,7 @@ builds.

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/docs/struct.NamespaceSecret.html b/pr/2737/docs/iroh/docs/struct.NamespaceSecret.html index 296d07ca96..a4d8c9adcf 100644 --- a/pr/2737/docs/iroh/docs/struct.NamespaceSecret.html +++ b/pr/2737/docs/iroh/docs/struct.NamespaceSecret.html @@ -1,20 +1,20 @@ -NamespaceSecret in iroh::docs - Rust

Struct iroh::docs::NamespaceSecret

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

Namespace key of a crate::Replica.

+NamespaceSecret in iroh::docs - Rust

Struct iroh::docs::NamespaceSecret

pub struct NamespaceSecret { /* private fields */ }
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.

-

Implementations§

source§

impl NamespaceSecret

source

pub fn new<R>(rng: &mut R) -> NamespaceSecret
where +

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/2737/docs/iroh/docs/struct.ReadOnly.html b/pr/2737/docs/iroh/docs/struct.ReadOnly.html index f241b6e29a..a2dca64c19 100644 --- a/pr/2737/docs/iroh/docs/struct.ReadOnly.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/struct.Record.html b/pr/2737/docs/iroh/docs/struct.Record.html index 07ff58f0c1..93c6298270 100644 --- a/pr/2737/docs/iroh/docs/struct.Record.html +++ b/pr/2737/docs/iroh/docs/struct.Record.html @@ -1,29 +1,29 @@ -Record in iroh::docs - Rust

Struct iroh::docs::Record

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

The data part of an entry in a Replica.

-

Implementations§

source§

impl Record

source

pub fn new(hash: Hash, len: u64, timestamp: u64) -> 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

source§

fn deserialize<__D>( +Record in iroh::docs - Rust

Struct iroh::docs::Record

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

The data part of an entry in a Replica.

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/struct.RecordIdentifier.html b/pr/2737/docs/iroh/docs/struct.RecordIdentifier.html index 7f7995cd74..002ce5a6d4 100644 --- a/pr/2737/docs/iroh/docs/struct.RecordIdentifier.html +++ b/pr/2737/docs/iroh/docs/struct.RecordIdentifier.html @@ -1,31 +1,31 @@ -RecordIdentifier in iroh::docs - Rust

Struct iroh::docs::RecordIdentifier

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

The identifier of a record.

-

Implementations§

source§

impl RecordIdentifier

source

pub fn new( +RecordIdentifier in iroh::docs - Rust

Struct iroh::docs::RecordIdentifier

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

The identifier of a record.

+

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/2737/docs/iroh/docs/struct.Replica.html b/pr/2737/docs/iroh/docs/struct.Replica.html index c0e741924a..705416fa7b 100644 --- a/pr/2737/docs/iroh/docs/struct.Replica.html +++ b/pr/2737/docs/iroh/docs/struct.Replica.html @@ -1,7 +1,7 @@ -Replica in iroh::docs - Rust

Struct iroh::docs::Replica

source ·
pub struct Replica<'a, I = Box<ReplicaInfo>> { /* private fields */ }
Expand description

Local representation of a mutable, synchronizable key-value store.

-

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( +Replica in iroh::docs - Rust

Struct iroh::docs::Replica

pub struct Replica<'a, I = Box<ReplicaInfo>> { /* private fields */ }
Expand description

Local representation of a mutable, synchronizable key-value store.

+

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, @@ -12,7 +12,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 @@ -20,7 +20,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], @@ -30,7 +30,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, @@ -38,25 +38,25 @@ 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>, from_peer: [u8; 32], state: &mut SyncOutcome ) -> 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 - 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 +

Trait Implementations§

§

impl<'a, I> Debug 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/2737/docs/iroh/docs/struct.ReplicaInfo.html b/pr/2737/docs/iroh/docs/struct.ReplicaInfo.html index a4e087ea0e..c156144b77 100644 --- a/pr/2737/docs/iroh/docs/struct.ReplicaInfo.html +++ b/pr/2737/docs/iroh/docs/struct.ReplicaInfo.html @@ -1,32 +1,32 @@ -ReplicaInfo in iroh::docs - Rust

Struct iroh::docs::ReplicaInfo

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

In memory information about an open replica.

-

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.

+ReplicaInfo in iroh::docs - Rust

Struct iroh::docs::ReplicaInfo

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

In memory information about an open replica.

+

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 [async_channel::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

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 +

Trait Implementations§

§

impl Debug for ReplicaInfo

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/struct.SignedEntry.html b/pr/2737/docs/iroh/docs/struct.SignedEntry.html index b82ffcef62..c572350046 100644 --- a/pr/2737/docs/iroh/docs/struct.SignedEntry.html +++ b/pr/2737/docs/iroh/docs/struct.SignedEntry.html @@ -1,52 +1,52 @@ -SignedEntry in iroh::docs - Rust

Struct iroh::docs::SignedEntry

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

A signed entry.

-

Implementations§

source§

impl SignedEntry

source

pub fn from_entry( +SignedEntry in iroh::docs - Rust

Struct iroh::docs::SignedEntry

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

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/struct.SyncOutcome.html b/pr/2737/docs/iroh/docs/struct.SyncOutcome.html index 35b20652a1..ad0e8904bc 100644 --- a/pr/2737/docs/iroh/docs/struct.SyncOutcome.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html b/pr/2737/docs/iroh/docs/sync/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html index f747e66f1d..a34c79c8a4 100644 --- a/pr/2737/docs/iroh/docs/sync/constant.MAX_TIMESTAMP_FUTURE_SHIFT.html +++ b/pr/2737/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/2737/docs/iroh/docs/sync/enum.Capability.html b/pr/2737/docs/iroh/docs/sync/enum.Capability.html index adc56db16e..dd6a473623 100644 --- a/pr/2737/docs/iroh/docs/sync/enum.Capability.html +++ b/pr/2737/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/2737/docs/iroh/docs/sync/enum.CapabilityError.html b/pr/2737/docs/iroh/docs/sync/enum.CapabilityError.html index 3cd3cd0021..14cec9a572 100644 --- a/pr/2737/docs/iroh/docs/sync/enum.CapabilityError.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/enum.CapabilityKind.html b/pr/2737/docs/iroh/docs/sync/enum.CapabilityKind.html index 624102bcf1..420d66f9d3 100644 --- a/pr/2737/docs/iroh/docs/sync/enum.CapabilityKind.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/enum.ContentStatus.html b/pr/2737/docs/iroh/docs/sync/enum.ContentStatus.html index 3b4b94e548..f091f09c97 100644 --- a/pr/2737/docs/iroh/docs/sync/enum.ContentStatus.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/enum.Event.html b/pr/2737/docs/iroh/docs/sync/enum.Event.html index c5c91d699e..92d553f120 100644 --- a/pr/2737/docs/iroh/docs/sync/enum.Event.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/enum.InsertError.html b/pr/2737/docs/iroh/docs/sync/enum.InsertError.html index e590b23e84..d452e23eaa 100644 --- a/pr/2737/docs/iroh/docs/sync/enum.InsertError.html +++ b/pr/2737/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,7 +12,7 @@
 
§

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

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

Trait Implementations§

§

impl Debug for InsertError

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/enum.InsertOrigin.html b/pr/2737/docs/iroh/docs/sync/enum.InsertOrigin.html index bc8b57e9ad..fbd52743b6 100644 --- a/pr/2737/docs/iroh/docs/sync/enum.InsertOrigin.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/enum.ValidationFailure.html b/pr/2737/docs/iroh/docs/sync/enum.ValidationFailure.html index 6cffb3388e..d963759c03 100644 --- a/pr/2737/docs/iroh/docs/sync/enum.ValidationFailure.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/index.html b/pr/2737/docs/iroh/docs/sync/index.html index 518535a2c5..431cd640a3 100644 --- a/pr/2737/docs/iroh/docs/sync/index.html +++ b/pr/2737/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/2737/docs/iroh/docs/sync/struct.AuthorHeads.html b/pr/2737/docs/iroh/docs/sync/struct.AuthorHeads.html index dc1450837d..692ead3cca 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.AuthorHeads.html +++ b/pr/2737/docs/iroh/docs/sync/struct.AuthorHeads.html @@ -1,20 +1,20 @@ -AuthorHeads in iroh::docs::sync - Rust

Struct iroh::docs::sync::AuthorHeads

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

Timestamps of the latest entry for each author.

-

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.

+AuthorHeads in iroh::docs::sync - Rust

Struct iroh::docs::sync::AuthorHeads

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

Timestamps of the latest entry for each author.

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/struct.Entry.html b/pr/2737/docs/iroh/docs/sync/struct.Entry.html index 9b4ce5938f..1a976d8978 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.Entry.html +++ b/pr/2737/docs/iroh/docs/sync/struct.Entry.html @@ -1,37 +1,37 @@ -Entry in iroh::docs::sync - Rust

Struct iroh::docs::sync::Entry

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

A single entry in a Replica

+Entry in iroh::docs::sync - Rust

Struct iroh::docs::sync::Entry

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

A single entry in a Replica

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

-

Implementations§

source§

impl Entry

source

pub fn new(id: RecordIdentifier, record: Record) -> 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

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/struct.EntrySignature.html b/pr/2737/docs/iroh/docs/sync/struct.EntrySignature.html index a18247d02a..fa46b38e8f 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.EntrySignature.html +++ b/pr/2737/docs/iroh/docs/sync/struct.EntrySignature.html @@ -1,26 +1,26 @@ -EntrySignature in iroh::docs::sync - Rust

Struct iroh::docs::sync::EntrySignature

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

Signature over an entry.

-

Implementations§

source§

impl EntrySignature

source

pub fn from_entry( +EntrySignature in iroh::docs::sync - Rust

Struct iroh::docs::sync::EntrySignature

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

Signature over an entry.

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/struct.ReadOnly.html b/pr/2737/docs/iroh/docs/sync/struct.ReadOnly.html index 5a9bc4e5de..5f548c5688 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.ReadOnly.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/struct.Record.html b/pr/2737/docs/iroh/docs/sync/struct.Record.html index de053ebb85..5a3a807b85 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.Record.html +++ b/pr/2737/docs/iroh/docs/sync/struct.Record.html @@ -1,29 +1,29 @@ -Record in iroh::docs::sync - Rust

Struct iroh::docs::sync::Record

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

The data part of an entry in a Replica.

-

Implementations§

source§

impl Record

source

pub fn new(hash: Hash, len: u64, timestamp: u64) -> 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

source§

fn deserialize<__D>( +Record in iroh::docs::sync - Rust

Struct iroh::docs::sync::Record

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

The data part of an entry in a Replica.

+

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/struct.RecordIdentifier.html b/pr/2737/docs/iroh/docs/sync/struct.RecordIdentifier.html index 7f1e0349eb..e4159bba49 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.RecordIdentifier.html +++ b/pr/2737/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(/* private fields */);
Expand description

The identifier of a record.

-

Implementations§

source§

impl RecordIdentifier

source

pub fn new( +RecordIdentifier in iroh::docs::sync - Rust

Struct iroh::docs::sync::RecordIdentifier

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

The identifier of a record.

+

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/2737/docs/iroh/docs/sync/struct.Replica.html b/pr/2737/docs/iroh/docs/sync/struct.Replica.html index 5dd6a72efe..87dc160531 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.Replica.html +++ b/pr/2737/docs/iroh/docs/sync/struct.Replica.html @@ -1,7 +1,7 @@ -Replica in iroh::docs::sync - Rust

Struct iroh::docs::sync::Replica

source ·
pub struct Replica<'a, I = Box<ReplicaInfo>> { /* private fields */ }
Expand description

Local representation of a mutable, synchronizable key-value store.

-

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( +Replica in iroh::docs::sync - Rust

Struct iroh::docs::sync::Replica

pub struct Replica<'a, I = Box<ReplicaInfo>> { /* private fields */ }
Expand description

Local representation of a mutable, synchronizable key-value store.

+

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, @@ -12,7 +12,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 @@ -20,7 +20,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], @@ -30,7 +30,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, @@ -38,25 +38,25 @@ 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>, from_peer: [u8; 32], state: &mut SyncOutcome ) -> 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 - 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 +

Trait Implementations§

§

impl<'a, I> Debug 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/2737/docs/iroh/docs/sync/struct.ReplicaInfo.html b/pr/2737/docs/iroh/docs/sync/struct.ReplicaInfo.html index 8f8665a1ee..9e54821b22 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.ReplicaInfo.html +++ b/pr/2737/docs/iroh/docs/sync/struct.ReplicaInfo.html @@ -1,32 +1,32 @@ -ReplicaInfo in iroh::docs::sync - Rust

Struct iroh::docs::sync::ReplicaInfo

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

In memory information about an open replica.

-

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.

+ReplicaInfo in iroh::docs::sync - Rust

Struct iroh::docs::sync::ReplicaInfo

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

In memory information about an open replica.

+

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 [async_channel::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

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 +

Trait Implementations§

§

impl Debug for ReplicaInfo

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/struct.SignedEntry.html b/pr/2737/docs/iroh/docs/sync/struct.SignedEntry.html index ebef18c949..50bc0ff8b4 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.SignedEntry.html +++ b/pr/2737/docs/iroh/docs/sync/struct.SignedEntry.html @@ -1,52 +1,52 @@ -SignedEntry in iroh::docs::sync - Rust

Struct iroh::docs::sync::SignedEntry

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

A signed entry.

-

Implementations§

source§

impl SignedEntry

source

pub fn from_entry( +SignedEntry in iroh::docs::sync - Rust

Struct iroh::docs::sync::SignedEntry

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

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/struct.SyncOutcome.html b/pr/2737/docs/iroh/docs/sync/struct.SyncOutcome.html index ae766652d2..964f71a50e 100644 --- a/pr/2737/docs/iroh/docs/sync/struct.SyncOutcome.html +++ b/pr/2737/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> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/2737/docs/iroh/docs/sync/type.ContentStatusCallback.html b/pr/2737/docs/iroh/docs/sync/type.ContentStatusCallback.html index 86f42326ca..310d4946a2 100644 --- a/pr/2737/docs/iroh/docs/sync/type.ContentStatusCallback.html +++ b/pr/2737/docs/iroh/docs/sync/type.ContentStatusCallback.html @@ -1,2 +1,2 @@ -ContentStatusCallback in iroh::docs::sync - Rust

Type Alias iroh::docs::sync::ContentStatusCallback

source ·
pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync>;
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 { /* private fields */ }
\ No newline at end of file diff --git a/pr/2737/docs/iroh/docs/sync/type.PeerIdBytes.html b/pr/2737/docs/iroh/docs/sync/type.PeerIdBytes.html index f64b71f30a..a6a7753060 100644 --- a/pr/2737/docs/iroh/docs/sync/type.PeerIdBytes.html +++ b/pr/2737/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/2737/docs/iroh/docs/sync/type.ProtocolMessage.html b/pr/2737/docs/iroh/docs/sync/type.ProtocolMessage.html index c9706f0a22..50656e64ad 100644 --- a/pr/2737/docs/iroh/docs/sync/type.ProtocolMessage.html +++ b/pr/2737/docs/iroh/docs/sync/type.ProtocolMessage.html @@ -1,3 +1,3 @@ -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 { /* private fields */ }
\ No newline at end of file diff --git a/pr/2737/docs/iroh/docs/type.ContentStatusCallback.html b/pr/2737/docs/iroh/docs/type.ContentStatusCallback.html index 9633b73328..2060f4c181 100644 --- a/pr/2737/docs/iroh/docs/type.ContentStatusCallback.html +++ b/pr/2737/docs/iroh/docs/type.ContentStatusCallback.html @@ -1,2 +1,2 @@ -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 { /* private fields */ }
\ No newline at end of file diff --git a/pr/2737/docs/iroh/docs/type.PeerIdBytes.html b/pr/2737/docs/iroh/docs/type.PeerIdBytes.html index bb8a332da2..23f7e8b195 100644 --- a/pr/2737/docs/iroh/docs/type.PeerIdBytes.html +++ b/pr/2737/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/2737/docs/iroh/docs/type.ProtocolMessage.html b/pr/2737/docs/iroh/docs/type.ProtocolMessage.html index 56565cfbab..6b49207346 100644 --- a/pr/2737/docs/iroh/docs/type.ProtocolMessage.html +++ b/pr/2737/docs/iroh/docs/type.ProtocolMessage.html @@ -1,3 +1,3 @@ -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 { /* private fields */ }
\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/index.html b/pr/2737/docs/iroh/gossip/index.html index 99497b1d57..1c9b23a83d 100644 --- a/pr/2737/docs/iroh/gossip/index.html +++ b/pr/2737/docs/iroh/gossip/index.html @@ -1,4 +1,4 @@ -iroh::gossip - Rust

Crate iroh::gossip

source ·
Expand description

Broadcast messages to peers subscribed to a topic

+iroh::gossip - Rust

Crate iroh::gossip

Expand description

Broadcast messages to peers subscribed to a topic

The crate is designed to be used from the iroh crate, which provides a high level interface, but can also be used standalone.

diff --git a/pr/2737/docs/iroh/gossip/metrics/index.html b/pr/2737/docs/iroh/gossip/metrics/index.html index cff2df319e..924c994396 100644 --- a/pr/2737/docs/iroh/gossip/metrics/index.html +++ b/pr/2737/docs/iroh/gossip/metrics/index.html @@ -1,2 +1,2 @@ -iroh::gossip::metrics - Rust

Module iroh::gossip::metrics

source ·
Expand description

Metrics for iroh-gossip

+iroh::gossip::metrics - Rust

Module iroh::gossip::metrics

Expand description

Metrics for iroh-gossip

Structs§

  • Enum of metrics for the module
\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/metrics/struct.Metrics.html b/pr/2737/docs/iroh/gossip/metrics/struct.Metrics.html index 886e9b86c5..1757511c56 100644 --- a/pr/2737/docs/iroh/gossip/metrics/struct.Metrics.html +++ b/pr/2737/docs/iroh/gossip/metrics/struct.Metrics.html @@ -1,4 +1,4 @@ -Metrics in iroh::gossip::metrics - Rust

Struct iroh::gossip::metrics::Metrics

source ·
pub struct Metrics {
Show 18 fields +Metrics in iroh::gossip::metrics - Rust

Struct iroh::gossip::metrics::Metrics

pub struct Metrics {
Show 18 fields pub msgs_ctrl_sent: Counter, pub msgs_ctrl_recv: Counter, pub msgs_data_sent: Counter, @@ -18,7 +18,7 @@ pub actor_tick_in_event_rx: Counter, pub actor_tick_timers: Counter,
}
Expand description

Enum of metrics for the module

-

Fields§

§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), 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§

§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter

Trait Implementations§

§

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/2737/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html b/pr/2737/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html index 0364475765..f296206fa0 100644 --- a/pr/2737/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html +++ b/pr/2737/docs/iroh/gossip/net/constant.GOSSIP_ALPN.html @@ -1,2 +1,2 @@ -GOSSIP_ALPN in iroh::gossip::net - Rust

Constant iroh::gossip::net::GOSSIP_ALPN

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

ALPN protocol name

+GOSSIP_ALPN in iroh::gossip::net - Rust

Constant iroh::gossip::net::GOSSIP_ALPN

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

ALPN protocol name

\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/net/enum.Command.html b/pr/2737/docs/iroh/gossip/net/enum.Command.html index edce984a0c..37bd624124 100644 --- a/pr/2737/docs/iroh/gossip/net/enum.Command.html +++ b/pr/2737/docs/iroh/gossip/net/enum.Command.html @@ -1,4 +1,4 @@ -Command in iroh::gossip::net - Rust

Enum iroh::gossip::net::Command

source ·
pub enum Command {
+Command in iroh::gossip::net - Rust

Enum iroh::gossip::net::Command

pub enum Command {
     Broadcast(Bytes),
     BroadcastNeighbors(Bytes),
     JoinPeers(Vec<PublicKey>),
@@ -6,10 +6,10 @@
 

Variants§

§

Broadcast(Bytes)

Broadcast a message to all nodes in the swarm

§

BroadcastNeighbors(Bytes)

Broadcast a message to all direct neighbors

§

JoinPeers(Vec<PublicKey>)

Connect to a set of peers

-

Trait Implementations§

source§

impl Debug for Command

source§

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

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

impl<'de> Deserialize<'de> for Command

Trait Implementations§

§

impl Debug for Command

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Command

§

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

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

impl Serialize for Command

source§

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

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

impl Serialize for Command

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2737/docs/iroh/gossip/net/enum.Event.html b/pr/2737/docs/iroh/gossip/net/enum.Event.html index 9c76aedb80..6b0cf7bc9d 100644 --- a/pr/2737/docs/iroh/gossip/net/enum.Event.html +++ b/pr/2737/docs/iroh/gossip/net/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::gossip::net - Rust

Enum iroh::gossip::net::Event

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

Enum iroh::gossip::net::Event

pub enum Event {
     Gossip(GossipEvent),
     Lagged,
 }
Expand description

Events emitted from a gossip topic with a lagging notification.

@@ -6,16 +6,16 @@ provide a notification if we missed gossip events for the topic.

Variants§

§

Gossip(GossipEvent)

We received an event.

§

Lagged

We missed some messages because our GossipReceiver was not progressing fast enough.

-

Trait Implementations§

source§

impl Debug for Event

source§

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

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

impl<'de> Deserialize<'de> for Event

Trait Implementations§

§

impl Debug for Event

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Event

§

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

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

impl PartialEq for Event

source§

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

§

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

source§

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

§

impl Serialize for Event

§

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 Event

source§

impl StructuralPartialEq for Event

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 + __S: Serializer,

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

impl Eq for Event

§

impl StructuralPartialEq for Event

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/net/enum.GossipEvent.html b/pr/2737/docs/iroh/gossip/net/enum.GossipEvent.html index eb9eee4178..bcf695d7f8 100644 --- a/pr/2737/docs/iroh/gossip/net/enum.GossipEvent.html +++ b/pr/2737/docs/iroh/gossip/net/enum.GossipEvent.html @@ -1,4 +1,4 @@ -GossipEvent in iroh::gossip::net - Rust

Enum iroh::gossip::net::GossipEvent

source ·
pub enum GossipEvent {
+GossipEvent in iroh::gossip::net - Rust

Enum iroh::gossip::net::GossipEvent

pub enum GossipEvent {
     Joined(Vec<PublicKey>),
     NeighborUp(PublicKey),
     NeighborDown(PublicKey),
@@ -10,21 +10,21 @@
 
§

NeighborUp(PublicKey)

We have a new, direct neighbor in the swarm membership layer for this topic.

§

NeighborDown(PublicKey)

We dropped direct neighbor in the swarm membership layer for this topic.

§

Received(Message)

We received a gossip message for this topic.

-

Trait Implementations§

source§

impl Clone for GossipEvent

source§

fn clone(&self) -> GossipEvent

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 GossipEvent

source§

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

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

impl<'de> Deserialize<'de> for GossipEvent

Trait Implementations§

§

impl Clone for GossipEvent

§

fn clone(&self) -> GossipEvent

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 GossipEvent

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for GossipEvent

§

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

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

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
source§

impl Ord for GossipEvent

source§

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

§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
§

impl Ord for GossipEvent

§

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

source§

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

§

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

source§

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

§

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

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for GossipEvent

§

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 GossipEvent

source§

impl StructuralPartialEq for GossipEvent

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 GossipEvent

§

impl StructuralPartialEq for GossipEvent

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/net/index.html b/pr/2737/docs/iroh/gossip/net/index.html index 130a9d3f22..05cfe2c744 100644 --- a/pr/2737/docs/iroh/gossip/net/index.html +++ b/pr/2737/docs/iroh/gossip/net/index.html @@ -1,2 +1,2 @@ -iroh::gossip::net - Rust

Module iroh::gossip::net

source ·
Expand description

Networking for the iroh-gossip protocol

+iroh::gossip::net - Rust

Module iroh::gossip::net

Expand description

Networking for the iroh-gossip protocol

Modules§

  • Utilities for iroh-gossip networking

Structs§

Enums§

  • Send a gossip message
  • Events emitted from a gossip topic with a lagging notification.
  • Events emitted from a gossip topic.

Constants§

Type Aliases§

\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/net/struct.Gossip.html b/pr/2737/docs/iroh/gossip/net/struct.Gossip.html index 83e074a92a..786df6a66b 100644 --- a/pr/2737/docs/iroh/gossip/net/struct.Gossip.html +++ b/pr/2737/docs/iroh/gossip/net/struct.Gossip.html @@ -1,4 +1,4 @@ -Gossip in iroh::gossip::net - Rust

Struct iroh::gossip::net::Gossip

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

Publish and subscribe on gossiping topics.

+Gossip in iroh::gossip::net - Rust

Struct iroh::gossip::net::Gossip

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

Publish and subscribe on gossiping topics.

Each topic is a separate broadcast tree with separate memberships.

A topic has to be joined before you can publish or subscribe on the topic. To join the swarm for a topic, you have to know the PublicKey of at least one peer that also joined the topic.

@@ -10,20 +10,20 @@ itself. You should run an accept loop on the GOSSIP_ALPN, forward the connection to the gossip actor through Self::handle_connection.

The gossip actor will, however, initiate new connections to other peers by itself.

-

Implementations§

source§

impl Gossip

Implementations§

§

impl Gossip

pub fn from_endpoint( endpoint: Endpoint, config: Config, my_addr: &AddrInfo ) -> Gossip

Spawn a gossip actor and get a handle for it

-
source

pub fn max_message_size(&self) -> usize

Get the maximum message size configured for this gossip actor.

-
source

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

Handle an incoming Connection.

+

pub fn max_message_size(&self) -> usize

Get the maximum message size configured for this gossip actor.

+

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

Handle an incoming Connection.

Make sure to check the ALPN protocol yourself before passing the connection.

-
source

pub async fn join( +

pub async fn join( &self, topic_id: TopicId, bootstrap: Vec<PublicKey> ) -> Result<GossipTopic, Error>

Join a gossip topic with the default options and wait for at least one active connection.

-
source

pub fn join_with_opts( +

pub fn join_with_opts( &self, topic_id: TopicId, opts: JoinOptions @@ -32,7 +32,7 @@ gossip actor through GossipTopic::joined.

Messages will be queued until a first connection is available. If the internal channel becomes full, the oldest messages will be dropped from the channel.

-

source

pub fn join_with_stream( +

pub fn join_with_stream( &self, topic_id: TopicId, options: JoinOptions, @@ -42,7 +42,7 @@ the oldest messages will be dropped from the channel.

instead of using a channel created for you.

It returns a stream of events. If you want to wait for the topic to become active, wait for the GossipEvent::Joined event.

-

Trait Implementations§

source§

impl Clone for Gossip

source§

fn clone(&self) -> Gossip

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 Gossip

source§

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

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

impl ProtocolHandler for Gossip

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§

§

impl Freeze for Gossip

§

impl !RefUnwindSafe for Gossip

§

impl Send for Gossip

§

impl Sync for Gossip

§

impl Unpin for Gossip

§

impl !UnwindSafe for Gossip

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Gossip

§

fn clone(&self) -> Gossip

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 Gossip

§

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

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

impl ProtocolHandler for Gossip

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§

§

impl Freeze for Gossip

§

impl !RefUnwindSafe for Gossip

§

impl Send for Gossip

§

impl Sync for Gossip

§

impl Unpin for Gossip

§

impl !UnwindSafe for Gossip

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/net/struct.GossipReceiver.html b/pr/2737/docs/iroh/gossip/net/struct.GossipReceiver.html index c170471e25..22118ae4cf 100644 --- a/pr/2737/docs/iroh/gossip/net/struct.GossipReceiver.html +++ b/pr/2737/docs/iroh/gossip/net/struct.GossipReceiver.html @@ -1,13 +1,13 @@ -GossipReceiver in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipReceiver

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

Receiver for gossip events on a topic.

+GossipReceiver in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipReceiver

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

Receiver for gossip events on a topic.

This is a [Stream] of Events emitted from the topic.

-

Implementations§

source§

impl GossipReceiver

source

pub fn neighbors(&self) -> impl Iterator<Item = PublicKey>

Lists our current direct neighbors.

-
source

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

Waits until we are connected to at least one node.

+

Implementations§

§

impl GossipReceiver

pub fn neighbors(&self) -> impl Iterator<Item = PublicKey>

Lists our current direct neighbors.

+

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

Waits until we are connected to at least one node.

This progresses the stream until we received GossipEvent::Joined, which is the first item emitted on the stream.

Note that this consumes the GossipEvent::Joined event. If you want to act on these initial neighbors, use Self::neighbors after awaiting Self::joined.

-
source

pub fn is_joined(&self) -> bool

Returns true if we are connected to at least one node.

-

Trait Implementations§

source§

impl Debug for GossipReceiver

source§

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

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

impl Stream for GossipReceiver

§

type Item = Result<Event, Error>

Values yielded by the stream.
source§

fn poll_next( +

pub fn is_joined(&self) -> bool

Returns true if we are connected to at least one node.

+

Trait Implementations§

§

impl Debug for GossipReceiver

§

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

Formats the value using the given formatter. Read more
§

impl Stream for GossipReceiver

§

type Item = Result<Event, Error>

Values yielded by the stream.
§

fn poll_next( self: Pin<&mut GossipReceiver>, cx: &mut Context<'_> ) -> Poll<Option<<GossipReceiver as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the diff --git a/pr/2737/docs/iroh/gossip/net/struct.GossipSender.html b/pr/2737/docs/iroh/gossip/net/struct.GossipSender.html index 80b01c446b..41190f7464 100644 --- a/pr/2737/docs/iroh/gossip/net/struct.GossipSender.html +++ b/pr/2737/docs/iroh/gossip/net/struct.GossipSender.html @@ -1,8 +1,8 @@ -GossipSender in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipSender

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

Sender for a gossip topic.

-

Implementations§

source§

impl GossipSender

source

pub async fn broadcast(&self, message: Bytes) -> Result<(), Error>

Broadcast a message to all nodes.

-
source

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<(), Error>

Broadcast a message to our direct neighbors.

-
source

pub async fn join_peers(&self, peers: Vec<PublicKey>) -> Result<(), Error>

Join a set of peers.

-

Trait Implementations§

source§

impl Debug for GossipSender

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 +GossipSender in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipSender

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

Sender for a gossip topic.

+

Implementations§

§

impl GossipSender

pub async fn broadcast(&self, message: Bytes) -> Result<(), Error>

Broadcast a message to all nodes.

+

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<(), Error>

Broadcast a message to our direct neighbors.

+

pub async fn join_peers(&self, peers: Vec<PublicKey>) -> Result<(), Error>

Join a set of peers.

+

Trait Implementations§

§

impl Debug for GossipSender

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/net/struct.GossipTopic.html b/pr/2737/docs/iroh/gossip/net/struct.GossipTopic.html index de5b7dc755..704ab3d8f8 100644 --- a/pr/2737/docs/iroh/gossip/net/struct.GossipTopic.html +++ b/pr/2737/docs/iroh/gossip/net/struct.GossipTopic.html @@ -1,12 +1,12 @@ -GossipTopic in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipTopic

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

Subscribed gossip topic.

+GossipTopic in iroh::gossip::net - Rust

Struct iroh::gossip::net::GossipTopic

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

Subscribed gossip topic.

This handle is a [Stream] of Events from the topic, and can be used to send messages.

It may be split into sender and receiver parts with Self::split.

-

Implementations§

source§

impl GossipTopic

source

pub fn split(self) -> (GossipSender, GossipReceiver)

Splits self into GossipSender and GossipReceiver parts.

-
source

pub async fn broadcast(&self, message: Bytes) -> Result<(), Error>

Sends a message to all peers.

-
source

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<(), Error>

Sends a message to our direct neighbors in the swarm.

-
source

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

Waits until we are connected to at least one node.

-
source

pub fn is_joined(&self) -> bool

Returns true if we are connected to at least one node.

-

Trait Implementations§

source§

impl Debug for GossipTopic

source§

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

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

impl Stream for GossipTopic

§

type Item = Result<Event, Error>

Values yielded by the stream.
source§

fn poll_next( +

Implementations§

§

impl GossipTopic

pub fn split(self) -> (GossipSender, GossipReceiver)

Splits self into GossipSender and GossipReceiver parts.

+

pub async fn broadcast(&self, message: Bytes) -> Result<(), Error>

Sends a message to all peers.

+

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<(), Error>

Sends a message to our direct neighbors in the swarm.

+

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

Waits until we are connected to at least one node.

+

pub fn is_joined(&self) -> bool

Returns true if we are connected to at least one node.

+

Trait Implementations§

§

impl Debug for GossipTopic

§

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

Formats the value using the given formatter. Read more
§

impl Stream for GossipTopic

§

type Item = Result<Event, Error>

Values yielded by the stream.
§

fn poll_next( self: Pin<&mut GossipTopic>, cx: &mut Context<'_> ) -> Poll<Option<<GossipTopic as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the diff --git a/pr/2737/docs/iroh/gossip/net/struct.JoinOptions.html b/pr/2737/docs/iroh/gossip/net/struct.JoinOptions.html index c415dafc21..a9fe253c5b 100644 --- a/pr/2737/docs/iroh/gossip/net/struct.JoinOptions.html +++ b/pr/2737/docs/iroh/gossip/net/struct.JoinOptions.html @@ -1,4 +1,4 @@ -JoinOptions in iroh::gossip::net - Rust

Struct iroh::gossip::net::JoinOptions

source ·
pub struct JoinOptions {
+JoinOptions in iroh::gossip::net - Rust

Struct iroh::gossip::net::JoinOptions

pub struct JoinOptions {
     pub bootstrap: BTreeSet<PublicKey>,
     pub subscription_capacity: usize,
 }
Expand description

Options for joining a gossip topic.

@@ -8,12 +8,12 @@ the message will be dropped, and the subscriber will be closed.

This is to prevent a single slow subscriber from blocking the dispatch loop. If a subscriber is lagging, it should be closed and re-opened.

-

Implementations§

source§

impl JoinOptions

source

pub fn with_bootstrap(nodes: impl IntoIterator<Item = PublicKey>) -> JoinOptions

Creates JoinOptions with the provided bootstrap nodes and the default subscription +

Implementations§

§

impl JoinOptions

pub fn with_bootstrap(nodes: impl IntoIterator<Item = PublicKey>) -> JoinOptions

Creates JoinOptions with the provided bootstrap nodes and the default subscription capacity.

-

Trait Implementations§

source§

impl Debug for JoinOptions

source§

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

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

impl<'de> Deserialize<'de> for JoinOptions

Trait Implementations§

§

impl Debug for JoinOptions

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for JoinOptions

§

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

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

impl Serialize for JoinOptions

source§

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

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

impl Serialize for JoinOptions

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2737/docs/iroh/gossip/net/struct.Message.html b/pr/2737/docs/iroh/gossip/net/struct.Message.html index a763517979..84dfc8d5cb 100644 --- a/pr/2737/docs/iroh/gossip/net/struct.Message.html +++ b/pr/2737/docs/iroh/gossip/net/struct.Message.html @@ -1,4 +1,4 @@ -Message in iroh::gossip::net - Rust

Struct iroh::gossip::net::Message

source ·
pub struct Message {
+Message in iroh::gossip::net - Rust

Struct iroh::gossip::net::Message

pub struct Message {
     pub content: Bytes,
     pub scope: DeliveryScope,
     pub delivered_from: PublicKey,
@@ -7,21 +7,21 @@
 
§scope: DeliveryScope

The scope of the message. This tells us if the message is from a direct neighbor or actual gossip.

§delivered_from: PublicKey

The node that delivered the message. This is not the same as the original author.

-

Trait Implementations§

source§

impl Clone for Message

source§

fn clone(&self) -> Message

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 Message

source§

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

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

impl<'de> Deserialize<'de> for Message

Trait Implementations§

§

impl Clone for Message

§

fn clone(&self) -> Message

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 Message

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Message

§

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

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

impl Ord for Message

source§

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

§

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

source§

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

§

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

source§

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

§

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

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for Message

§

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 Message

source§

impl StructuralPartialEq for Message

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 Message

§

impl StructuralPartialEq for Message

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/net/type.CommandStream.html b/pr/2737/docs/iroh/gossip/net/type.CommandStream.html index c5ce7cdd07..14a68bafac 100644 --- a/pr/2737/docs/iroh/gossip/net/type.CommandStream.html +++ b/pr/2737/docs/iroh/gossip/net/type.CommandStream.html @@ -1,2 +1,2 @@ -CommandStream in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::CommandStream

source ·
pub type CommandStream = Pin<Box<dyn Stream<Item = Command> + Send + Sync>>;
Expand description

A stream of commands for a gossip subscription.

+CommandStream in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::CommandStream

pub type CommandStream = Pin<Box<dyn Stream<Item = Command> + Send + Sync>>;
Expand description

A stream of commands for a gossip subscription.

Aliased Type§

struct CommandStream { /* private fields */ }
\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/net/type.ProtoCommand.html b/pr/2737/docs/iroh/gossip/net/type.ProtoCommand.html index 33c2759f61..4932bf3033 100644 --- a/pr/2737/docs/iroh/gossip/net/type.ProtoCommand.html +++ b/pr/2737/docs/iroh/gossip/net/type.ProtoCommand.html @@ -1,4 +1,4 @@ -ProtoCommand in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::ProtoCommand

source ·
pub type ProtoCommand = Command<PublicKey>;
Expand description

Commands for the gossip protocol

+ProtoCommand in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::ProtoCommand

pub type ProtoCommand = Command<PublicKey>;
Expand description

Commands for the gossip protocol

Aliased Type§

enum ProtoCommand {
     Join(Vec<PublicKey>),
     Broadcast(Bytes, Scope),
diff --git a/pr/2737/docs/iroh/gossip/net/type.ProtoEvent.html b/pr/2737/docs/iroh/gossip/net/type.ProtoEvent.html
index fdcf4794fb..f1550f1637 100644
--- a/pr/2737/docs/iroh/gossip/net/type.ProtoEvent.html
+++ b/pr/2737/docs/iroh/gossip/net/type.ProtoEvent.html
@@ -1,4 +1,4 @@
-ProtoEvent in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::ProtoEvent

source ·
pub type ProtoEvent = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

+ProtoEvent in iroh::gossip::net - Rust

Type Alias iroh::gossip::net::ProtoEvent

pub type ProtoEvent = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

Aliased Type§

enum ProtoEvent {
     NeighborUp(PublicKey),
     NeighborDown(PublicKey),
diff --git a/pr/2737/docs/iroh/gossip/net/util/fn.read_lp.html b/pr/2737/docs/iroh/gossip/net/util/fn.read_lp.html
index 87a199f38d..88113f1434 100644
--- a/pr/2737/docs/iroh/gossip/net/util/fn.read_lp.html
+++ b/pr/2737/docs/iroh/gossip/net/util/fn.read_lp.html
@@ -1,4 +1,4 @@
-read_lp in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_lp

source ·
pub async fn read_lp(
+read_lp in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_lp

pub async fn read_lp(
     reader: impl AsyncRead + Unpin,
     buffer: &mut BytesMut,
     max_message_size: usize
diff --git a/pr/2737/docs/iroh/gossip/net/util/fn.read_message.html b/pr/2737/docs/iroh/gossip/net/util/fn.read_message.html
index c3588938e7..81b79f2e21 100644
--- a/pr/2737/docs/iroh/gossip/net/util/fn.read_message.html
+++ b/pr/2737/docs/iroh/gossip/net/util/fn.read_message.html
@@ -1,4 +1,4 @@
-read_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_message

source ·
pub async fn read_message(
+read_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::read_message

pub async fn read_message(
     reader: impl AsyncRead + Unpin,
     buffer: &mut BytesMut,
     max_message_size: usize
diff --git a/pr/2737/docs/iroh/gossip/net/util/fn.write_message.html b/pr/2737/docs/iroh/gossip/net/util/fn.write_message.html
index e22f59915c..dcd97aea2f 100644
--- a/pr/2737/docs/iroh/gossip/net/util/fn.write_message.html
+++ b/pr/2737/docs/iroh/gossip/net/util/fn.write_message.html
@@ -1,4 +1,4 @@
-write_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::write_message

source ·
pub async fn write_message<W>(
+write_message in iroh::gossip::net::util - Rust

Function iroh::gossip::net::util::write_message

pub async fn write_message<W>(
     writer: &mut W,
     buffer: &mut BytesMut,
     frame: &Message<PublicKey>,
diff --git a/pr/2737/docs/iroh/gossip/net/util/index.html b/pr/2737/docs/iroh/gossip/net/util/index.html
index 8c89657f63..3674386b71 100644
--- a/pr/2737/docs/iroh/gossip/net/util/index.html
+++ b/pr/2737/docs/iroh/gossip/net/util/index.html
@@ -1,2 +1,2 @@
-iroh::gossip::net::util - Rust

Module iroh::gossip::net::util

source ·
Expand description

Utilities for iroh-gossip networking

+iroh::gossip::net::util - Rust

Module iroh::gossip::net::util

Expand description

Utilities for iroh-gossip networking

Structs§

  • A TimerMap with an async method to wait for the next timer expiration.

Functions§

  • Reads a length prefixed message.
  • Read a length-prefixed message and decode as ProtoMessage;
  • Write a ProtoMessage as a length-prefixed, postcard-encoded message.
\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/net/util/struct.Timers.html b/pr/2737/docs/iroh/gossip/net/util/struct.Timers.html index da33a6979d..319c23c230 100644 --- a/pr/2737/docs/iroh/gossip/net/util/struct.Timers.html +++ b/pr/2737/docs/iroh/gossip/net/util/struct.Timers.html @@ -1,13 +1,13 @@ -Timers in iroh::gossip::net::util - Rust

Struct iroh::gossip::net::util::Timers

source ·
pub struct Timers<T> { /* private fields */ }
Expand description

A TimerMap with an async method to wait for the next timer expiration.

-

Implementations§

source§

impl<T> Timers<T>

source

pub fn new() -> Timers<T>

Create a new timer map

-
source

pub fn insert(&mut self, instant: Instant, item: T)

Insert a new entry at the specified instant

-
source

pub async fn wait_and_drain(&mut self) -> impl Iterator<Item = (Instant, T)>

Wait for the next timer to expire and return an iterator of all expired timers

+Timers in iroh::gossip::net::util - Rust

Struct iroh::gossip::net::util::Timers

pub struct Timers<T> { /* private fields */ }
Expand description

A TimerMap with an async method to wait for the next timer expiration.

+

Implementations§

§

impl<T> Timers<T>

pub fn new() -> Timers<T>

Create a new timer map

+

pub fn insert(&mut self, instant: Instant, item: T)

Insert a new entry at the specified instant

+

pub async fn wait_and_drain(&mut self) -> impl Iterator<Item = (Instant, T)>

Wait for the next timer to expire and return an iterator of all expired timers

If the TimerMap is empty, this will return a future that is pending forever. After inserting a new entry, prior futures returned from this method will not become ready. They should be dropped after calling Self::insert, and a new future as returned from this method should be awaited instead.

-

Trait Implementations§

source§

impl<T> Debug for Timers<T>
where - T: Debug,

source§

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

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

impl<T> Default for Timers<T>

source§

fn default() -> Timers<T>

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

Auto Trait Implementations§

§

impl<T> Freeze for Timers<T>

§

impl<T> !RefUnwindSafe for Timers<T>

§

impl<T> Send for Timers<T>
where +

Trait Implementations§

§

impl<T> Debug for Timers<T>
where + T: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<T> Default for Timers<T>

§

fn default() -> Timers<T>

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

Auto Trait Implementations§

§

impl<T> Freeze for Timers<T>

§

impl<T> !RefUnwindSafe for Timers<T>

§

impl<T> Send for Timers<T>
where T: Send,

§

impl<T> Sync for Timers<T>
where T: Sync,

§

impl<T> Unpin for Timers<T>

§

impl<T> !UnwindSafe for Timers<T>

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/2737/docs/iroh/gossip/proto/enum.Command.html b/pr/2737/docs/iroh/gossip/proto/enum.Command.html index 92e26e3f3d..461bc4ef2b 100644 --- a/pr/2737/docs/iroh/gossip/proto/enum.Command.html +++ b/pr/2737/docs/iroh/gossip/proto/enum.Command.html @@ -1,4 +1,4 @@ -Command in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Command

source ·
pub enum Command<PI> {
+Command in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Command

pub enum Command<PI> {
     Join(Vec<PI>),
     Broadcast(Bytes, Scope),
     Quit,
@@ -8,9 +8,9 @@
 but only become operational after the first join request by another peer.

§

Broadcast(Bytes, Scope)

Broadcast a message for this topic.

§

Quit

Leave this topic and drop all state.

-

Trait Implementations§

source§

impl<PI> Clone for Command<PI>
where - PI: Clone,

source§

fn clone(&self) -> Command<PI>

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<PI> Debug for Command<PI>
where - Vec<PI>: 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<PI> !Freeze for Command<PI>

§

impl<PI> RefUnwindSafe for Command<PI>
where +

Trait Implementations§

§

impl<PI> Clone for Command<PI>
where + PI: Clone,

§

fn clone(&self) -> Command<PI>

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<PI> Debug for Command<PI>
where + Vec<PI>: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for Command<PI>

§

impl<PI> RefUnwindSafe for Command<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Command<PI>
where PI: Send,

§

impl<PI> Sync for Command<PI>
where PI: Sync,

§

impl<PI> Unpin for Command<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/enum.DeliveryScope.html b/pr/2737/docs/iroh/gossip/proto/enum.DeliveryScope.html index 13c59bbdd5..bc042a8609 100644 --- a/pr/2737/docs/iroh/gossip/proto/enum.DeliveryScope.html +++ b/pr/2737/docs/iroh/gossip/proto/enum.DeliveryScope.html @@ -1,4 +1,4 @@ -DeliveryScope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::DeliveryScope

source ·
pub enum DeliveryScope {
+DeliveryScope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::DeliveryScope

pub enum DeliveryScope {
     Swarm(Round),
     Neighbors,
 }
Expand description

The scope to deliver the message to.

@@ -6,22 +6,22 @@ original broadcaster.

§

Neighbors

This message was received from a direct neighbor that broadcasted the message to neighbors only.

-

Implementations§

source§

impl DeliveryScope

source

pub fn is_direct(&self) -> bool

Whether this message was directly received from its publisher.

-

Trait Implementations§

source§

impl Clone for DeliveryScope

source§

fn clone(&self) -> DeliveryScope

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 DeliveryScope

source§

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

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

impl<'de> Deserialize<'de> for DeliveryScope

Implementations§

§

impl DeliveryScope

pub fn is_direct(&self) -> bool

Whether this message was directly received from its publisher.

+

Trait Implementations§

§

impl Clone for DeliveryScope

§

fn clone(&self) -> DeliveryScope

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 DeliveryScope

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for DeliveryScope

§

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

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

impl Ord for DeliveryScope

source§

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

§

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

source§

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

§

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

source§

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

§

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

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for DeliveryScope

§

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 DeliveryScope

source§

impl Eq for DeliveryScope

source§

impl StructuralPartialEq for DeliveryScope

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 DeliveryScope

§

impl Eq for DeliveryScope

§

impl StructuralPartialEq for DeliveryScope

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/proto/enum.Event.html b/pr/2737/docs/iroh/gossip/proto/enum.Event.html index e48411660a..ce38bc542d 100644 --- a/pr/2737/docs/iroh/gossip/proto/enum.Event.html +++ b/pr/2737/docs/iroh/gossip/proto/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Event

source ·
pub enum Event<PI> {
+Event in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Event

pub enum Event<PI> {
     NeighborUp(PI),
     NeighborDown(PI),
     Received(GossipEvent<PI>),
@@ -6,29 +6,29 @@
 

Variants§

§

NeighborUp(PI)

We have a new, direct neighbor in the swarm membership layer for this topic

§

NeighborDown(PI)

We dropped direct neighbor in the swarm membership layer for this topic

§

Received(GossipEvent<PI>)

A gossip message was received for this topic

-

Trait Implementations§

source§

impl<PI> Clone for Event<PI>
where - PI: Clone,

source§

fn clone(&self) -> Event<PI>

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<PI> Debug for Event<PI>
where - PI: Debug,

source§

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

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

impl<'de, PI> Deserialize<'de> for Event<PI>
where - PI: Deserialize<'de>,

Trait Implementations§

§

impl<PI> Clone for Event<PI>
where + PI: Clone,

§

fn clone(&self) -> Event<PI>

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<PI> Debug for Event<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Event<PI>
where + PI: Deserialize<'de>,

§

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

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

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
source§

impl<PI> Ord for Event<PI>
where - PI: Ord,

source§

fn cmp(&self, other: &Event<PI>) -> 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<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
§

impl From<Event<PublicKey>> for GossipEvent

§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
§

impl<PI> Ord for Event<PI>
where + PI: Ord,

§

fn cmp(&self, other: &Event<PI>) -> 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<PI> PartialEq for Event<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &Event<PI>) -> 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<PI> PartialEq for Event<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &Event<PI>) -> 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<PI> PartialOrd for Event<PI>
where - PI: PartialOrd,

source§

fn partial_cmp(&self, other: &Event<PI>) -> 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<PI> PartialOrd for Event<PI>
where + PI: PartialOrd,

§

fn partial_cmp(&self, other: &Event<PI>) -> 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<PI> Serialize for Event<PI>
where - PI: Serialize,

source§

fn serialize<__S>( +operator. Read more

§

impl<PI> Serialize for Event<PI>
where + PI: Serialize,

§

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<PI> Eq for Event<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for Event<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Event<PI>

§

impl<PI> RefUnwindSafe for Event<PI>
where + __S: Serializer,

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

impl<PI> Eq for Event<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for Event<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Event<PI>

§

impl<PI> RefUnwindSafe for Event<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Event<PI>
where PI: Send,

§

impl<PI> Sync for Event<PI>
where PI: Sync,

§

impl<PI> Unpin for Event<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/enum.InEvent.html b/pr/2737/docs/iroh/gossip/proto/enum.InEvent.html index 97280dc741..ea18d07b8f 100644 --- a/pr/2737/docs/iroh/gossip/proto/enum.InEvent.html +++ b/pr/2737/docs/iroh/gossip/proto/enum.InEvent.html @@ -1,4 +1,4 @@ -InEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::InEvent

source ·
pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::InEvent

pub enum InEvent<PI> {
     RecvMessage(PI, Message<PI>),
     Command(TopicId, Command<PI>),
     TimerExpired(Timer<PI>),
@@ -10,9 +10,9 @@
 
§

TimerExpired(Timer<PI>)

Trigger a previously scheduled timer.

§

PeerDisconnected(PI)

Peer disconnected on the network level.

§

UpdatePeerData(PeerData)

Update the opaque peer data about yourself.

-

Trait Implementations§

source§

impl<PI> Clone for InEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> InEvent<PI>

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<PI> Debug for InEvent<PI>
where - PI: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for InEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> InEvent<PI>

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<PI> Debug for InEvent<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for InEvent<PI>
where PI: Send,

§

impl<PI> Sync for InEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for InEvent<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/enum.OutEvent.html b/pr/2737/docs/iroh/gossip/proto/enum.OutEvent.html index 985ad6bf11..296e9c3af5 100644 --- a/pr/2737/docs/iroh/gossip/proto/enum.OutEvent.html +++ b/pr/2737/docs/iroh/gossip/proto/enum.OutEvent.html @@ -1,4 +1,4 @@ -OutEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::OutEvent

source ·
pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::OutEvent

pub enum OutEvent<PI> {
     SendMessage(PI, Message<PI>),
     EmitEvent(TopicId, Event<PI>),
     ScheduleTimer(Duration, Timer<PI>),
@@ -11,9 +11,9 @@
 after the duration.

§

DisconnectPeer(PI)

Close the connection to a peer on the network level.

§

PeerData(PI, PeerData)

Updated peer data

-

Trait Implementations§

source§

impl<PI> Clone for OutEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> OutEvent<PI>

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<PI> Debug for OutEvent<PI>
where - PI: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for OutEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> OutEvent<PI>

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<PI> Debug for OutEvent<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for OutEvent<PI>
where PI: Send,

§

impl<PI> Sync for OutEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for OutEvent<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/enum.Scope.html b/pr/2737/docs/iroh/gossip/proto/enum.Scope.html index d70946586a..c3028c046f 100644 --- a/pr/2737/docs/iroh/gossip/proto/enum.Scope.html +++ b/pr/2737/docs/iroh/gossip/proto/enum.Scope.html @@ -1,24 +1,24 @@ -Scope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Scope

source ·
pub enum Scope {
+Scope in iroh::gossip::proto - Rust

Enum iroh::gossip::proto::Scope

pub enum Scope {
     Swarm,
     Neighbors,
 }
Expand description

The broadcast scope of a gossip message.

Variants§

§

Swarm

The message is broadcast to all peers in the swarm.

§

Neighbors

The message is broadcast only to the immediate neighbors of a peer.

-

Trait Implementations§

source§

impl Clone for Scope

source§

fn clone(&self) -> Scope

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 Scope

source§

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

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

impl<'de> Deserialize<'de> for Scope

Trait Implementations§

§

impl Clone for Scope

§

fn clone(&self) -> Scope

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 Scope

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for Scope

§

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

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

impl Ord for Scope

source§

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

§

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

source§

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

§

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

source§

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

§

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

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for Scope

§

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 Scope

source§

impl Eq for Scope

source§

impl StructuralPartialEq for Scope

Auto Trait Implementations§

§

impl Freeze for Scope

§

impl RefUnwindSafe for Scope

§

impl Send for Scope

§

impl Sync for Scope

§

impl Unpin for Scope

§

impl UnwindSafe for Scope

Blanket Implementations§

source§

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

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

impl Copy for Scope

§

impl Eq for Scope

§

impl StructuralPartialEq for Scope

Auto Trait Implementations§

§

impl Freeze for Scope

§

impl RefUnwindSafe for Scope

§

impl Send for Scope

§

impl Sync for Scope

§

impl Unpin for Scope

§

impl UnwindSafe for Scope

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/proto/index.html b/pr/2737/docs/iroh/gossip/proto/index.html index a7bb37fd50..6bae1c916d 100644 --- a/pr/2737/docs/iroh/gossip/proto/index.html +++ b/pr/2737/docs/iroh/gossip/proto/index.html @@ -1,4 +1,4 @@ -iroh::gossip::proto - Rust

Module iroh::gossip::proto

source ·
Expand description

Implementation of the iroh-gossip protocol, as an IO-less state machine

+iroh::gossip::proto - Rust

Module iroh::gossip::proto

Expand description

Implementation of the iroh-gossip protocol, as an IO-less state machine

This module implements the iroh-gossip protocol. The entry point is State, which contains the protocol state for a node.

The iroh-gossip protocol is made up from two parts: A swarm membership protocol, based on diff --git a/pr/2737/docs/iroh/gossip/proto/state/enum.InEvent.html b/pr/2737/docs/iroh/gossip/proto/state/enum.InEvent.html index 76f1f0b621..533731f330 100644 --- a/pr/2737/docs/iroh/gossip/proto/state/enum.InEvent.html +++ b/pr/2737/docs/iroh/gossip/proto/state/enum.InEvent.html @@ -1,4 +1,4 @@ -InEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::InEvent

source ·
pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::InEvent

pub enum InEvent<PI> {
     RecvMessage(PI, Message<PI>),
     Command(TopicId, Command<PI>),
     TimerExpired(Timer<PI>),
@@ -10,9 +10,9 @@
 
§

TimerExpired(Timer<PI>)

Trigger a previously scheduled timer.

§

PeerDisconnected(PI)

Peer disconnected on the network level.

§

UpdatePeerData(PeerData)

Update the opaque peer data about yourself.

-

Trait Implementations§

source§

impl<PI> Clone for InEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> InEvent<PI>

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<PI> Debug for InEvent<PI>
where - PI: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for InEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> InEvent<PI>

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<PI> Debug for InEvent<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for InEvent<PI>
where PI: Send,

§

impl<PI> Sync for InEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for InEvent<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/state/enum.MessageKind.html b/pr/2737/docs/iroh/gossip/proto/state/enum.MessageKind.html index 985b4eed88..d10163776b 100644 --- a/pr/2737/docs/iroh/gossip/proto/state/enum.MessageKind.html +++ b/pr/2737/docs/iroh/gossip/proto/state/enum.MessageKind.html @@ -1,10 +1,10 @@ -MessageKind in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::MessageKind

source ·
pub enum MessageKind {
+MessageKind in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::MessageKind

pub enum MessageKind {
     Data,
     Control,
 }
Expand description

Whether this is a control or data message

Variants§

§

Data

A data message.

§

Control

A control message.

-

Trait Implementations§

source§

impl Debug for MessageKind

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 MessageKind

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/proto/state/enum.OutEvent.html b/pr/2737/docs/iroh/gossip/proto/state/enum.OutEvent.html index 654f7a4aa0..12ac873605 100644 --- a/pr/2737/docs/iroh/gossip/proto/state/enum.OutEvent.html +++ b/pr/2737/docs/iroh/gossip/proto/state/enum.OutEvent.html @@ -1,4 +1,4 @@ -OutEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::OutEvent

source ·
pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto::state - Rust

Enum iroh::gossip::proto::state::OutEvent

pub enum OutEvent<PI> {
     SendMessage(PI, Message<PI>),
     EmitEvent(TopicId, Event<PI>),
     ScheduleTimer(Duration, Timer<PI>),
@@ -11,9 +11,9 @@
 after the duration.

§

DisconnectPeer(PI)

Close the connection to a peer on the network level.

§

PeerData(PI, PeerData)

Updated peer data

-

Trait Implementations§

source§

impl<PI> Clone for OutEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> OutEvent<PI>

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<PI> Debug for OutEvent<PI>
where - PI: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for OutEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> OutEvent<PI>

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<PI> Debug for OutEvent<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for OutEvent<PI>
where PI: Send,

§

impl<PI> Sync for OutEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for OutEvent<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/state/index.html b/pr/2737/docs/iroh/gossip/proto/state/index.html index dec9206691..e68faeed2e 100644 --- a/pr/2737/docs/iroh/gossip/proto/state/index.html +++ b/pr/2737/docs/iroh/gossip/proto/state/index.html @@ -1,2 +1,2 @@ -iroh::gossip::proto::state - Rust

Module iroh::gossip::proto::state

source ·
Expand description

The protocol state of the iroh-gossip protocol.

+iroh::gossip::proto::state - Rust

Module iroh::gossip::proto::state

Expand description

The protocol state of the iroh-gossip protocol.

Structs§

  • Protocol wire message
  • The state of the iroh-gossip protocol.
  • A timer to be registered into the runtime
  • The identifier for a topic

Enums§

  • Input event to the protocol state.
  • Whether this is a control or data message
  • Output event from the protocol state.
\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/proto/state/struct.Message.html b/pr/2737/docs/iroh/gossip/proto/state/struct.Message.html index e4e3087af3..73cadbc554 100644 --- a/pr/2737/docs/iroh/gossip/proto/state/struct.Message.html +++ b/pr/2737/docs/iroh/gossip/proto/state/struct.Message.html @@ -1,16 +1,16 @@ -Message in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::Message

source ·
pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

+Message in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::Message

pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

This is the wire frame of the iroh-gossip protocol.

-

Implementations§

source§

impl<PI> Message<PI>

source

pub fn kind(&self) -> MessageKind

Get the kind of this message

-
source§

impl<PI> Message<PI>
where - PI: Serialize,

source

pub fn size(&self) -> Result<usize, Error>

Get the encoded size of this message

-

Trait Implementations§

source§

impl<PI> Clone for Message<PI>
where - PI: Clone,

source§

fn clone(&self) -> Message<PI>

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<PI> Debug for Message<PI>
where - PI: Debug,

source§

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

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

impl<'de, PI> Deserialize<'de> for Message<PI>
where - PI: Deserialize<'de>,

Implementations§

§

impl<PI> Message<PI>

pub fn kind(&self) -> MessageKind

Get the kind of this message

+
§

impl<PI> Message<PI>
where + PI: Serialize,

pub fn size(&self) -> Result<usize, Error>

Get the encoded size of this message

+

Trait Implementations§

§

impl<PI> Clone for Message<PI>
where + PI: Clone,

§

fn clone(&self) -> Message<PI>

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<PI> Debug for Message<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Message<PI>
where + PI: Deserialize<'de>,

§

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

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

impl<PI> Serialize for Message<PI>
where - PI: Serialize,

source§

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

Deserialize this value from the given Serde deserializer. Read more

§

impl<PI> Serialize for Message<PI>
where + PI: Serialize,

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2737/docs/iroh/gossip/proto/state/struct.State.html b/pr/2737/docs/iroh/gossip/proto/state/struct.State.html index a1dbdca6c0..43b020fe66 100644 --- a/pr/2737/docs/iroh/gossip/proto/state/struct.State.html +++ b/pr/2737/docs/iroh/gossip/proto/state/struct.State.html @@ -1,31 +1,31 @@ -State in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::State

source ·
pub struct State<PI, R> { /* private fields */ }
Expand description

The state of the iroh-gossip protocol.

+State in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::State

pub struct State<PI, R> { /* private fields */ }
Expand description

The state of the iroh-gossip protocol.

The implementation works as an IO-less state machine. The implementer injects events through Self::handle, which returns an iterator of OutEvents to be processed.

This struct contains a map of topic::State for each topic that was joined. It mostly acts as a forwarder of InEvents to matching topic state. Each topic’s state is completely independent; thus the actual protocol logic lives with topic::State.

-

Implementations§

source§

impl<PI, R> State<PI, R>
where +

Implementations§

§

impl<PI, R> State<PI, R>
where PI: PeerIdentity, - R: Rng + Clone,

source

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

+ R: Rng + Clone,

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

me is the PeerIdentity of the local node, peer_data is the initial PeerData (which can be updated over time). For the protocol to perform as recommended in the papers, the Config should be identical for all nodes in the network.

-
source

pub fn me(&self) -> &PI

Get a reference to the node’s PeerIdentity

-
source

pub fn state(&self, topic: &TopicId) -> Option<&State<PI, R>>

Get a reference to the protocol state for a topic.

-
source

pub fn topics(&self) -> impl Iterator<Item = &TopicId>

Get an iterator of all joined topics.

-
source

pub fn states(&self) -> impl Iterator<Item = (&TopicId, &State<PI, R>)>

Get an iterator for the states of all joined topics.

-
source

pub fn has_active_peers(&self, topic: &TopicId) -> bool

Check if a topic has any active (connected) peers.

-
source

pub fn max_message_size(&self) -> usize

Returns the maximum message size configured in the gossip protocol.

-
source

pub fn handle( +

pub fn me(&self) -> &PI

Get a reference to the node’s PeerIdentity

+

pub fn state(&self, topic: &TopicId) -> Option<&State<PI, R>>

Get a reference to the protocol state for a topic.

+

pub fn topics(&self) -> impl Iterator<Item = &TopicId>

Get an iterator of all joined topics.

+

pub fn states(&self) -> impl Iterator<Item = (&TopicId, &State<PI, R>)>

Get an iterator for the states of all joined topics.

+

pub fn has_active_peers(&self, topic: &TopicId) -> bool

Check if a topic has any active (connected) peers.

+

pub fn max_message_size(&self) -> usize

Returns the maximum message size configured in the gossip protocol.

+

pub fn handle( &mut self, event: InEvent<PI>, now: Instant ) -> impl Iterator<Item = OutEvent<PI>>

Handle an InEvent

This returns an iterator of OutEvents that must be processed.

-

Trait Implementations§

source§

impl<PI, R> Debug for State<PI, R>
where +

Trait Implementations§

§

impl<PI, R> Debug for State<PI, R>
where PI: Debug, - R: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>
where + R: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2737/docs/iroh/gossip/proto/state/struct.Timer.html b/pr/2737/docs/iroh/gossip/proto/state/struct.Timer.html index 8a82578dee..d76be1da05 100644 --- a/pr/2737/docs/iroh/gossip/proto/state/struct.Timer.html +++ b/pr/2737/docs/iroh/gossip/proto/state/struct.Timer.html @@ -1,11 +1,11 @@ -Timer in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::Timer

source ·
pub struct Timer<PI> { /* private fields */ }
Expand description

A timer to be registered into the runtime

+Timer in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::Timer

pub struct Timer<PI> { /* private fields */ }
Expand description

A timer to be registered into the runtime

As the implementation of the protocol is an IO-less state machine, registering timers does not happen within the protocol implementation. Instead, these Timer structs are emitted as OutEvents. The implementer must register the timer in its runtime to be emitted on the specified Instant, and once triggered inject an InEvent::TimerExpired into the protocol state.

-

Trait Implementations§

source§

impl<PI> Clone for Timer<PI>
where - PI: Clone,

source§

fn clone(&self) -> Timer<PI>

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<PI> Debug for Timer<PI>
where - PI: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where +

Trait Implementations§

§

impl<PI> Clone for Timer<PI>
where + PI: Clone,

§

fn clone(&self) -> Timer<PI>

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<PI> Debug for Timer<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where PI: Freeze,

§

impl<PI> RefUnwindSafe for Timer<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Timer<PI>
where PI: Send,

§

impl<PI> Sync for Timer<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/state/struct.TopicId.html b/pr/2737/docs/iroh/gossip/proto/state/struct.TopicId.html index 169314b815..11084459c3 100644 --- a/pr/2737/docs/iroh/gossip/proto/state/struct.TopicId.html +++ b/pr/2737/docs/iroh/gossip/proto/state/struct.TopicId.html @@ -1,25 +1,25 @@ -TopicId in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::TopicId

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

The identifier for a topic

-

Implementations§

source§

impl TopicId

source

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

Create from a byte array.

-
source

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

Get as byte slice.

-

Trait Implementations§

source§

impl AsRef<[u8]> for TopicId

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 TopicId

source§

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

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

impl Clone for TopicId

source§

fn clone(&self) -> TopicId

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 TopicId

source§

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

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

impl<'de> Deserialize<'de> for TopicId

source§

fn deserialize<__D>( +TopicId in iroh::gossip::proto::state - Rust

Struct iroh::gossip::proto::state::TopicId

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

The identifier for a topic

+

Implementations§

§

impl TopicId

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

Create from a byte array.

+

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

Get as byte slice.

+

Trait Implementations§

§

impl AsRef<[u8]> for TopicId

§

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

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

impl AsRef<[u8; 32]> for TopicId

§

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

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

impl Clone for TopicId

§

fn clone(&self) -> TopicId

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 TopicId

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for TopicId

§

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

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

impl Display for TopicId

source§

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

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

impl<T> From<T> for TopicId
where - T: Into<[u8; 32]>,

source§

fn from(value: T) -> TopicId

Converts to this type from the input type.
source§

impl FromStr for TopicId

§

type Err = Error

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

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

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

impl Hash for TopicId

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 TopicId

§

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

Formats the value using the given formatter. Read more
§

impl<T> From<T> for TopicId
where + T: Into<[u8; 32]>,

§

fn from(value: T) -> TopicId

Converts to this type from the input type.
§

impl FromStr for TopicId

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Hash for TopicId

§

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 TopicId

source§

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

§

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

source§

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

§

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

source§

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

§

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

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for TopicId

§

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 TopicId

source§

impl Eq for TopicId

source§

impl StructuralPartialEq for TopicId

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 TopicId

§

impl Eq for TopicId

§

impl StructuralPartialEq for TopicId

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 @@ -147,7 +147,7 @@ letters are used (e.g. F9B4CA)

Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/gossip/proto/struct.Config.html b/pr/2737/docs/iroh/gossip/proto/struct.Config.html index c9e3db4070..284f09342c 100644 --- a/pr/2737/docs/iroh/gossip/proto/struct.Config.html +++ b/pr/2737/docs/iroh/gossip/proto/struct.Config.html @@ -1,4 +1,4 @@ -Config in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Config

source ·
pub struct Config {
+Config in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Config

pub struct Config {
     pub membership: Config,
     pub broadcast: Config,
     pub max_message_size: usize,
@@ -9,7 +9,7 @@
 

This size should be the same across a network to ensure all nodes can transmit and read large messages.

At minimum, this size should be large enough to send gossip control messages. This can vary, depending on the size of the PeerIdentity you use and the size of the PeerData you transmit in your messages.

The default is DEFAULT_MAX_MESSAGE_SIZE.

-

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

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 Config

source§

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

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

impl Default for Config

source§

fn default() -> Config

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

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Config

§

fn clone(&self) -> Config

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 Config

§

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

Formats the value using the given formatter. Read more
§

impl Default for Config

§

fn default() -> Config

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

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/proto/struct.Message.html b/pr/2737/docs/iroh/gossip/proto/struct.Message.html index 13acccce64..e88d189fe6 100644 --- a/pr/2737/docs/iroh/gossip/proto/struct.Message.html +++ b/pr/2737/docs/iroh/gossip/proto/struct.Message.html @@ -1,16 +1,16 @@ -Message in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Message

source ·
pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

+Message in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Message

pub struct Message<PI> { /* private fields */ }
Expand description

Protocol wire message

This is the wire frame of the iroh-gossip protocol.

-

Implementations§

source§

impl<PI> Message<PI>

source

pub fn kind(&self) -> MessageKind

Get the kind of this message

-
source§

impl<PI> Message<PI>
where - PI: Serialize,

source

pub fn size(&self) -> Result<usize, Error>

Get the encoded size of this message

-

Trait Implementations§

source§

impl<PI> Clone for Message<PI>
where - PI: Clone,

source§

fn clone(&self) -> Message<PI>

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<PI> Debug for Message<PI>
where - PI: Debug,

source§

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

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

impl<'de, PI> Deserialize<'de> for Message<PI>
where - PI: Deserialize<'de>,

Implementations§

§

impl<PI> Message<PI>

pub fn kind(&self) -> MessageKind

Get the kind of this message

+
§

impl<PI> Message<PI>
where + PI: Serialize,

pub fn size(&self) -> Result<usize, Error>

Get the encoded size of this message

+

Trait Implementations§

§

impl<PI> Clone for Message<PI>
where + PI: Clone,

§

fn clone(&self) -> Message<PI>

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<PI> Debug for Message<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Message<PI>
where + PI: Deserialize<'de>,

§

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

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

impl<PI> Serialize for Message<PI>
where - PI: Serialize,

source§

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

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

impl<PI> Serialize for Message<PI>
where + PI: Serialize,

§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where diff --git a/pr/2737/docs/iroh/gossip/proto/struct.PeerData.html b/pr/2737/docs/iroh/gossip/proto/struct.PeerData.html index f94ec3e4f3..ef766832bf 100644 --- a/pr/2737/docs/iroh/gossip/proto/struct.PeerData.html +++ b/pr/2737/docs/iroh/gossip/proto/struct.PeerData.html @@ -1,19 +1,19 @@ -PeerData in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::PeerData

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

Opaque binary data that is transmitted on messages that introduce new peers.

+PeerData in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::PeerData

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

Opaque binary data that is transmitted on messages that introduce new peers.

Implementations may use these bytes to supply addresses or other information needed to connect to a peer that is not included in the peer’s PeerIdentity.

-

Implementations§

source§

impl PeerData

source

pub fn new(data: impl Into<Bytes>) -> PeerData

Create a new PeerData from a byte buffer.

-
source

pub fn inner(&self) -> &Bytes

Get a reference to the contained [bytes::Bytes].

-
source

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

Get the peer data as a byte slice.

-

Trait Implementations§

source§

impl Clone for PeerData

source§

fn clone(&self) -> PeerData

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 PeerData

source§

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

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

impl Default for PeerData

source§

fn default() -> PeerData

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

impl<'de> Deserialize<'de> for PeerData

Implementations§

§

impl PeerData

pub fn new(data: impl Into<Bytes>) -> PeerData

Create a new PeerData from a byte buffer.

+

pub fn inner(&self) -> &Bytes

Get a reference to the contained [bytes::Bytes].

+

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

Get the peer data as a byte slice.

+

Trait Implementations§

§

impl Clone for PeerData

§

fn clone(&self) -> PeerData

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 PeerData

§

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

Formats the value using the given formatter. Read more
§

impl Default for PeerData

§

fn default() -> PeerData

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

impl<'de> Deserialize<'de> for PeerData

§

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

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

impl PartialEq for PeerData

source§

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

§

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

source§

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

§

impl Serialize for PeerData

§

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 PeerData

source§

impl StructuralPartialEq for PeerData

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 PeerData

§

impl StructuralPartialEq for PeerData

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/proto/struct.State.html b/pr/2737/docs/iroh/gossip/proto/struct.State.html index b0f729063f..1b5b75fb53 100644 --- a/pr/2737/docs/iroh/gossip/proto/struct.State.html +++ b/pr/2737/docs/iroh/gossip/proto/struct.State.html @@ -1,31 +1,31 @@ -State in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::State

source ·
pub struct State<PI, R> { /* private fields */ }
Expand description

The state of the iroh-gossip protocol.

+State in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::State

pub struct State<PI, R> { /* private fields */ }
Expand description

The state of the iroh-gossip protocol.

The implementation works as an IO-less state machine. The implementer injects events through Self::handle, which returns an iterator of OutEvents to be processed.

This struct contains a map of topic::State for each topic that was joined. It mostly acts as a forwarder of InEvents to matching topic state. Each topic’s state is completely independent; thus the actual protocol logic lives with topic::State.

-

Implementations§

source§

impl<PI, R> State<PI, R>
where +

Implementations§

§

impl<PI, R> State<PI, R>
where PI: PeerIdentity, - R: Rng + Clone,

source

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

+ R: Rng + Clone,

pub fn new(me: PI, me_data: PeerData, config: Config, rng: R) -> State<PI, R>

Create a new protocol state instance.

me is the PeerIdentity of the local node, peer_data is the initial PeerData (which can be updated over time). For the protocol to perform as recommended in the papers, the Config should be identical for all nodes in the network.

-
source

pub fn me(&self) -> &PI

Get a reference to the node’s PeerIdentity

-
source

pub fn state(&self, topic: &TopicId) -> Option<&State<PI, R>>

Get a reference to the protocol state for a topic.

-
source

pub fn topics(&self) -> impl Iterator<Item = &TopicId>

Get an iterator of all joined topics.

-
source

pub fn states(&self) -> impl Iterator<Item = (&TopicId, &State<PI, R>)>

Get an iterator for the states of all joined topics.

-
source

pub fn has_active_peers(&self, topic: &TopicId) -> bool

Check if a topic has any active (connected) peers.

-
source

pub fn max_message_size(&self) -> usize

Returns the maximum message size configured in the gossip protocol.

-
source

pub fn handle( +

pub fn me(&self) -> &PI

Get a reference to the node’s PeerIdentity

+

pub fn state(&self, topic: &TopicId) -> Option<&State<PI, R>>

Get a reference to the protocol state for a topic.

+

pub fn topics(&self) -> impl Iterator<Item = &TopicId>

Get an iterator of all joined topics.

+

pub fn states(&self) -> impl Iterator<Item = (&TopicId, &State<PI, R>)>

Get an iterator for the states of all joined topics.

+

pub fn has_active_peers(&self, topic: &TopicId) -> bool

Check if a topic has any active (connected) peers.

+

pub fn max_message_size(&self) -> usize

Returns the maximum message size configured in the gossip protocol.

+

pub fn handle( &mut self, event: InEvent<PI>, now: Instant ) -> impl Iterator<Item = OutEvent<PI>>

Handle an InEvent

This returns an iterator of OutEvents that must be processed.

-

Trait Implementations§

source§

impl<PI, R> Debug for State<PI, R>
where +

Trait Implementations§

§

impl<PI, R> Debug for State<PI, R>
where PI: Debug, - R: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>
where + R: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2737/docs/iroh/gossip/proto/struct.Timer.html b/pr/2737/docs/iroh/gossip/proto/struct.Timer.html index b65cfbb1e3..b175fc41cc 100644 --- a/pr/2737/docs/iroh/gossip/proto/struct.Timer.html +++ b/pr/2737/docs/iroh/gossip/proto/struct.Timer.html @@ -1,11 +1,11 @@ -Timer in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Timer

source ·
pub struct Timer<PI> { /* private fields */ }
Expand description

A timer to be registered into the runtime

+Timer in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::Timer

pub struct Timer<PI> { /* private fields */ }
Expand description

A timer to be registered into the runtime

As the implementation of the protocol is an IO-less state machine, registering timers does not happen within the protocol implementation. Instead, these Timer structs are emitted as OutEvents. The implementer must register the timer in its runtime to be emitted on the specified Instant, and once triggered inject an InEvent::TimerExpired into the protocol state.

-

Trait Implementations§

source§

impl<PI> Clone for Timer<PI>
where - PI: Clone,

source§

fn clone(&self) -> Timer<PI>

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<PI> Debug for Timer<PI>
where - PI: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where +

Trait Implementations§

§

impl<PI> Clone for Timer<PI>
where + PI: Clone,

§

fn clone(&self) -> Timer<PI>

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<PI> Debug for Timer<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where PI: Freeze,

§

impl<PI> RefUnwindSafe for Timer<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Timer<PI>
where PI: Send,

§

impl<PI> Sync for Timer<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/struct.TopicId.html b/pr/2737/docs/iroh/gossip/proto/struct.TopicId.html index 408684d926..a4895e143e 100644 --- a/pr/2737/docs/iroh/gossip/proto/struct.TopicId.html +++ b/pr/2737/docs/iroh/gossip/proto/struct.TopicId.html @@ -1,25 +1,25 @@ -TopicId in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::TopicId

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

The identifier for a topic

-

Implementations§

source§

impl TopicId

source

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

Create from a byte array.

-
source

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

Get as byte slice.

-

Trait Implementations§

source§

impl AsRef<[u8]> for TopicId

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 TopicId

source§

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

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

impl Clone for TopicId

source§

fn clone(&self) -> TopicId

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 TopicId

source§

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

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

impl<'de> Deserialize<'de> for TopicId

source§

fn deserialize<__D>( +TopicId in iroh::gossip::proto - Rust

Struct iroh::gossip::proto::TopicId

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

The identifier for a topic

+

Implementations§

§

impl TopicId

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

Create from a byte array.

+

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

Get as byte slice.

+

Trait Implementations§

§

impl AsRef<[u8]> for TopicId

§

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

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

impl AsRef<[u8; 32]> for TopicId

§

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

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

impl Clone for TopicId

§

fn clone(&self) -> TopicId

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 TopicId

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for TopicId

§

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

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

impl Display for TopicId

source§

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

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

impl<T> From<T> for TopicId
where - T: Into<[u8; 32]>,

source§

fn from(value: T) -> TopicId

Converts to this type from the input type.
source§

impl FromStr for TopicId

§

type Err = Error

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

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

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

impl Hash for TopicId

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 TopicId

§

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

Formats the value using the given formatter. Read more
§

impl<T> From<T> for TopicId
where + T: Into<[u8; 32]>,

§

fn from(value: T) -> TopicId

Converts to this type from the input type.
§

impl FromStr for TopicId

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Hash for TopicId

§

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 TopicId

source§

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

§

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

source§

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

§

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

source§

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

§

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

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for TopicId

§

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 TopicId

source§

impl Eq for TopicId

source§

impl StructuralPartialEq for TopicId

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 TopicId

§

impl Eq for TopicId

§

impl StructuralPartialEq for TopicId

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 @@ -147,7 +147,7 @@ letters are used (e.g. F9B4CA)

Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html b/pr/2737/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html index 5a0a38a46f..3abee9684a 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/constant.DEFAULT_MAX_MESSAGE_SIZE.html @@ -1,3 +1,3 @@ -DEFAULT_MAX_MESSAGE_SIZE in iroh::gossip::proto::topic - Rust

Constant iroh::gossip::proto::topic::DEFAULT_MAX_MESSAGE_SIZE

source ·
pub const DEFAULT_MAX_MESSAGE_SIZE: usize = 4096; // 4_096usize
Expand description

The default maximum size in bytes for a gossip message. +DEFAULT_MAX_MESSAGE_SIZE in iroh::gossip::proto::topic - Rust

Constant iroh::gossip::proto::topic::DEFAULT_MAX_MESSAGE_SIZE

pub const DEFAULT_MAX_MESSAGE_SIZE: usize = 4096; // 4_096usize
Expand description

The default maximum size in bytes for a gossip message. This is a sane but arbitrary default and can be changed in the Config.

\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/proto/topic/enum.Command.html b/pr/2737/docs/iroh/gossip/proto/topic/enum.Command.html index c2e356afaa..eb75ef1b43 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/enum.Command.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/enum.Command.html @@ -1,4 +1,4 @@ -Command in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Command

source ·
pub enum Command<PI> {
+Command in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Command

pub enum Command<PI> {
     Join(Vec<PI>),
     Broadcast(Bytes, Scope),
     Quit,
@@ -8,9 +8,9 @@
 but only become operational after the first join request by another peer.

§

Broadcast(Bytes, Scope)

Broadcast a message for this topic.

§

Quit

Leave this topic and drop all state.

-

Trait Implementations§

source§

impl<PI> Clone for Command<PI>
where - PI: Clone,

source§

fn clone(&self) -> Command<PI>

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<PI> Debug for Command<PI>
where - Vec<PI>: 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<PI> !Freeze for Command<PI>

§

impl<PI> RefUnwindSafe for Command<PI>
where +

Trait Implementations§

§

impl<PI> Clone for Command<PI>
where + PI: Clone,

§

fn clone(&self) -> Command<PI>

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<PI> Debug for Command<PI>
where + Vec<PI>: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for Command<PI>

§

impl<PI> RefUnwindSafe for Command<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Command<PI>
where PI: Send,

§

impl<PI> Sync for Command<PI>
where PI: Sync,

§

impl<PI> Unpin for Command<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/topic/enum.Event.html b/pr/2737/docs/iroh/gossip/proto/topic/enum.Event.html index db72f1bcd8..a678214be7 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/enum.Event.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/enum.Event.html @@ -1,4 +1,4 @@ -Event in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Event

source ·
pub enum Event<PI> {
+Event in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Event

pub enum Event<PI> {
     NeighborUp(PI),
     NeighborDown(PI),
     Received(GossipEvent<PI>),
@@ -6,29 +6,29 @@
 

Variants§

§

NeighborUp(PI)

We have a new, direct neighbor in the swarm membership layer for this topic

§

NeighborDown(PI)

We dropped direct neighbor in the swarm membership layer for this topic

§

Received(GossipEvent<PI>)

A gossip message was received for this topic

-

Trait Implementations§

source§

impl<PI> Clone for Event<PI>
where - PI: Clone,

source§

fn clone(&self) -> Event<PI>

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<PI> Debug for Event<PI>
where - PI: Debug,

source§

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

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

impl<'de, PI> Deserialize<'de> for Event<PI>
where - PI: Deserialize<'de>,

Trait Implementations§

§

impl<PI> Clone for Event<PI>
where + PI: Clone,

§

fn clone(&self) -> Event<PI>

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<PI> Debug for Event<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Event<PI>
where + PI: Deserialize<'de>,

§

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

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

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
source§

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
source§

impl<PI> Ord for Event<PI>
where - PI: Ord,

source§

fn cmp(&self, other: &Event<PI>) -> 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<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
§

impl From<Event<PublicKey>> for GossipEvent

§

fn from(event: Event<PublicKey>) -> GossipEvent

Converts to this type from the input type.
§

impl<PI> Ord for Event<PI>
where + PI: Ord,

§

fn cmp(&self, other: &Event<PI>) -> 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<PI> PartialEq for Event<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &Event<PI>) -> 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<PI> PartialEq for Event<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &Event<PI>) -> 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<PI> PartialOrd for Event<PI>
where - PI: PartialOrd,

source§

fn partial_cmp(&self, other: &Event<PI>) -> 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<PI> PartialOrd for Event<PI>
where + PI: PartialOrd,

§

fn partial_cmp(&self, other: &Event<PI>) -> 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<PI> Serialize for Event<PI>
where - PI: Serialize,

source§

fn serialize<__S>( +operator. Read more

§

impl<PI> Serialize for Event<PI>
where + PI: Serialize,

§

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<PI> Eq for Event<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for Event<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Event<PI>

§

impl<PI> RefUnwindSafe for Event<PI>
where + __S: Serializer,

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

impl<PI> Eq for Event<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for Event<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Event<PI>

§

impl<PI> RefUnwindSafe for Event<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Event<PI>
where PI: Send,

§

impl<PI> Sync for Event<PI>
where PI: Sync,

§

impl<PI> Unpin for Event<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/topic/enum.InEvent.html b/pr/2737/docs/iroh/gossip/proto/topic/enum.InEvent.html index 9568d24096..4d7ec66e04 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/enum.InEvent.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/enum.InEvent.html @@ -1,4 +1,4 @@ -InEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::InEvent

source ·
pub enum InEvent<PI> {
+InEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::InEvent

pub enum InEvent<PI> {
     RecvMessage(PI, Message<PI>),
     Command(Command<PI>),
     TimerExpired(Timer<PI>),
@@ -10,9 +10,9 @@
 
§

TimerExpired(Timer<PI>)

Trigger a previously scheduled timer.

§

PeerDisconnected(PI)

Peer disconnected on the network level.

§

UpdatePeerData(PeerData)

Update the opaque peer data about yourself.

-

Trait Implementations§

source§

impl<PI> Clone for InEvent<PI>
where - PI: Clone,

source§

fn clone(&self) -> InEvent<PI>

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<PI> Debug for InEvent<PI>
where - PI: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where +

Trait Implementations§

§

impl<PI> Clone for InEvent<PI>
where + PI: Clone,

§

fn clone(&self) -> InEvent<PI>

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<PI> Debug for InEvent<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI> !Freeze for InEvent<PI>

§

impl<PI> RefUnwindSafe for InEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for InEvent<PI>
where PI: Send,

§

impl<PI> Sync for InEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for InEvent<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/topic/enum.Message.html b/pr/2737/docs/iroh/gossip/proto/topic/enum.Message.html index cc62c6723c..c207190dbc 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/enum.Message.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/enum.Message.html @@ -1,26 +1,26 @@ -Message in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Message

source ·
pub enum Message<PI> {
+Message in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Message

pub enum Message<PI> {
     Swarm(Message<PI>),
     Gossip(Message),
 }
Expand description

A protocol message for a particular topic

Variants§

§

Swarm(Message<PI>)

A message of the swarm membership layer

§

Gossip(Message)

A message of the gossip broadcast layer

-

Implementations§

source§

impl<PI> Message<PI>

source

pub fn kind(&self) -> MessageKind

Get the kind of this message

-

Trait Implementations§

source§

impl<PI> Clone for Message<PI>
where - PI: Clone,

source§

fn clone(&self) -> Message<PI>

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<PI> Debug for Message<PI>
where - PI: Debug,

source§

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

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

impl<'de, PI> Deserialize<'de> for Message<PI>
where - PI: Deserialize<'de>,

Implementations§

§

impl<PI> Message<PI>

pub fn kind(&self) -> MessageKind

Get the kind of this message

+

Trait Implementations§

§

impl<PI> Clone for Message<PI>
where + PI: Clone,

§

fn clone(&self) -> Message<PI>

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<PI> Debug for Message<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<'de, PI> Deserialize<'de> for Message<PI>
where + PI: Deserialize<'de>,

§

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

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

impl<PI> From<Message<PI>> for Message<PI>

source§

fn from(value: Message<PI>) -> Message<PI>

Converts to this type from the input type.
source§

impl<PI> From<Message> for Message<PI>

source§

fn from(value: Message) -> Message<PI>

Converts to this type from the input type.
source§

impl<PI> PartialEq for Message<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &Message<PI>) -> 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<PI> From<Message<PI>> for Message<PI>

§

fn from(value: Message<PI>) -> Message<PI>

Converts to this type from the input type.
§

impl<PI> From<Message> for Message<PI>

§

fn from(value: Message) -> Message<PI>

Converts to this type from the input type.
§

impl<PI> PartialEq for Message<PI>
where + PI: PartialEq,

§

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

source§

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

§

impl<PI> Serialize for Message<PI>
where + PI: Serialize,

§

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<PI> Eq for Message<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for Message<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Message<PI>

§

impl<PI> RefUnwindSafe for Message<PI>
where + __S: Serializer,

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

impl<PI> Eq for Message<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for Message<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for Message<PI>

§

impl<PI> RefUnwindSafe for Message<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Message<PI>
where PI: Send,

§

impl<PI> Sync for Message<PI>
where PI: Sync,

§

impl<PI> Unpin for Message<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/topic/enum.OutEvent.html b/pr/2737/docs/iroh/gossip/proto/topic/enum.OutEvent.html index a97dd66fa6..d4eaa64e95 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/enum.OutEvent.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/enum.OutEvent.html @@ -1,4 +1,4 @@ -OutEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::OutEvent

source ·
pub enum OutEvent<PI> {
+OutEvent in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::OutEvent

pub enum OutEvent<PI> {
     SendMessage(PI, Message<PI>),
     EmitEvent(Event<PI>),
     ScheduleTimer(Duration, Timer<PI>),
@@ -11,12 +11,12 @@
 after the duration.

§

DisconnectPeer(PI)

Close the connection to a peer on the network level.

§

PeerData(PI, PeerData)

Emitted when new PeerData was received for a peer.

-

Trait Implementations§

source§

impl<PI> Debug for OutEvent<PI>
where - PI: Debug,

source§

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

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

impl<PI> From<OutEvent<PI>> for OutEvent<PI>

source§

fn from(event: OutEvent<PI>) -> OutEvent<PI>

Converts to this type from the input type.
source§

impl<PI> From<OutEvent<PI>> for OutEvent<PI>

source§

fn from(event: OutEvent<PI>) -> OutEvent<PI>

Converts to this type from the input type.
source§

impl<PI> PartialEq for OutEvent<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &OutEvent<PI>) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl<PI> Debug for OutEvent<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<PI> From<OutEvent<PI>> for OutEvent<PI>

§

fn from(event: OutEvent<PI>) -> OutEvent<PI>

Converts to this type from the input type.
§

impl<PI> From<OutEvent<PI>> for OutEvent<PI>

§

fn from(event: OutEvent<PI>) -> OutEvent<PI>

Converts to this type from the input type.
§

impl<PI> PartialEq for OutEvent<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &OutEvent<PI>) -> 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<PI> Eq for OutEvent<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for OutEvent<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where +sufficient, and should not be overridden without very good reason.

§

impl<PI> Eq for OutEvent<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for OutEvent<PI>

Auto Trait Implementations§

§

impl<PI> !Freeze for OutEvent<PI>

§

impl<PI> RefUnwindSafe for OutEvent<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for OutEvent<PI>
where PI: Send,

§

impl<PI> Sync for OutEvent<PI>
where PI: Sync,

§

impl<PI> Unpin for OutEvent<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/topic/enum.Timer.html b/pr/2737/docs/iroh/gossip/proto/topic/enum.Timer.html index b9139af104..c21733aa84 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/enum.Timer.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/enum.Timer.html @@ -1,4 +1,4 @@ -Timer in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Timer

source ·
pub enum Timer<PI> {
+Timer in iroh::gossip::proto::topic - Rust

Enum iroh::gossip::proto::topic::Timer

pub enum Timer<PI> {
     Swarm(Timer<PI>),
     Gossip(Timer),
 }
Expand description

A timer to be registered for a particular topic.

@@ -6,13 +6,13 @@ to the protocol through InEvent::TimerExpired.

Variants§

§

Swarm(Timer<PI>)

A timer for the swarm layer

§

Gossip(Timer)

A timer for the gossip layer

-

Trait Implementations§

source§

impl<PI> Clone for Timer<PI>
where - PI: Clone,

source§

fn clone(&self) -> Timer<PI>

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<PI> Debug for Timer<PI>
where - PI: Debug,

source§

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

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

impl<PI> From<Timer<PI>> for Timer<PI>

source§

fn from(value: Timer<PI>) -> Timer<PI>

Converts to this type from the input type.
source§

impl<PI> From<Timer> for Timer<PI>

source§

fn from(value: Timer) -> Timer<PI>

Converts to this type from the input type.
source§

impl<PI> PartialEq for Timer<PI>
where - PI: PartialEq,

source§

fn eq(&self, other: &Timer<PI>) -> bool

This method tests for self and other values to be equal, and is used +

Trait Implementations§

§

impl<PI> Clone for Timer<PI>
where + PI: Clone,

§

fn clone(&self) -> Timer<PI>

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<PI> Debug for Timer<PI>
where + PI: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<PI> From<Timer<PI>> for Timer<PI>

§

fn from(value: Timer<PI>) -> Timer<PI>

Converts to this type from the input type.
§

impl<PI> From<Timer> for Timer<PI>

§

fn from(value: Timer) -> Timer<PI>

Converts to this type from the input type.
§

impl<PI> PartialEq for Timer<PI>
where + PI: PartialEq,

§

fn eq(&self, other: &Timer<PI>) -> 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<PI> Eq for Timer<PI>
where - PI: Eq,

source§

impl<PI> StructuralPartialEq for Timer<PI>

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where +sufficient, and should not be overridden without very good reason.

§

impl<PI> Eq for Timer<PI>
where + PI: Eq,

§

impl<PI> StructuralPartialEq for Timer<PI>

Auto Trait Implementations§

§

impl<PI> Freeze for Timer<PI>
where PI: Freeze,

§

impl<PI> RefUnwindSafe for Timer<PI>
where PI: RefUnwindSafe,

§

impl<PI> Send for Timer<PI>
where PI: Send,

§

impl<PI> Sync for Timer<PI>
where diff --git a/pr/2737/docs/iroh/gossip/proto/topic/index.html b/pr/2737/docs/iroh/gossip/proto/topic/index.html index a9b37cc1ea..ac9ec5a783 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/index.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/index.html @@ -1,3 +1,3 @@ -iroh::gossip::proto::topic - Rust

Module iroh::gossip::proto::topic

source ·
Expand description

This module contains the implementation of the gossiping protocol for an individual topic

+iroh::gossip::proto::topic - Rust

Module iroh::gossip::proto::topic

Expand description

This module contains the implementation of the gossiping protocol for an individual topic

Structs§

  • Protocol configuration
  • The topic state maintains the swarm membership and broadcast tree for a particular topic.
  • Statistics for the protocol state of a topic

Enums§

  • A command to the protocol state for a particular topic.
  • An event to be emitted to the application for a particular topic.
  • Input event to the topic state handler.
  • A protocol message for a particular topic
  • An output event from the state handler.
  • A timer to be registered for a particular topic.

Constants§

  • The default maximum size in bytes for a gossip message. This is a sane but arbitrary default and can be changed in the Config.

Traits§

  • A trait for a concrete type to push OutEvents to.
\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/proto/topic/struct.Config.html b/pr/2737/docs/iroh/gossip/proto/topic/struct.Config.html index f6c6994e0b..44c44bd72d 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/struct.Config.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/struct.Config.html @@ -1,4 +1,4 @@ -Config in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Config

source ·
pub struct Config {
+Config in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Config

pub struct Config {
     pub membership: Config,
     pub broadcast: Config,
     pub max_message_size: usize,
@@ -9,7 +9,7 @@
 

This size should be the same across a network to ensure all nodes can transmit and read large messages.

At minimum, this size should be large enough to send gossip control messages. This can vary, depending on the size of the PeerIdentity you use and the size of the PeerData you transmit in your messages.

The default is DEFAULT_MAX_MESSAGE_SIZE.

-

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

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 Config

source§

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

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

impl Default for Config

source§

fn default() -> Config

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

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Config

§

fn clone(&self) -> Config

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 Config

§

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

Formats the value using the given formatter. Read more
§

impl Default for Config

§

fn default() -> Config

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

Auto Trait Implementations§

§

impl Freeze for Config

§

impl RefUnwindSafe for Config

§

impl Send for Config

§

impl Sync for Config

§

impl Unpin for Config

§

impl UnwindSafe for Config

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/proto/topic/struct.State.html b/pr/2737/docs/iroh/gossip/proto/topic/struct.State.html index 754cbb9b0b..5d47f3c96a 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/struct.State.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/struct.State.html @@ -1,33 +1,33 @@ -State in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::State

source ·
pub struct State<PI, R> { /* private fields */ }
Expand description

The topic state maintains the swarm membership and broadcast tree for a particular topic.

-

Implementations§

source§

impl<PI> State<PI, StdRng>
where - PI: PeerIdentity,

source

pub fn new( +State in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::State

pub struct State<PI, R> { /* private fields */ }
Expand description

The topic state maintains the swarm membership and broadcast tree for a particular topic.

+

Implementations§

§

impl<PI> State<PI, StdRng>
where + PI: PeerIdentity,

pub fn new( me: PI, me_data: Option<PeerData>, config: Config ) -> State<PI, StdRng>

Initialize the local state with the default random number generator.

-
source§

impl<PI, R> State<PI, R>

source

pub fn endpoint(&self) -> &PI

The address of your local endpoint.

-
source§

impl<PI, R> State<PI, R>
where +

§

impl<PI, R> State<PI, R>

pub fn endpoint(&self) -> &PI

The address of your local endpoint.

+
§

impl<PI, R> State<PI, R>
where PI: PeerIdentity, - R: Rng,

source

pub fn with_rng( + R: Rng,

pub fn with_rng( me: PI, me_data: Option<PeerData>, config: Config, rng: R ) -> State<PI, R>

Initialize the local state with a custom random number generator.

-
source

pub fn handle( +

pub fn handle( &mut self, event: InEvent<PI>, now: Instant ) -> impl Iterator<Item = OutEvent<PI>>

Handle an incoming event.

Returns an iterator of outgoing events that must be processed by the application.

-
source

pub fn stats(&self) -> &Stats

Get stats on how many messages were sent and received

+

pub fn stats(&self) -> &Stats

Get stats on how many messages were sent and received

TODO: Remove/replace with metrics?

-
source

pub fn gossip_stats(&self) -> &Stats

Get statistics for the gossip broadcast state

+

pub fn gossip_stats(&self) -> &Stats

Get statistics for the gossip broadcast state

TODO: Remove/replace with metrics?

-
source

pub fn has_active_peers(&self) -> bool

Check if this topic has any active (connected) peers.

-

Trait Implementations§

source§

impl<PI, R> Debug for State<PI, R>
where +

pub fn has_active_peers(&self) -> bool

Check if this topic has any active (connected) peers.

+

Trait Implementations§

§

impl<PI, R> Debug for State<PI, R>
where PI: Debug, - R: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>
where + R: Debug,

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<PI, R> !Freeze for State<PI, R>

§

impl<PI, R> RefUnwindSafe for State<PI, R>

§

impl<PI, R> Send for State<PI, R>
where PI: Send, diff --git a/pr/2737/docs/iroh/gossip/proto/topic/struct.Stats.html b/pr/2737/docs/iroh/gossip/proto/topic/struct.Stats.html index cb044c7573..b472c602cc 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/struct.Stats.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/struct.Stats.html @@ -1,10 +1,10 @@ -Stats in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Stats

source ·
pub struct Stats {
+Stats in iroh::gossip::proto::topic - Rust

Struct iroh::gossip::proto::topic::Stats

pub struct Stats {
     pub messages_sent: usize,
     pub messages_received: usize,
 }
Expand description

Statistics for the protocol state of a topic

Fields§

§messages_sent: usize

Number of messages sent

§messages_received: usize

Number of messages received

-

Trait Implementations§

source§

impl Clone for Stats

source§

fn clone(&self) -> Stats

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 Stats

source§

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

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

impl Default for Stats

source§

fn default() -> Stats

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

Auto Trait Implementations§

§

impl Freeze for Stats

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnwindSafe for Stats

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

§

impl Clone for Stats

§

fn clone(&self) -> Stats

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 Stats

§

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

Formats the value using the given formatter. Read more
§

impl Default for Stats

§

fn default() -> Stats

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

Auto Trait Implementations§

§

impl Freeze for Stats

§

impl RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl UnwindSafe for Stats

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

§

fn implicit( diff --git a/pr/2737/docs/iroh/gossip/proto/topic/trait.IO.html b/pr/2737/docs/iroh/gossip/proto/topic/trait.IO.html index 6aaa550270..1d525a3a08 100644 --- a/pr/2737/docs/iroh/gossip/proto/topic/trait.IO.html +++ b/pr/2737/docs/iroh/gossip/proto/topic/trait.IO.html @@ -1,4 +1,4 @@ -IO in iroh::gossip::proto::topic - Rust

Trait iroh::gossip::proto::topic::IO

source ·
pub trait IO<PI>
where +IO in iroh::gossip::proto::topic - Rust

Trait iroh::gossip::proto::topic::IO

pub trait IO<PI>
where PI: Clone,
{ // Required method fn push(&mut self, event: impl Into<OutEvent<PI>>); @@ -11,10 +11,10 @@ }
Expand description

A trait for a concrete type to push OutEvents to.

The implementation is generic over this trait, which allows the upper layer to supply a container of their choice for OutEvents emitted from the protocol state.

-

Required Methods§

source

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

-

Provided Methods§

Required Methods§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

+

Provided Methods§

fn push_from_iter( &mut self, iter: impl IntoIterator<Item = impl Into<OutEvent<PI>>> )

Push all events from an iterator into the IO container

-

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<PI> IO<PI> for VecDeque<OutEvent<PI>>
where - PI: Clone,

source§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Implementors§

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<PI> IO<PI> for VecDeque<OutEvent<PI>>
where + PI: Clone,

§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Implementors§

\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/proto/trait.IO.html b/pr/2737/docs/iroh/gossip/proto/trait.IO.html index 9aabc02d3a..2564076464 100644 --- a/pr/2737/docs/iroh/gossip/proto/trait.IO.html +++ b/pr/2737/docs/iroh/gossip/proto/trait.IO.html @@ -1,4 +1,4 @@ -IO in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::IO

source ·
pub trait IO<PI>
where +IO in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::IO

pub trait IO<PI>
where PI: Clone,
{ // Required method fn push(&mut self, event: impl Into<OutEvent<PI>>); @@ -11,10 +11,10 @@ }
Expand description

A trait for a concrete type to push OutEvents to.

The implementation is generic over this trait, which allows the upper layer to supply a container of their choice for OutEvents emitted from the protocol state.

-

Required Methods§

source

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

-

Provided Methods§

Required Methods§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Push an event in the IO container

+

Provided Methods§

fn push_from_iter( &mut self, iter: impl IntoIterator<Item = impl Into<OutEvent<PI>>> )

Push all events from an iterator into the IO container

-

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<PI> IO<PI> for VecDeque<OutEvent<PI>>
where - PI: Clone,

source§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Implementors§

\ No newline at end of file +

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<PI> IO<PI> for VecDeque<OutEvent<PI>>
where + PI: Clone,

§

fn push(&mut self, event: impl Into<OutEvent<PI>>)

Implementors§

\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/proto/trait.PeerIdentity.html b/pr/2737/docs/iroh/gossip/proto/trait.PeerIdentity.html index f4d93a6aef..9184d98dc5 100644 --- a/pr/2737/docs/iroh/gossip/proto/trait.PeerIdentity.html +++ b/pr/2737/docs/iroh/gossip/proto/trait.PeerIdentity.html @@ -1,4 +1,4 @@ -PeerIdentity in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::PeerIdentity

source ·
pub trait PeerIdentity: Hash + Eq + Copy + Debug + Serialize + DeserializeOwned { }
Expand description

The identifier for a peer.

+PeerIdentity in iroh::gossip::proto - Rust

Trait iroh::gossip::proto::PeerIdentity

pub trait PeerIdentity: Hash + Eq + Copy + Debug + Serialize + DeserializeOwned { }
Expand description

The identifier for a peer.

The protocol implementation is generic over this trait. When implementing the protocol, a concrete type must be chosen that will then be used throughout the implementation to identify and index individual peers.

@@ -6,5 +6,5 @@ and index individual peers.

the protocol are only compatible if the same concrete type is supplied for this trait.

TODO: Rename to PeerId? It does not necessarily refer to a peer’s address, as long as the networking layer can translate the value of its concrete type into an address.

-

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> PeerIdentity for T
where +

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T> PeerIdentity for T

\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/proto/util/index.html b/pr/2737/docs/iroh/gossip/proto/util/index.html index c546611806..fea1d4e458 100644 --- a/pr/2737/docs/iroh/gossip/proto/util/index.html +++ b/pr/2737/docs/iroh/gossip/proto/util/index.html @@ -1,2 +1,2 @@ -iroh::gossip::proto::util - Rust

Module iroh::gossip::proto::util

source ·
Expand description

Utilities used in the protocol implementation

+iroh::gossip::proto::util - Rust

Module iroh::gossip::proto::util

Expand description

Utilities used in the protocol implementation

Structs§

\ No newline at end of file diff --git a/pr/2737/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html b/pr/2737/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html index 250e0f64e9..17c8d12a43 100644 --- a/pr/2737/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html +++ b/pr/2737/docs/iroh/gossip/proto/util/struct.TimeBoundCache.html @@ -1,18 +1,18 @@ -TimeBoundCache in iroh::gossip::proto::util - Rust

Struct iroh::gossip::proto::util::TimeBoundCache

source ·
pub struct TimeBoundCache<K, V> { /* private fields */ }
Expand description

A hash map where entries expire after a time

-

Implementations§

source§

impl<K, V> TimeBoundCache<K, V>
where - K: Hash + Eq + Clone,

source

pub fn insert(&mut self, key: K, value: V, expires: Instant)

Insert an item into the cache, marked with an expiration time.

-
source

pub fn contains_key(&self, key: &K) -> bool

Returns true if the map contains a value for the specified key.

-
source

pub fn remove(&mut self, key: &K) -> Option<V>

Remove an item from the cache.

-
source

pub fn len(&self) -> usize

Get the number of entries in the cache.

-
source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

-
source

pub fn get(&self, key: &K) -> Option<&V>

Get an item from the cache.

-
source

pub fn expires(&self, key: &K) -> Option<&Instant>

Get the expiration time for an item.

-
source

pub fn iter(&self) -> impl Iterator<Item = (&K, &V, &Instant)>

Iterate over all items in the cache.

-
source

pub fn expire_until(&mut self, instant: Instant) -> usize

Remove all entries with an expiry instant lower or equal to instant.

+TimeBoundCache in iroh::gossip::proto::util - Rust

Struct iroh::gossip::proto::util::TimeBoundCache

pub struct TimeBoundCache<K, V> { /* private fields */ }
Expand description

A hash map where entries expire after a time

+

Implementations§

§

impl<K, V> TimeBoundCache<K, V>
where + K: Hash + Eq + Clone,

pub fn insert(&mut self, key: K, value: V, expires: Instant)

Insert an item into the cache, marked with an expiration time.

+

pub fn contains_key(&self, key: &K) -> bool

Returns true if the map contains a value for the specified key.

+

pub fn remove(&mut self, key: &K) -> Option<V>

Remove an item from the cache.

+

pub fn len(&self) -> usize

Get the number of entries in the cache.

+

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

+

pub fn get(&self, key: &K) -> Option<&V>

Get an item from the cache.

+

pub fn expires(&self, key: &K) -> Option<&Instant>

Get the expiration time for an item.

+

pub fn iter(&self) -> impl Iterator<Item = (&K, &V, &Instant)>

Iterate over all items in the cache.

+

pub fn expire_until(&mut self, instant: Instant) -> usize

Remove all entries with an expiry instant lower or equal to instant.

Returns the number of items that were removed.

-

Trait Implementations§

source§

impl<K, V> Debug for TimeBoundCache<K, V>
where +

Trait Implementations§

§

impl<K, V> Debug for TimeBoundCache<K, V>
where K: Debug, - V: Debug,

source§

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

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

impl<K, V> Default for TimeBoundCache<K, V>

source§

fn default() -> TimeBoundCache<K, V>

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

Auto Trait Implementations§

§

impl<K, V> Freeze for TimeBoundCache<K, V>

§

impl<K, V> RefUnwindSafe for TimeBoundCache<K, V>
where + V: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<K, V> Default for TimeBoundCache<K, V>

§

fn default() -> TimeBoundCache<K, V>

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

Auto Trait Implementations§

§

impl<K, V> Freeze for TimeBoundCache<K, V>

§

impl<K, V> RefUnwindSafe for TimeBoundCache<K, V>

§

impl<K, V> Send for TimeBoundCache<K, V>
where K: Send, diff --git a/pr/2737/docs/iroh/gossip/proto/util/struct.TimerMap.html b/pr/2737/docs/iroh/gossip/proto/util/struct.TimerMap.html index 95b821d61b..5ff04973e9 100644 --- a/pr/2737/docs/iroh/gossip/proto/util/struct.TimerMap.html +++ b/pr/2737/docs/iroh/gossip/proto/util/struct.TimerMap.html @@ -1,16 +1,16 @@ -TimerMap in iroh::gossip::proto::util - Rust

Struct iroh::gossip::proto::util::TimerMap

source ·
pub struct TimerMap<T>(/* private fields */);
Expand description

A BTreeMap with Instant as key. Allows to process expired items.

-

Implementations§

source§

impl<T> TimerMap<T>

source

pub fn new() -> TimerMap<T>

Create a new, empty TimerMap.

-
source

pub fn insert(&mut self, instant: Instant, item: T)

Insert a new entry at the specified instant.

-
source

pub fn drain_until( +TimerMap in iroh::gossip::proto::util - Rust

Struct iroh::gossip::proto::util::TimerMap

pub struct TimerMap<T>(/* private fields */);
Expand description

A BTreeMap with Instant as key. Allows to process expired items.

+

Implementations§

§

impl<T> TimerMap<T>

pub fn new() -> TimerMap<T>

Create a new, empty TimerMap.

+

pub fn insert(&mut self, instant: Instant, item: T)

Insert a new entry at the specified instant.

+

pub fn drain_until( &mut self, from: &Instant ) -> impl Iterator<Item = (Instant, T)>

Remove and return all entries before and equal to from.

-
source

pub fn first(&self) -> Option<(&Instant, &Vec<T>)>

Get a reference to the earliest entry in the TimerMap.

-
source

pub fn iter(&self) -> impl Iterator<Item = (&Instant, &T)>

Iterate over all items in the timer map.

-
source§

impl<T> TimerMap<T>
where - T: PartialEq,

source

pub fn remove(&mut self, instant: &Instant, item: &T)

Remove an entry from the specified instant.

-

Trait Implementations§

source§

impl<T> Debug for TimerMap<T>
where - T: Debug,

source§

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

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

impl<T> Default for TimerMap<T>

source§

fn default() -> TimerMap<T>

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

Auto Trait Implementations§

§

impl<T> Freeze for TimerMap<T>

§

impl<T> RefUnwindSafe for TimerMap<T>
where +

pub fn first(&self) -> Option<(&Instant, &Vec<T>)>

Get a reference to the earliest entry in the TimerMap.

+

pub fn iter(&self) -> impl Iterator<Item = (&Instant, &T)>

Iterate over all items in the timer map.

+
§

impl<T> TimerMap<T>
where + T: PartialEq,

pub fn remove(&mut self, instant: &Instant, item: &T)

Remove an entry from the specified instant.

+

Trait Implementations§

§

impl<T> Debug for TimerMap<T>
where + T: Debug,

§

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

Formats the value using the given formatter. Read more
§

impl<T> Default for TimerMap<T>

§

fn default() -> TimerMap<T>

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

Auto Trait Implementations§

§

impl<T> Freeze for TimerMap<T>

§

impl<T> RefUnwindSafe for TimerMap<T>
where T: RefUnwindSafe,

§

impl<T> Send for TimerMap<T>
where T: Send,

§

impl<T> Sync for TimerMap<T>
where T: Sync,

§

impl<T> Unpin for TimerMap<T>

§

impl<T> UnwindSafe for TimerMap<T>
where diff --git a/pr/2737/docs/iroh/net/key/struct.PublicKey.html b/pr/2737/docs/iroh/net/key/struct.PublicKey.html index c2428f5de4..310209dc35 100644 --- a/pr/2737/docs/iroh/net/key/struct.PublicKey.html +++ b/pr/2737/docs/iroh/net/key/struct.PublicKey.html @@ -167,7 +167,7 @@ letters are used (e.g. F9B4CA)

Into<Dispatch>,

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

source§

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

§

impl<T> PeerIdentity for T

§

impl<T> RpcError for T
where T: Debug + Display + Send + Sync + Unpin + 'static,

§

impl<T> RpcMessage for T
where T: Debug + Serialize + DeserializeOwned + Send + Sync + Unpin + 'static,

source§

impl<T> RuleType for T
where diff --git a/pr/2737/docs/iroh_blobs/downloader/struct.DownloadRequest.html b/pr/2737/docs/iroh_blobs/downloader/struct.DownloadRequest.html index 6edff79a2e..ca1dc68bcf 100644 --- a/pr/2737/docs/iroh_blobs/downloader/struct.DownloadRequest.html +++ b/pr/2737/docs/iroh_blobs/downloader/struct.DownloadRequest.html @@ -1,7 +1,7 @@ DownloadRequest in iroh_blobs::downloader - Rust

Struct iroh_blobs::downloader::DownloadRequest

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

A download request.

Implementations§

source§

impl DownloadRequest

source

pub fn new( resource: impl Into<DownloadKind>, - nodes: impl IntoIterator<Item = impl Into<NodeAddr>> + nodes: impl IntoIterator<Item = impl Into<NodeAddr>> ) -> Self

Create a new download request.

It is the responsibility of the caller to ensure that the data is tagged either with a temp tag or with a persistent tag to make sure the data is not garbage collected during diff --git a/pr/2737/docs/iroh_blobs/downloader/struct.Downloader.html b/pr/2737/docs/iroh_blobs/downloader/struct.Downloader.html index 4d93aeab3b..cb2b310a41 100644 --- a/pr/2737/docs/iroh_blobs/downloader/struct.Downloader.html +++ b/pr/2737/docs/iroh_blobs/downloader/struct.Downloader.html @@ -11,7 +11,7 @@ S: Store,

Create a new Downloader with custom ConcurrencyLimits and RetryConfig.

source

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

Queue a download.

source

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

Cancel a download.

-
source

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

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

+
source

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

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

Note that this does not start a download, but only provides new nodes to already queued downloads. Use Self::queue to queue a download.

Trait Implementations§

source§

impl Clone for Downloader

source§

fn clone(&self) -> Downloader

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for Downloader

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2737/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2737/docs/iroh_blobs/downloader/trait.Dialer.html index 3438f607f4..8d8f526fa5 100644 --- a/pr/2737/docs/iroh_blobs/downloader/trait.Dialer.html +++ b/pr/2737/docs/iroh_blobs/downloader/trait.Dialer.html @@ -1,15 +1,15 @@ -Dialer in iroh_blobs::downloader - Rust

Trait iroh_blobs::downloader::Dialer

source ·
pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust

Trait iroh_blobs::downloader::Dialer

source ·
pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
     type Connection: Clone + 'static;
 
     // Required methods
-    fn queue_dial(&mut self, node_id: NodeId);
+    fn queue_dial(&mut self, node_id: NodeId);
     fn pending_count(&self) -> usize;
-    fn is_pending(&self, node: NodeId) -> bool;
-    fn node_id(&self) -> NodeId;
+    fn is_pending(&self, node: NodeId) -> bool;
+    fn node_id(&self) -> NodeId;
 }
Expand description

Trait modeling a dialer. This allows for IO-less testing.

Required Associated Types§

source

type Connection: Clone + 'static

Type of connections returned by the Dialer.

-

Required Methods§

source

fn queue_dial(&mut self, node_id: NodeId)

Dial a node.

+

Required Methods§

source

fn queue_dial(&mut self, node_id: NodeId)

Dial a node.

source

fn pending_count(&self) -> usize

Get the number of dialing nodes.

-
source

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

Check if a node is being dialed.

-
source

fn node_id(&self) -> NodeId

Get the node id of our node.

-

Implementations on Foreign Types§

source§

impl Dialer for Dialer

§

type Connection = Connection

source§

fn queue_dial(&mut self, node_id: NodeId)

source§

fn pending_count(&self) -> usize

source§

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

source§

fn node_id(&self) -> NodeId

Implementors§

\ No newline at end of file +

source

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

Check if a node is being dialed.

+
source

fn node_id(&self) -> NodeId

Get the node id of our node.

+

Implementations on Foreign Types§

source§

impl Dialer for Dialer

§

type Connection = Connection

source§

fn queue_dial(&mut self, node_id: NodeId)

source§

fn pending_count(&self) -> usize

source§

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

source§

fn node_id(&self) -> NodeId

Implementors§

\ No newline at end of file diff --git a/pr/2737/docs/iroh_blobs/enum.BlobFormat.html b/pr/2737/docs/iroh_blobs/enum.BlobFormat.html index 321167fa09..b3537141a3 100644 --- a/pr/2737/docs/iroh_blobs/enum.BlobFormat.html +++ b/pr/2737/docs/iroh_blobs/enum.BlobFormat.html @@ -1,30 +1,30 @@ -BlobFormat in iroh_blobs - Rust

Enum iroh_blobs::BlobFormat

source ·
pub enum BlobFormat {
+BlobFormat in iroh_blobs - Rust

Enum iroh_blobs::BlobFormat

pub enum BlobFormat {
     Raw,
     HashSeq,
 }
Expand description

A format identifier

Variants§

§

Raw

Raw blob

§

HashSeq

A sequence of BLAKE3 hashes

-

Implementations§

source§

impl BlobFormat

source

pub const fn is_raw(&self) -> bool

Is raw format

-
source

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

-

Trait Implementations§

source§

impl Clone for BlobFormat

source§

fn clone(&self) -> BlobFormat

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for BlobFormat

source§

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

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

impl Default for BlobFormat

source§

fn default() -> BlobFormat

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

impl<'de> Deserialize<'de> for BlobFormat

Implementations§

§

impl BlobFormat

pub const fn is_raw(&self) -> bool

Is raw format

+

pub const fn is_hash_seq(&self) -> bool

Is hash seq format

+

Trait Implementations§

§

impl Clone for BlobFormat

§

fn clone(&self) -> BlobFormat

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

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

Performs copy-assignment from source. Read more
§

impl Debug for BlobFormat

§

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

Formats the value using the given formatter. Read more
§

impl Default for BlobFormat

§

fn default() -> BlobFormat

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

impl<'de> Deserialize<'de> for BlobFormat

§

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

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

impl Display for BlobFormat

source§

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

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

impl Hash for BlobFormat

source§

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

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

impl Display for BlobFormat

§

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

Formats the value using the given formatter. Read more
§

impl Hash for BlobFormat

§

fn hash<__H>(&self, state: &mut __H)
where __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 MaxSize for BlobFormat

source§

const POSTCARD_MAX_SIZE: usize = 1usize

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

impl Ord for BlobFormat

source§

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

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

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

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

impl MaxSize for BlobFormat

§

const POSTCARD_MAX_SIZE: usize = 1usize

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

impl Ord for BlobFormat

§

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

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

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

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 BlobFormat

source§

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

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

impl PartialEq for BlobFormat

§

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

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

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

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

impl PartialOrd for BlobFormat

source§

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

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

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

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

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

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for BlobFormat

§

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

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

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

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

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

This method tests less than or equal to (for self and other) and is used by the <= 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 BlobFormat

source§

fn serialize<__S>( +operator. Read more

§

impl Serialize for BlobFormat

§

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 BlobFormat

source§

impl Eq for BlobFormat

source§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

Blanket Implementations§

source§

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

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

impl Copy for BlobFormat

§

impl Eq for BlobFormat

§

impl StructuralPartialEq for BlobFormat

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2737/docs/iroh_blobs/export/enum.ExportProgress.html index d8e7165d48..9e768a3e6e 100644 --- a/pr/2737/docs/iroh_blobs/export/enum.ExportProgress.html +++ b/pr/2737/docs/iroh_blobs/export/enum.ExportProgress.html @@ -14,7 +14,7 @@ id: u64, }, AllDone, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress events for an export operation

Variants§

§

Found

The download part is done for this id, we are now exporting the data to the specified out path.

@@ -30,7 +30,7 @@ to the specified out path.

§

Done

We finished exporting a blob

Fields

§id: u64

Unique id of the entry that is being exported.

§

AllDone

We are done with the whole operation.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

Trait Implementations§

source§

impl Clone for ExportProgress

source§

fn clone(&self) -> ExportProgress

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for ExportProgress

source§

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

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

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

source§

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

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

impl Serialize for ExportProgress

source§

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2737/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2737/docs/iroh_blobs/get/db/enum.DownloadProgress.html index 374a5163e9..12ef56ac5d 100644 --- a/pr/2737/docs/iroh_blobs/get/db/enum.DownloadProgress.html +++ b/pr/2737/docs/iroh_blobs/get/db/enum.DownloadProgress.html @@ -25,7 +25,7 @@ id: u64, }, AllDone(Stats), - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the get operation.

Variants§

§

InitialState(TransferState)

Initial state if subscribing to a running or queued transfer.

§

FoundLocal

Data was found locally.

@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.

Fields

§id: u64

The unique id of the entry.

§

AllDone(Stats)

All operations finished.

This will be the last message in the stream.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

This will be the last message in the stream.

Trait Implementations§

source§

impl Clone for DownloadProgress

source§

fn clone(&self) -> DownloadProgress

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for DownloadProgress

source§

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

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

impl<'de> Deserialize<'de> for DownloadProgress

source§

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

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

impl Serialize for DownloadProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/pr/2737/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2737/docs/iroh_blobs/metrics/struct.Metrics.html index 0026c07230..493414644a 100644 --- a/pr/2737/docs/iroh_blobs/metrics/struct.Metrics.html +++ b/pr/2737/docs/iroh_blobs/metrics/struct.Metrics.html @@ -1,20 +1,20 @@ Metrics in iroh_blobs::metrics - Rust

Struct iroh_blobs::metrics::Metrics

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

Enum of metrics for the module

-

Fields§

§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

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

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

impl Default for Metrics

source§

fn default() -> Self

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

impl Iterable for Metrics

source§

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

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

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

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

Initializes this metric group.
source§

fn with_metric<T, F>(f: F)
where +

Fields§

§download_bytes_total: Counter§download_time_total: Counter§downloads_success: Counter§downloads_error: Counter§downloads_notfound: Counter§downloader_tick_main: Counter§downloader_tick_connection_ready: Counter§downloader_tick_message_received: Counter§downloader_tick_transfer_completed: Counter§downloader_tick_transfer_failed: Counter§downloader_tick_retry_node: Counter§downloader_tick_goodbye_node: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

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

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

impl Default for Metrics

source§

fn default() -> Self

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

impl Iterable for Metrics

source§

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

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

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

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

Initializes this metric group.
§

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

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

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

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

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

§

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

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2737/docs/iroh_blobs/provider/enum.AddProgress.html index 5e58a9b301..3e952fa7cf 100644 --- a/pr/2737/docs/iroh_blobs/provider/enum.AddProgress.html +++ b/pr/2737/docs/iroh_blobs/provider/enum.AddProgress.html @@ -17,7 +17,7 @@ format: BlobFormat, tag: Tag, }, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the add operation.

Variants§

§

Found

An item was found with name name, from now on referred to via id

Fields

§id: u64

A new unique id for this entry.

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

Fields

§hash: Hash

The hash of the created data.

§format: BlobFormat

The format of the added data.

§tag: Tag

The tag of the added data.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

This will be the last message in the stream.

Trait Implementations§

source§

impl Debug for AddProgress

source§

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

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

impl<'de> Deserialize<'de> for AddProgress

source§

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

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

impl Serialize for AddProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/pr/2737/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2737/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html index 4ba5c8d0cc..749ec5d972 100644 --- a/pr/2737/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html +++ b/pr/2737/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html @@ -8,7 +8,7 @@ Done { hash: Hash, }, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the batch add operation.

Variants§

§

Found

An item was found with the given size

Fields

§size: u64

The size of the entry in bytes.

@@ -16,7 +16,7 @@

Fields

§offset: u64

The offset of the progress, in bytes.

§

Done

We are done, and the hash is hash.

Fields

§hash: Hash

The hash of the entry.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

This will be the last message in the stream.

Trait Implementations§

source§

impl Debug for BatchAddPathProgress

source§

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

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

impl<'de> Deserialize<'de> for BatchAddPathProgress

source§

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

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

impl Serialize for BatchAddPathProgress

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/pr/2737/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2737/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html index a178d09dc1..e83e6eee47 100644 --- a/pr/2737/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html +++ b/pr/2737/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html @@ -6,7 +6,7 @@ level: ReportLevel, }, Done, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the validate operation

Variants§

§

Start

Consistency check started

§

Update

Consistency check update

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

The entry this message is about, if any

§level: ReportLevel

The level of the message

§

Done

Consistency check ended

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

Trait Implementations§

source§

impl Debug for ConsistencyCheckProgress

source§

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

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

impl<'de> Deserialize<'de> for ConsistencyCheckProgress

source§

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

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

impl Serialize for ConsistencyCheckProgress

source§

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2737/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2737/docs/iroh_blobs/store/enum.ValidateProgress.html index 3fd8bbeaa3..7bbb9311cd 100644 --- a/pr/2737/docs/iroh_blobs/store/enum.ValidateProgress.html +++ b/pr/2737/docs/iroh_blobs/store/enum.ValidateProgress.html @@ -31,7 +31,7 @@ ranges: RangeSpec, }, AllDone, - Abort(RpcError), + Abort(RpcError), }
Expand description

Progress updates for the validate operation

Variants§

§

Starting

started validating

Fields

§total: u64

The total number of entries to validate

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

Fields

§id: u64

The unique id of the entry.

§ranges: RangeSpec

Available ranges.

§

AllDone

We are done with the whole operation.

-
§

Abort(RpcError)

We got an error and need to abort.

+
§

Abort(RpcError)

We got an error and need to abort.

Trait Implementations§

source§

impl Debug for ValidateProgress

source§

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

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

impl<'de> Deserialize<'de> for ValidateProgress

source§

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

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

impl Serialize for ValidateProgress

source§

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2737/docs/iroh_blobs/struct.Hash.html b/pr/2737/docs/iroh_blobs/struct.Hash.html index 05b45be943..d0e62f13d7 100644 --- a/pr/2737/docs/iroh_blobs/struct.Hash.html +++ b/pr/2737/docs/iroh_blobs/struct.Hash.html @@ -1,36 +1,36 @@ -Hash in iroh_blobs - Rust

Struct iroh_blobs::Hash

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

Hash type used throughout.

-

Implementations§

source§

impl Hash

source

pub const EMPTY: Hash = _

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

-
source

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

Calculate the hash of the provided bytes.

-
source

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

Bytes of the hash.

-
source

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

Create a Hash from its raw bytes representation.

-
source

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

-
source

pub fn fmt_short(&self) -> String

Convert to a base32 string limited to the first 10 bytes for a friendly string +Hash in iroh_blobs - Rust

Struct iroh_blobs::Hash

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

Hash type used throughout.

+

Implementations§

§

impl Hash

pub const EMPTY: Hash = _

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

+

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

Calculate the hash of the provided bytes.

+

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

Bytes of the hash.

+

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

Create a Hash from its raw bytes representation.

+

pub fn to_hex(&self) -> String

Convert the hash to a hex string.

+

pub fn fmt_short(&self) -> String

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

-

Trait Implementations§

source§

impl AsRef<[u8]> for Hash

source§

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

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

impl Borrow<[u8]> for Hash

source§

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

Immutably borrows from an owned value. Read more
source§

impl Borrow<[u8; 32]> for Hash

source§

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

Immutably borrows from an owned value. Read more
source§

impl Clone for Hash

source§

fn clone(&self) -> Hash

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for Hash

source§

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

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

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

Trait Implementations§

§

impl AsRef<[u8]> for Hash

§

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

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

impl Borrow<[u8]> for Hash

§

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

Immutably borrows from an owned value. Read more
§

impl Borrow<[u8; 32]> for Hash

§

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

Immutably borrows from an owned value. Read more
§

impl Clone for Hash

§

fn clone(&self) -> Hash

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

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

Performs copy-assignment from source. Read more
§

impl Debug for Hash

§

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

Formats the value using the given formatter. Read more
§

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

§

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

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

impl Display for Hash

source§

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

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

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

source§

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

Converts to this type from the input type.
source§

impl From<[u8; 32]> for Hash

source§

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

Converts to this type from the input type.
source§

impl From<Hash> for [u8; 32]

source§

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

Converts to this type from the input type.
source§

impl From<Hash> for Hash

source§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromIterator<Hash> for HashSeq

source§

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

Creates a value from an iterator. Read more
source§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

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

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

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

impl Hash for Hash

source§

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

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

impl Display for Hash

§

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

Formats the value using the given formatter. Read more
§

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

§

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

Converts to this type from the input type.
§

impl From<[u8; 32]> for Hash

§

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

Converts to this type from the input type.
§

impl From<Hash> for [u8; 32]

§

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

Converts to this type from the input type.
§

impl From<Hash> for Hash

§

fn from(value: Hash) -> Hash

Converts to this type from the input type.
source§

impl FromIterator<Hash> for HashSeq

source§

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

Creates a value from an iterator. Read more
§

impl FromStr for Hash

§

type Err = HexOrBase32ParseError

The associated error which can be returned from parsing.
§

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

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

impl Hash for Hash

§

fn hash<__H>(&self, state: &mut __H)
where __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 Key for Hash

source§

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

Compare data1 with data2
source§

impl MaxSize for Hash

source§

const POSTCARD_MAX_SIZE: usize = 32usize

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

impl Ord for Hash

source§

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

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

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

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

impl Key for Hash

§

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

Compare data1 with data2
§

impl MaxSize for Hash

§

const POSTCARD_MAX_SIZE: usize = 32usize

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

impl Ord for Hash

§

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

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

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

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 Hash

source§

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

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

Restrict a value to a certain interval. Read more

§

impl PartialEq for Hash

§

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

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

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

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

impl PartialOrd for Hash

source§

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

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

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

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

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

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for Hash

§

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

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

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

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

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

This method tests less than or equal to (for self and other) and is used by the <= 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 Hash

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for Hash

§

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 Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

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

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

impl Value for Hash

§

type SelfType<'a> = Hash

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = &'a [u8; 32]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

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

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

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

§

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

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type

source§

impl Copy for Hash

source§

impl Eq for Hash

source§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

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

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for Hash

§

impl Eq for Hash

§

impl StructuralPartialEq for Hash

Auto Trait Implementations§

§

impl Freeze for Hash

§

impl RefUnwindSafe for Hash

§

impl Send for Hash

§

impl Sync for Hash

§

impl Unpin for Hash

§

impl UnwindSafe for Hash

Blanket Implementations§

source§

impl<T> Any for T
where 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/2737/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2737/docs/iroh_blobs/struct.HashAndFormat.html index 03e00e1367..bbbab68743 100644 --- a/pr/2737/docs/iroh_blobs/struct.HashAndFormat.html +++ b/pr/2737/docs/iroh_blobs/struct.HashAndFormat.html @@ -1,37 +1,37 @@ -HashAndFormat in iroh_blobs - Rust

Struct iroh_blobs::HashAndFormat

source ·
pub struct HashAndFormat {
+HashAndFormat in iroh_blobs - Rust

Struct iroh_blobs::HashAndFormat

pub struct HashAndFormat {
     pub hash: Hash,
     pub format: BlobFormat,
 }
Expand description

A hash and format pair

Fields§

§hash: Hash

The hash

§format: BlobFormat

The format

-

Implementations§

source§

impl HashAndFormat

source

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

Create a new hash and format pair.

-
source

pub fn raw(hash: Hash) -> HashAndFormat

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

-
source

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

-

Trait Implementations§

source§

impl Clone for HashAndFormat

source§

fn clone(&self) -> HashAndFormat

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for HashAndFormat

source§

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

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

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

Implementations§

§

impl HashAndFormat

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

Create a new hash and format pair.

+

pub fn raw(hash: Hash) -> HashAndFormat

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

+

pub fn hash_seq(hash: Hash) -> HashAndFormat

Create a new hash and format pair, using the collection format.

+

Trait Implementations§

§

impl Clone for HashAndFormat

§

fn clone(&self) -> HashAndFormat

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

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

Performs copy-assignment from source. Read more
§

impl Debug for HashAndFormat

§

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

Formats the value using the given formatter. Read more
§

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

§

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

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

impl Display for HashAndFormat

source§

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

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

impl From<DownloadKind> for HashAndFormat

source§

fn from(value: DownloadKind) -> Self

Converts to this type from the input type.
source§

impl From<HashAndFormat> for DownloadKind

source§

fn from(value: HashAndFormat) -> Self

Converts to this type from the input type.
source§

impl FromStr for HashAndFormat

§

type Err = Error

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

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

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

impl Hash for HashAndFormat

source§

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

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

impl Display for HashAndFormat

§

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

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

impl From<DownloadKind> for HashAndFormat

source§

fn from(value: DownloadKind) -> Self

Converts to this type from the input type.
source§

impl From<HashAndFormat> for DownloadKind

source§

fn from(value: HashAndFormat) -> Self

Converts to this type from the input type.
§

impl FromStr for HashAndFormat

§

type Err = Error

The associated error which can be returned from parsing.
§

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

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

impl Hash for HashAndFormat

§

fn hash<__H>(&self, state: &mut __H)
where __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 MaxSize for HashAndFormat

source§

const POSTCARD_MAX_SIZE: usize = 33usize

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

impl Ord for HashAndFormat

source§

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

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

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

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

impl MaxSize for HashAndFormat

§

const POSTCARD_MAX_SIZE: usize = 33usize

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

impl Ord for HashAndFormat

§

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

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

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

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 HashAndFormat

source§

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

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

Restrict a value to a certain interval. Read more
§

impl PartialEq for HashAndFormat

§

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

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

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

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

impl PartialOrd for HashAndFormat

source§

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

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

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

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

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

This method tests less than or equal to (for self and other) and is used by the <= +sufficient, and should not be overridden without very good reason.
§

impl PartialOrd for HashAndFormat

§

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

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

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

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

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

This method tests less than or equal to (for self and other) and is used by the <= 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 HashAndFormat

source§

fn serialize<S>( +operator. Read more

§

impl Serialize for HashAndFormat

§

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 Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

source§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
source§

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

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

impl Value for HashAndFormat

§

type SelfType<'a> = HashAndFormat

SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a
§

type AsBytes<'a> = [u8; 33]

§

fn fixed_width() -> Option<usize>

Width of a fixed type, or None for variable width
§

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

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

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

§

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

Serialize the value to a slice
source§

fn type_name() -> TypeName

Globally unique identifier for this type

source§

impl Copy for HashAndFormat

source§

impl Eq for HashAndFormat

source§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

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

Serialize the value to a slice
§

fn type_name() -> TypeName

Globally unique identifier for this type
§

impl Copy for HashAndFormat

§

impl Eq for HashAndFormat

§

impl StructuralPartialEq for HashAndFormat

Auto Trait Implementations§

Blanket Implementations§

source§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh_gossip/metrics/struct.Metrics.html b/pr/2737/docs/iroh_gossip/metrics/struct.Metrics.html index 8015a055b5..7e32b614fe 100644 --- a/pr/2737/docs/iroh_gossip/metrics/struct.Metrics.html +++ b/pr/2737/docs/iroh_gossip/metrics/struct.Metrics.html @@ -1,26 +1,26 @@ Metrics in iroh_gossip::metrics - Rust

Struct iroh_gossip::metrics::Metrics

source ·
pub struct Metrics {
Show 18 fields - pub msgs_ctrl_sent: Counter, - pub msgs_ctrl_recv: Counter, - pub msgs_data_sent: Counter, - pub msgs_data_recv: Counter, - pub msgs_data_sent_size: Counter, - pub msgs_data_recv_size: Counter, - pub msgs_ctrl_sent_size: Counter, - pub msgs_ctrl_recv_size: Counter, - pub neighbor_up: Counter, - pub neighbor_down: Counter, - pub actor_tick_main: Counter, - pub actor_tick_rx: Counter, - pub actor_tick_endpoint: Counter, - pub actor_tick_dialer: Counter, - pub actor_tick_dialer_success: Counter, - pub actor_tick_dialer_failure: Counter, - pub actor_tick_in_event_rx: Counter, - pub actor_tick_timers: Counter, + pub msgs_ctrl_sent: Counter, + pub msgs_ctrl_recv: Counter, + pub msgs_data_sent: Counter, + pub msgs_data_recv: Counter, + pub msgs_data_sent_size: Counter, + pub msgs_data_recv_size: Counter, + pub msgs_ctrl_sent_size: Counter, + pub msgs_ctrl_recv_size: Counter, + pub neighbor_up: Counter, + pub neighbor_down: Counter, + pub actor_tick_main: Counter, + pub actor_tick_rx: Counter, + pub actor_tick_endpoint: Counter, + pub actor_tick_dialer: Counter, + pub actor_tick_dialer_success: Counter, + pub actor_tick_dialer_failure: Counter, + pub actor_tick_in_event_rx: Counter, + pub actor_tick_timers: Counter,
}
Expand description

Enum of metrics for the module

-

Fields§

§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

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

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

impl Default for Metrics

source§

fn default() -> Self

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

impl Iterable for Metrics

source§

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

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

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
§

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

Initializes this metric group.
§

fn with_metric<T, F>(f: F)
where +

Fields§

§msgs_ctrl_sent: Counter§msgs_ctrl_recv: Counter§msgs_data_sent: Counter§msgs_data_recv: Counter§msgs_data_sent_size: Counter§msgs_data_recv_size: Counter§msgs_ctrl_sent_size: Counter§msgs_ctrl_recv_size: Counter§neighbor_up: Counter§neighbor_down: Counter§actor_tick_main: Counter§actor_tick_rx: Counter§actor_tick_endpoint: Counter§actor_tick_dialer: Counter§actor_tick_dialer_success: Counter§actor_tick_dialer_failure: Counter§actor_tick_in_event_rx: Counter§actor_tick_timers: Counter

Trait Implementations§

source§

impl Clone for Metrics

source§

fn clone(&self) -> Metrics

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

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

Performs copy-assignment from source. Read more
source§

impl Debug for Metrics

source§

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

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

impl Default for Metrics

source§

fn default() -> Self

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

impl Iterable for Metrics

source§

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

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

impl Metric for Metrics

source§

fn name() -> &'static str

The name of this metric group.
source§

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

Initializes this metric group.
source§

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

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

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

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

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

Attempts to get the current metric from the global registry.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

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

§

fn implicit( diff --git a/pr/2737/docs/iroh_gossip/net/enum.Command.html b/pr/2737/docs/iroh_gossip/net/enum.Command.html index 17bff52107..a4b86d9985 100644 --- a/pr/2737/docs/iroh_gossip/net/enum.Command.html +++ b/pr/2737/docs/iroh_gossip/net/enum.Command.html @@ -1,11 +1,11 @@ Command in iroh_gossip::net - Rust

Enum iroh_gossip::net::Command

source ·
pub enum Command {
     Broadcast(Bytes),
     BroadcastNeighbors(Bytes),
-    JoinPeers(Vec<NodeId>),
+    JoinPeers(Vec<NodeId>),
 }
Expand description

Send a gossip message

Variants§

§

Broadcast(Bytes)

Broadcast a message to all nodes in the swarm

§

BroadcastNeighbors(Bytes)

Broadcast a message to all direct neighbors

-
§

JoinPeers(Vec<NodeId>)

Connect to a set of peers

+
§

JoinPeers(Vec<NodeId>)

Connect to a set of peers

Trait Implementations§

source§

impl Debug for Command

source§

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

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

impl<'de> Deserialize<'de> for Command

source§

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

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

impl Serialize for Command

source§

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where diff --git a/pr/2737/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2737/docs/iroh_gossip/net/enum.GossipEvent.html index c978f99eec..ba59c3df51 100644 --- a/pr/2737/docs/iroh_gossip/net/enum.GossipEvent.html +++ b/pr/2737/docs/iroh_gossip/net/enum.GossipEvent.html @@ -1,17 +1,17 @@ GossipEvent in iroh_gossip::net - Rust

Enum iroh_gossip::net::GossipEvent

source ·
pub enum GossipEvent {
-    Joined(Vec<NodeId>),
-    NeighborUp(NodeId),
-    NeighborDown(NodeId),
+    Joined(Vec<NodeId>),
+    NeighborUp(NodeId),
+    NeighborDown(NodeId),
     Received(Message),
 }
Expand description

Events emitted from a gossip topic.

These are the events emitted from a GossipReceiver, wrapped in Event::Gossip.

-

Variants§

§

Joined(Vec<NodeId>)

We joined the topic with at least one peer.

+

Variants§

§

Joined(Vec<NodeId>)

We joined the topic with at least one peer.

This is the first event on a GossipReceiver and will only be emitted once.

-
§

NeighborUp(NodeId)

We have a new, direct neighbor in the swarm membership layer for this topic.

-
§

NeighborDown(NodeId)

We dropped direct neighbor in the swarm membership layer for this topic.

+
§

NeighborUp(NodeId)

We have a new, direct neighbor in the swarm membership layer for this topic.

+
§

NeighborDown(NodeId)

We dropped direct neighbor in the swarm membership layer for this topic.

§

Received(Message)

We received a gossip message for this topic.

Trait Implementations§

source§

impl Clone for GossipEvent

source§

fn clone(&self) -> GossipEvent

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 GossipEvent

source§

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

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

impl<'de> Deserialize<'de> for GossipEvent

source§

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

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

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<NodeId>) -> Self

Converts to this type from the input type.
source§

impl Ord for GossipEvent

source§

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

source§

fn from(event: Event<NodeId>) -> Self

Converts to this type from the input type.
source§

impl Ord for GossipEvent

source§

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

source§

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

This method tests for self and other values to be equal, and is used diff --git a/pr/2737/docs/iroh_gossip/net/struct.Gossip.html b/pr/2737/docs/iroh_gossip/net/struct.Gossip.html index ee0252cc06..80f0a25919 100644 --- a/pr/2737/docs/iroh_gossip/net/struct.Gossip.html +++ b/pr/2737/docs/iroh_gossip/net/struct.Gossip.html @@ -1,7 +1,7 @@ Gossip in iroh_gossip::net - Rust

Struct iroh_gossip::net::Gossip

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

Publish and subscribe on gossiping topics.

Each topic is a separate broadcast tree with separate memberships.

A topic has to be joined before you can publish or subscribe on the topic. -To join the swarm for a topic, you have to know the [PublicKey] of at least one peer that also joined the topic.

+To join the swarm for a topic, you have to know the PublicKey of at least one peer that also joined the topic.

Messages published on the swarm will be delivered to all peers that joined the swarm for that topic. You will also be relaying (gossiping) messages published by other peers.

With the default settings, the protocol will maintain up to 5 peer connections per topic.

@@ -13,7 +13,7 @@ gossip actor through

Implementations§

source§

impl Gossip

source

pub fn from_endpoint( endpoint: Endpoint, config: Config, - my_addr: &AddrInfo + my_addr: &AddrInfo ) -> Self

Spawn a gossip actor and get a handle for it

source

pub fn max_message_size(&self) -> usize

Get the maximum message size configured for this gossip actor.

source

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

Handle an incoming [Connection].

@@ -21,7 +21,7 @@ gossip actor through
source

pub async fn join( &self, topic_id: TopicId, - bootstrap: Vec<NodeId> + bootstrap: Vec<NodeId> ) -> Result<GossipTopic>

Join a gossip topic with the default options and wait for at least one active connection.

source

pub fn join_with_opts( &self, diff --git a/pr/2737/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2737/docs/iroh_gossip/net/struct.GossipReceiver.html index 0a5f12add5..b95383532b 100644 --- a/pr/2737/docs/iroh_gossip/net/struct.GossipReceiver.html +++ b/pr/2737/docs/iroh_gossip/net/struct.GossipReceiver.html @@ -1,6 +1,6 @@ GossipReceiver in iroh_gossip::net - Rust

Struct iroh_gossip::net::GossipReceiver

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

Receiver for gossip events on a topic.

This is a [Stream] of Events emitted from the topic.

-

Implementations§

source§

impl GossipReceiver

source

pub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_

Lists our current direct neighbors.

+

Implementations§

source§

impl GossipReceiver

source

pub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_

Lists our current direct neighbors.

source

pub async fn joined(&mut self) -> Result<()>

Waits until we are connected to at least one node.

This progresses the stream until we received GossipEvent::Joined, which is the first item emitted on the stream.

diff --git a/pr/2737/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2737/docs/iroh_gossip/net/struct.GossipSender.html index 783525ffda..516f9a8776 100644 --- a/pr/2737/docs/iroh_gossip/net/struct.GossipSender.html +++ b/pr/2737/docs/iroh_gossip/net/struct.GossipSender.html @@ -1,7 +1,7 @@ GossipSender in iroh_gossip::net - Rust

Struct iroh_gossip::net::GossipSender

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

Sender for a gossip topic.

Implementations§

source§

impl GossipSender

source

pub async fn broadcast(&self, message: Bytes) -> Result<()>

Broadcast a message to all nodes.

source

pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>

Broadcast a message to our direct neighbors.

-
source

pub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>

Join a set of peers.

+
source

pub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>

Join a set of peers.

Trait Implementations§

source§

impl Debug for GossipSender

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where 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> AsTaggedImplicit<'a, E> for T
where diff --git a/pr/2737/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2737/docs/iroh_gossip/net/struct.JoinOptions.html index 7b6f3def1e..b17040bbe7 100644 --- a/pr/2737/docs/iroh_gossip/net/struct.JoinOptions.html +++ b/pr/2737/docs/iroh_gossip/net/struct.JoinOptions.html @@ -1,14 +1,14 @@ JoinOptions in iroh_gossip::net - Rust

Struct iroh_gossip::net::JoinOptions

source ·
pub struct JoinOptions {
-    pub bootstrap: BTreeSet<NodeId>,
+    pub bootstrap: BTreeSet<NodeId>,
     pub subscription_capacity: usize,
 }
Expand description

Options for joining a gossip topic.

-

Fields§

§bootstrap: BTreeSet<NodeId>

The initial bootstrap nodes

+

Fields§

§bootstrap: BTreeSet<NodeId>

The initial bootstrap nodes

§subscription_capacity: usize

The maximum number of messages that can be buffered in a subscription.

If this limit is reached, the subscriber will receive a Lagged response, the message will be dropped, and the subscriber will be closed.

This is to prevent a single slow subscriber from blocking the dispatch loop. If a subscriber is lagging, it should be closed and re-opened.

-

Implementations§

source§

impl JoinOptions

source

pub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self

Creates JoinOptions with the provided bootstrap nodes and the default subscription +

Implementations§

source§

impl JoinOptions

source

pub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self

Creates JoinOptions with the provided bootstrap nodes and the default subscription capacity.

Trait Implementations§

source§

impl Debug for JoinOptions

source§

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

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

impl<'de> Deserialize<'de> for JoinOptions

source§

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

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

impl Serialize for JoinOptions

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where diff --git a/pr/2737/docs/iroh_gossip/net/struct.Message.html b/pr/2737/docs/iroh_gossip/net/struct.Message.html index b91b14c1a4..c912230a9b 100644 --- a/pr/2737/docs/iroh_gossip/net/struct.Message.html +++ b/pr/2737/docs/iroh_gossip/net/struct.Message.html @@ -1,12 +1,12 @@ Message in iroh_gossip::net - Rust

Struct iroh_gossip::net::Message

source ·
pub struct Message {
     pub content: Bytes,
     pub scope: DeliveryScope,
-    pub delivered_from: NodeId,
+    pub delivered_from: NodeId,
 }
Expand description

A gossip message

Fields§

§content: Bytes

The content of the message

§scope: DeliveryScope

The scope of the message. This tells us if the message is from a direct neighbor or actual gossip.

-
§delivered_from: NodeId

The node that delivered the message. This is not the same as the original author.

+
§delivered_from: NodeId

The node that delivered the message. This is not the same as the original author.

Trait Implementations§

source§

impl Clone for Message

source§

fn clone(&self) -> Message

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 Message

source§

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

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

impl<'de> Deserialize<'de> for Message

source§

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

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

impl Ord for Message

source§

fn cmp(&self, other: &Message) -> 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 diff --git a/pr/2737/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2737/docs/iroh_gossip/net/type.ProtoCommand.html index c92491335f..0d11377502 100644 --- a/pr/2737/docs/iroh_gossip/net/type.ProtoCommand.html +++ b/pr/2737/docs/iroh_gossip/net/type.ProtoCommand.html @@ -1,9 +1,9 @@ -ProtoCommand in iroh_gossip::net - Rust

Type Alias iroh_gossip::net::ProtoCommand

source ·
pub type ProtoCommand = Command<PublicKey>;
Expand description

Commands for the gossip protocol

+ProtoCommand in iroh_gossip::net - Rust

Type Alias iroh_gossip::net::ProtoCommand

source ·
pub type ProtoCommand = Command<PublicKey>;
Expand description

Commands for the gossip protocol

Aliased Type§

enum ProtoCommand {
-    Join(Vec<PublicKey>),
+    Join(Vec<PublicKey>),
     Broadcast(Bytes, Scope),
     Quit,
-}

Variants§

§

Join(Vec<PublicKey>)

Join this topic and connect to peers.

+}

Variants§

§

Join(Vec<PublicKey>)

Join this topic and connect to peers.

If the list of peers is empty, will prepare the state and accept incoming join requests, but only become operational after the first join request by another peer.

§

Broadcast(Bytes, Scope)

Broadcast a message for this topic.

diff --git a/pr/2737/docs/iroh_gossip/net/type.ProtoEvent.html b/pr/2737/docs/iroh_gossip/net/type.ProtoEvent.html index ab83aa1b4b..50f405bc20 100644 --- a/pr/2737/docs/iroh_gossip/net/type.ProtoEvent.html +++ b/pr/2737/docs/iroh_gossip/net/type.ProtoEvent.html @@ -1,9 +1,9 @@ -ProtoEvent in iroh_gossip::net - Rust

Type Alias iroh_gossip::net::ProtoEvent

source ·
pub type ProtoEvent = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

+ProtoEvent in iroh_gossip::net - Rust

Type Alias iroh_gossip::net::ProtoEvent

source ·
pub type ProtoEvent = Event<PublicKey>;
Expand description

Events emitted from the gossip protocol

Aliased Type§

enum ProtoEvent {
-    NeighborUp(PublicKey),
-    NeighborDown(PublicKey),
-    Received(GossipEvent<PublicKey>),
-}

Variants§

§

NeighborUp(PublicKey)

We have a new, direct neighbor in the swarm membership layer for this topic

-
§

NeighborDown(PublicKey)

We dropped direct neighbor in the swarm membership layer for this topic

-
§

Received(GossipEvent<PublicKey>)

A gossip message was received for this topic

+ NeighborUp(PublicKey), + NeighborDown(PublicKey), + Received(GossipEvent<PublicKey>), +}

Variants§

§

NeighborUp(PublicKey)

We have a new, direct neighbor in the swarm membership layer for this topic

+
§

NeighborDown(PublicKey)

We dropped direct neighbor in the swarm membership layer for this topic

+
§

Received(GossipEvent<PublicKey>)

A gossip message was received for this topic

\ No newline at end of file diff --git a/pr/2737/docs/iroh_gossip/net/util/fn.read_message.html b/pr/2737/docs/iroh_gossip/net/util/fn.read_message.html index ab218b95bc..d506996a91 100644 --- a/pr/2737/docs/iroh_gossip/net/util/fn.read_message.html +++ b/pr/2737/docs/iroh_gossip/net/util/fn.read_message.html @@ -2,5 +2,5 @@ reader: impl AsyncRead + Unpin, buffer: &mut BytesMut, max_message_size: usize -) -> Result<Option<Message<PublicKey>>>
Expand description

Read a length-prefixed message and decode as ProtoMessage;

+) -> Result<Option<Message<PublicKey>>>
Expand description

Read a length-prefixed message and decode as ProtoMessage;

\ No newline at end of file diff --git a/pr/2737/docs/iroh_gossip/net/util/fn.write_message.html b/pr/2737/docs/iroh_gossip/net/util/fn.write_message.html index bf27476e54..bd7f2eda0f 100644 --- a/pr/2737/docs/iroh_gossip/net/util/fn.write_message.html +++ b/pr/2737/docs/iroh_gossip/net/util/fn.write_message.html @@ -1,7 +1,7 @@ write_message in iroh_gossip::net::util - Rust

Function iroh_gossip::net::util::write_message

source ·
pub async fn write_message<W: AsyncWrite + Unpin>(
     writer: &mut W,
     buffer: &mut BytesMut,
-    frame: &Message<PublicKey>,
+    frame: &Message<PublicKey>,
     max_message_size: usize
 ) -> Result<()>
Expand description

Write a ProtoMessage as a length-prefixed, postcard-encoded message.

\ No newline at end of file diff --git a/pr/2737/docs/iroh_gossip/proto/topic/enum.Event.html b/pr/2737/docs/iroh_gossip/proto/topic/enum.Event.html index aac02859bc..dc9cad9699 100644 --- a/pr/2737/docs/iroh_gossip/proto/topic/enum.Event.html +++ b/pr/2737/docs/iroh_gossip/proto/topic/enum.Event.html @@ -8,7 +8,7 @@
§

Received(GossipEvent<PI>)

A gossip message was received for this topic

Trait Implementations§

source§

impl<PI: Clone> Clone for Event<PI>

source§

fn clone(&self) -> Event<PI>

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<PI: Debug> Debug for Event<PI>

source§

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

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

impl<'de, PI> Deserialize<'de> for Event<PI>
where PI: Deserialize<'de>,

source§

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

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

impl From<Event<PublicKey>> for GossipEvent

source§

fn from(event: Event<NodeId>) -> Self

Converts to this type from the input type.
source§

impl<PI: Ord> Ord for Event<PI>

source§

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

source§

fn from(event: Event<NodeId>) -> Self

Converts to this type from the input type.
source§

impl<PI: Ord> Ord for Event<PI>

source§

fn cmp(&self, other: &Event<PI>) -> 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<PI: PartialEq> PartialEq for Event<PI>

source§

fn eq(&self, other: &Event<PI>) -> bool

This method tests for self and other values to be equal, and is used diff --git a/pr/2737/docs/iroh_relay/struct.Config.html b/pr/2737/docs/iroh_relay/struct.Config.html index e383c32214..95a7a9161d 100644 --- a/pr/2737/docs/iroh_relay/struct.Config.html +++ b/pr/2737/docs/iroh_relay/struct.Config.html @@ -1,5 +1,5 @@ Config in iroh_relay - Rust

Struct iroh_relay::Config

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

Configuration for the relay-server.

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

-

Fields§

§secret_key: SecretKey

The iroh SecretKey for this relay server.

+

Fields§

§secret_key: SecretKey

The iroh [SecretKey] for this relay server.

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

§enable_relay: bool

Whether to enable the Relay server.

diff --git a/pr/2737/docs/settings.html b/pr/2737/docs/settings.html index dcb803baf3..307c2f28a2 100644 --- a/pr/2737/docs/settings.html +++ b/pr/2737/docs/settings.html @@ -1 +1 @@ -Settings

Rustdoc settings

Back
\ No newline at end of file +Settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/pr/2737/docs/trait.impl/core/convert/trait.From.js b/pr/2737/docs/trait.impl/core/convert/trait.From.js index 72368f7e56..970104a420 100644 --- a/pr/2737/docs/trait.impl/core/convert/trait.From.js +++ b/pr/2737/docs/trait.impl/core/convert/trait.From.js @@ -3,6 +3,6 @@ "iroh_base":[["impl From<&[u8; 32]> for Hash"],["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["impl From<FromHexError> for HexOrBase32ParseError"],["impl From<HexOrBase32ParseError> for KeyParsingError"],["impl From<BlobFormat> for u64"],["impl From<Error> for RpcError"],["impl From<Error> for RpcError"],["impl From<Url> for RelayUrl"],["impl From<DecodeError> for HexOrBase32ParseError"],["impl From<DecodeError> for Error"],["impl From<Hash> for Hash"],["impl From<Hash> for [u8; 32]"],["impl From<PublicKey> for NodeAddr"],["impl From<NodeAddr> for NodeTicket"],["impl From<RelayUrl> for Url"],["impl From<NodeTicket> for NodeAddr"],["impl From<Error> for KeyParsingError"],["impl From<Error> for Error"],["impl From<Hash> for Hash"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for Hash"],["impl From<[u8; 32]> for SecretKey"]], "iroh_blobs":[["impl From<&str> for Tag"],["impl From<(AtBlobContent, Result<BaoContentItem, DecodeError>)> for BlobContentNext"],["impl From<BlobId> for u64"],["impl From<GetResponseError> for Error"],["impl From<GetError> for FailureAction"],["impl From<AtBlobHeaderNextError> for GetError"],["impl From<AtBlobHeaderNextError> for DecodeError"],["impl From<AtBlobHeaderNextError> for Error"],["impl From<ConnectedNextError> for GetError"],["impl From<ConnectedNextError> for Error"],["impl From<DecodeError> for GetError"],["impl From<DecodeError> for Error"],["impl From<Closed> for VarInt"],["impl From<SpawnError> for Error"],["impl From<ProgressSendError> for GetError"],["impl From<ProgressSendError> for Error"],["impl From<String> for Tag"],["impl From<Vec<u8>> for SparseMemFile"],["impl From<Error> for GetError"],["impl From<Error> for DecodeError"],["impl From<Error> for GetResponseError"],["impl From<DownloadKind> for HashAndFormat"],["impl From<AtClosing> for ConnectedNext"],["impl From<AtClosing> for EndBlobNext"],["impl From<AtEndBlob> for BlobContentNext"],["impl From<AtStartChild> for ConnectedNext"],["impl From<AtStartChild> for EndBlobNext"],["impl From<AtStartRoot> for ConnectedNext"],["impl From<HashSeq> for Bytes"],["impl From<GetRequest> for Request"],["impl From<HashAndFormat> for DownloadKind"],["impl From<Tag> for Bytes"],["impl From<Bytes> for Tag"],["impl From<ClosedStream> for GetError"],["impl From<ClosedStream> for ConnectedNextError"],["impl From<ConnectionError> for GetResponseError"],["impl From<ConnectionError> for GetError"],["impl From<DecodeError> for GetResponseError"],["impl From<DecodeError> for DecodeError"],["impl From<Error> for GetResponseError"],["impl From<ReadError> for GetResponseError"],["impl From<ReadError> for GetError"],["impl From<WriteError> for GetResponseError"],["impl From<WriteError> for GetError"],["impl From<WriteError> for ConnectedNextError"],["impl<T: CustomEventSender> From<T> for EventSender"]], "iroh_docs":[["impl From<&Author> for AuthorPublicKey"],["impl From<&AuthorPublicKey> for AuthorId"],["impl From<&NamespacePublicKey> for NamespaceId"],["impl From<&NamespaceSecret> for NamespacePublicKey"],["impl From<&[u8; 32]> for AuthorId"],["impl From<&[u8; 32]> for NamespaceId"],["impl From<CapabilityKind> for u8"],["impl From<ValidationFailure> for InsertError"],["impl From<Error> for OpenError"],["impl From<QueryBuilder<FlatQuery>> for Query"],["impl From<QueryBuilder<SingleLatestPerKeyQuery>> for Query"],["impl From<Author> for AuthorId"],["impl From<Author> for AuthorPublicKey"],["impl From<AuthorId> for AuthorFilter"],["impl From<AuthorId> for [u8; 32]"],["impl From<AuthorPublicKey> for AuthorId"],["impl From<NamespaceId> for Capability"],["impl From<NamespaceId> for [u8; 32]"],["impl From<NamespacePublicKey> for NamespaceId"],["impl From<NamespaceSecret> for Capability"],["impl From<NamespaceSecret> for NamespaceId"],["impl From<NamespaceSecret> for NamespacePublicKey"],["impl From<ReadOnly> for InsertError"],["impl From<SignedEntry> for Entry"],["impl From<SigningKey> for Author"],["impl From<SigningKey> for NamespaceSecret"],["impl From<VerifyingKey> for AuthorPublicKey"],["impl From<VerifyingKey> for NamespacePublicKey"],["impl From<[u8; 32]> for AuthorId"],["impl From<[u8; 32]> for NamespaceId"],["impl<T: AsRef<[u8]>> From<T> for KeyFilter"]], -"iroh_gossip":[["impl From<Event<PublicKey>> for GossipEvent"],["impl<T: Into<[u8; 32]>> From<T> for TopicId"]], +"iroh_gossip":[["impl From<Event<PublicKey>> for GossipEvent"],["impl<T: Into<[u8; 32]>> From<T> for TopicId"]], "iroh_net":[["impl From<&NodeInfo> for TxtAttrs<IrohAttr>"],["impl From<&TxtAttrs<IrohAttr>> for NodeInfo"],["impl From<&Peer> for DiscoveryItem"],["impl From<IpAddr> for IpFamily"],["impl From<IpFamily> for Domain"],["impl From<Error> for ClientError"],["impl From<Error> for PingError"],["impl From<NodeInfo> for AddrInfo"],["impl From<NodeInfo> for NodeAddr"],["impl From<TxtAttrs<IrohAttr>> for NodeInfo"],["impl From<RemoteInfo> for NodeAddr"],["impl From<GenError> for CreateConfigError"],["impl From<ParseError> for Error"],["impl From<VerificationError> for Error"],["impl From<Error> for ClientError"],["impl From<Error> for ClientError"],["impl From<Error> for ClientError"],["impl From<Error> for GenError"],["impl From<Error> for ParseError"],["impl From<Error> for VerificationError"],["impl From<JoinError> for ClientError"],["impl From<NoInitialCipherSuite> for CreateConfigError"],["impl From<SurgeError> for PingError"],["impl From<UdpSocket> for UdpSocket"],["impl<T> From<T> for ConcurrentDiscovery
where\n T: IntoIterator<Item = Box<dyn Discovery>>,
"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/pr/2737/docs/trait.impl/iroh_metrics/core/trait.Metric.js b/pr/2737/docs/trait.impl/iroh_metrics/core/trait.Metric.js index 5b0bb9cd8f..47b8fec7d8 100644 --- a/pr/2737/docs/trait.impl/iroh_metrics/core/trait.Metric.js +++ b/pr/2737/docs/trait.impl/iroh_metrics/core/trait.Metric.js @@ -1,9 +1,9 @@ (function() {var implementors = { "iroh":[["impl Metric for Metrics"]], -"iroh_blobs":[["impl Metric for Metrics"]], +"iroh_blobs":[["impl Metric for Metrics"]], "iroh_dns_server":[["impl Metric for Metrics"]], "iroh_docs":[["impl Metric for Metrics"]], -"iroh_gossip":[["impl Metric for Metrics"]], +"iroh_gossip":[["impl Metric for Metrics"]], "iroh_net":[["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"],["impl Metric for Metrics"]], "iroh_relay":[["impl Metric for StunMetrics"]] };if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/pr/2737/docs/type.impl/iroh/gossip/proto/enum.Command.js b/pr/2737/docs/type.impl/iroh/gossip/proto/enum.Command.js index 24101d8211..db2f51f42d 100644 --- a/pr/2737/docs/type.impl/iroh/gossip/proto/enum.Command.js +++ b/pr/2737/docs/type.impl/iroh/gossip/proto/enum.Command.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"iroh":[["
source§

impl<PI> Clone for Command<PI>
where\n PI: Clone,

source§

fn clone(&self) -> Command<PI>

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

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

Performs copy-assignment from source. Read more
","Clone","iroh::gossip::net::ProtoCommand"],["
source§

impl<PI> Debug for Command<PI>
where\n Vec<PI>: Debug,

source§

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

Formats the value using the given formatter. Read more
","Debug","iroh::gossip::net::ProtoCommand"]] +"iroh":[["
§

impl<PI> Clone for Command<PI>
where\n PI: Clone,

§

fn clone(&self) -> Command<PI>

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

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

Performs copy-assignment from source. Read more
","Clone","iroh::gossip::net::ProtoCommand"],["
§

impl<PI> Debug for Command<PI>
where\n Vec<PI>: Debug,

§

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

Formats the value using the given formatter. Read more
","Debug","iroh::gossip::net::ProtoCommand"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/pr/2737/docs/type.impl/iroh/gossip/proto/enum.Event.js b/pr/2737/docs/type.impl/iroh/gossip/proto/enum.Event.js index 71af58a6c4..d7db5f1ab1 100644 --- a/pr/2737/docs/type.impl/iroh/gossip/proto/enum.Event.js +++ b/pr/2737/docs/type.impl/iroh/gossip/proto/enum.Event.js @@ -1,3 +1,3 @@ (function() {var type_impls = { -"iroh":[["
source§

impl<PI> Clone for Event<PI>
where\n PI: Clone,

source§

fn clone(&self) -> Event<PI>

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

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

Performs copy-assignment from source. Read more
","Clone","iroh::gossip::net::ProtoEvent"],["
source§

impl<PI> Debug for Event<PI>
where\n PI: Debug,

source§

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

Formats the value using the given formatter. Read more
","Debug","iroh::gossip::net::ProtoEvent"],["
source§

impl<'de, PI> Deserialize<'de> for Event<PI>
where\n PI: Deserialize<'de>,

source§

fn deserialize<__D>(\n __deserializer: __D\n) -> Result<Event<PI>, <__D as Deserializer<'de>>::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::gossip::net::ProtoEvent"],["
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
","From>","iroh::gossip::net::ProtoEvent"],["
source§

impl<PI> From<Event<PI>> for Event<PI>

source§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
","From>","iroh::gossip::net::ProtoEvent"],["
source§

impl<PI> Ord for Event<PI>
where\n PI: Ord,

source§

fn cmp(&self, other: &Event<PI>) -> 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::gossip::net::ProtoEvent"],["
source§

impl<PI> PartialEq for Event<PI>
where\n PI: PartialEq,

source§

fn eq(&self, other: &Event<PI>) -> 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::gossip::net::ProtoEvent"],["
source§

impl<PI> PartialOrd for Event<PI>
where\n PI: PartialOrd,

source§

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

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

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

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

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

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

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

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

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

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","iroh::gossip::net::ProtoEvent"],["
source§

impl<PI> Serialize for Event<PI>
where\n PI: 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::gossip::net::ProtoEvent"],["
source§

impl<PI> Eq for Event<PI>
where\n PI: Eq,

","Eq","iroh::gossip::net::ProtoEvent"],["
source§

impl<PI> StructuralPartialEq for Event<PI>

","StructuralPartialEq","iroh::gossip::net::ProtoEvent"]] +"iroh":[["
§

impl<PI> Clone for Event<PI>
where\n PI: Clone,

§

fn clone(&self) -> Event<PI>

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

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

Performs copy-assignment from source. Read more
","Clone","iroh::gossip::net::ProtoEvent"],["
§

impl<PI> Debug for Event<PI>
where\n PI: Debug,

§

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

Formats the value using the given formatter. Read more
","Debug","iroh::gossip::net::ProtoEvent"],["
§

impl<'de, PI> Deserialize<'de> for Event<PI>
where\n PI: Deserialize<'de>,

§

fn deserialize<__D>(\n __deserializer: __D\n) -> Result<Event<PI>, <__D as Deserializer<'de>>::Error>
where\n __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::gossip::net::ProtoEvent"],["
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
","From>","iroh::gossip::net::ProtoEvent"],["
§

impl<PI> From<Event<PI>> for Event<PI>

§

fn from(value: Event<PI>) -> Event<PI>

Converts to this type from the input type.
","From>","iroh::gossip::net::ProtoEvent"],["
§

impl<PI> Ord for Event<PI>
where\n PI: Ord,

§

fn cmp(&self, other: &Event<PI>) -> 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::gossip::net::ProtoEvent"],["
§

impl<PI> PartialEq for Event<PI>
where\n PI: PartialEq,

§

fn eq(&self, other: &Event<PI>) -> 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::gossip::net::ProtoEvent"],["
§

impl<PI> PartialOrd for Event<PI>
where\n PI: PartialOrd,

§

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

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

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <=\noperator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >=\noperator. Read more
","PartialOrd","iroh::gossip::net::ProtoEvent"],["
§

impl<PI> Serialize for Event<PI>
where\n PI: Serialize,

§

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::gossip::net::ProtoEvent"],["
§

impl<PI> Eq for Event<PI>
where\n PI: Eq,

","Eq","iroh::gossip::net::ProtoEvent"],["
§

impl<PI> StructuralPartialEq for Event<PI>

","StructuralPartialEq","iroh::gossip::net::ProtoEvent"]] };if (window.register_type_impls) {window.register_type_impls(type_impls);} else {window.pending_type_impls = type_impls;}})() \ No newline at end of file diff --git a/pr/2737/docs/type.impl/std/primitive.array.js b/pr/2737/docs/type.impl/std/primitive.array.js index 20af29001d..56cb1b33c4 100644 --- a/pr/2737/docs/type.impl/std/primitive.array.js +++ b/pr/2737/docs/type.impl/std/primitive.array.js @@ -1,4 +1,4 @@ (function() {var type_impls = { -"iroh":[["
source§

impl<T, const N: usize> [T; N]

1.55.0 · source

pub fn map<F, U>(self, f: F) -> [U; N]
where\n F: FnMut(T) -> U,

Returns an array of the same size as self, with function f applied to each element\nin order.

\n

If you don’t necessarily need a new fixed-size array, consider using\nIterator::map instead.

\n
§Note on performance and stack usage
\n

Unfortunately, usages of this method are currently not always optimized\nas well as they could be. This mainly concerns large arrays, as mapping\nover small arrays seem to be optimized just fine. Also note that in\ndebug mode (i.e. without any optimizations), this method can use a lot\nof stack space (a few times the size of the array or more).

\n

Therefore, in performance-critical code, try to avoid using this method\non large arrays or check the emitted code. Also try to avoid chained\nmaps (e.g. arr.map(...).map(...)).

\n

In many cases, you can instead use Iterator::map by calling .iter()\nor .into_iter() on your array. [T; N]::map is only necessary if you\nreally need a new array of the same size as the result. Rust’s lazy\niterators tend to get optimized very well.

\n
§Examples
\n
let x = [1, 2, 3];\nlet y = x.map(|v| v + 1);\nassert_eq!(y, [2, 3, 4]);\n\nlet x = [1, 2, 3];\nlet mut temp = 0;\nlet y = x.map(|v| { temp += 1; v * temp });\nassert_eq!(y, [1, 4, 9]);\n\nlet x = [\"Ferris\", \"Bueller's\", \"Day\", \"Off\"];\nlet y = x.map(|v| v.len());\nassert_eq!(y, [6, 9, 3, 3]);
\n
source

pub fn try_map<F, R>(\n self,\n f: F\n) -> <<R as Try>::Residual as Residual<[<R as Try>::Output; N]>>::TryType
where\n F: FnMut(T) -> R,\n R: Try,\n <R as Try>::Residual: Residual<[<R as Try>::Output; N]>,

🔬This is a nightly-only experimental API. (array_try_map)

A fallible function f applied to each element on array self in order to\nreturn an array the same size as self or the first error encountered.

\n

The return type of this function depends on the return type of the closure.\nIf you return Result<T, E> from the closure, you’ll get a Result<[T; N], E>.\nIf you return Option<T> from the closure, you’ll get an Option<[T; N]>.

\n
§Examples
\n
#![feature(array_try_map)]\n\nlet a = [\"1\", \"2\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>()).unwrap().map(|v| v + 1);\nassert_eq!(b, [2, 3, 4]);\n\nlet a = [\"1\", \"2a\", \"3\"];\nlet b = a.try_map(|v| v.parse::<u32>());\nassert!(b.is_err());\n\nuse std::num::NonZero;\n\nlet z = [1, 2, 0, 3, 4];\nassert_eq!(z.try_map(NonZero::new), None);\n\nlet a = [1, 2, 3];\nlet b = a.try_map(NonZero::new);\nlet c = b.map(|x| x.map(NonZero::get));\nassert_eq!(c, Some(a));
\n
1.57.0 (const: 1.57.0) · source

pub const fn as_slice(&self) -> &[T]

Returns a slice containing the entire array. Equivalent to &s[..].

\n
1.57.0 · source

pub fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice containing the entire array. Equivalent to\n&mut s[..].

\n
1.77.0 · source

pub fn each_ref(&self) -> [&T; N]

Borrows each element and returns an array of references with the same\nsize as self.

\n
§Example
\n
let floats = [3.1, 2.7, -1.0];\nlet float_refs: [&f64; 3] = floats.each_ref();\nassert_eq!(float_refs, [&3.1, &2.7, &-1.0]);
\n

This method is particularly useful if combined with other methods, like\nmap. This way, you can avoid moving the original\narray if its elements are not Copy.

\n\n
let strings = [\"Ferris\".to_string(), \"♥\".to_string(), \"Rust\".to_string()];\nlet is_ascii = strings.each_ref().map(|s| s.is_ascii());\nassert_eq!(is_ascii, [true, false, true]);\n\n// We can still access the original array: it has not been moved.\nassert_eq!(strings.len(), 3);
\n
1.77.0 · source

pub fn each_mut(&mut self) -> [&mut T; N]

Borrows each element mutably and returns an array of mutable references\nwith the same size as self.

\n
§Example
\n
\nlet mut floats = [3.1, 2.7, -1.0];\nlet float_refs: [&mut f64; 3] = floats.each_mut();\n*float_refs[0] = 0.0;\nassert_eq!(float_refs, [&mut 0.0, &mut 2.7, &mut -1.0]);\nassert_eq!(floats, [0.0, 2.7, -1.0]);
\n
source

pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.split_array_ref::<0>();\n   assert_eq!(left, &[]);\n   assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<2>();\n    assert_eq!(left, &[1, 2]);\n    assert_eq!(right, &[3, 4, 5, 6]);\n}\n\n{\n    let (left, right) = v.split_array_ref::<6>();\n    assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n    assert_eq!(right, &[]);\n}
\n
source

pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index.

\n

The first will contain all indices from [0, M) (excluding\nthe index M itself) and the second will contain all\nindices from [M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.split_array_mut::<2>();\nassert_eq!(left, &mut [1, 0][..]);\nassert_eq!(right, &mut [3, 0, 5, 6]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
source

pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet v = [1, 2, 3, 4, 5, 6];\n\n{\n   let (left, right) = v.rsplit_array_ref::<0>();\n   assert_eq!(left, &[1, 2, 3, 4, 5, 6]);\n   assert_eq!(right, &[]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<2>();\n    assert_eq!(left, &[1, 2, 3, 4]);\n    assert_eq!(right, &[5, 6]);\n}\n\n{\n    let (left, right) = v.rsplit_array_ref::<6>();\n    assert_eq!(left, &[]);\n    assert_eq!(right, &[1, 2, 3, 4, 5, 6]);\n}
\n
source

pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M])

🔬This is a nightly-only experimental API. (split_array)

Divides one mutable array reference into two at an index from the end.

\n

The first will contain all indices from [0, N - M) (excluding\nthe index N - M itself) and the second will contain all\nindices from [N - M, N) (excluding the index N itself).

\n
§Panics
\n

Panics if M > N.

\n
§Examples
\n
#![feature(split_array)]\n\nlet mut v = [1, 0, 3, 0, 5, 6];\nlet (left, right) = v.rsplit_array_mut::<4>();\nassert_eq!(left, &mut [1, 0]);\nassert_eq!(right, &mut [3, 0, 5, 6][..]);\nleft[1] = 2;\nright[1] = 4;\nassert_eq!(v, [1, 2, 3, 4, 5, 6]);
\n
",0,"iroh::docs::PeerIdBytes"],["
source§

impl<const N: usize> [u8; N]

source

pub const fn as_ascii(&self) -> Option<&[AsciiChar; N]>

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nor returns None if any of the characters is non-ASCII.

\n
§Examples
\n
#![feature(ascii_char)]\n#![feature(const_option)]\n\nconst HEX_DIGITS: [std::ascii::Char; 16] =\n    *b\"0123456789abcdef\".as_ascii().unwrap();\n\nassert_eq!(HEX_DIGITS[1].as_str(), \"1\");\nassert_eq!(HEX_DIGITS[10].as_str(), \"a\");
\n
source

pub const unsafe fn as_ascii_unchecked(&self) -> &[AsciiChar; N]

🔬This is a nightly-only experimental API. (ascii_char)

Converts this array of bytes into a array of ASCII characters,\nwithout checking whether they’re valid.

\n
§Safety
\n

Every byte in the array must be in 0..=127, or else this is UB.

\n
",0,"iroh::docs::PeerIdBytes"],["
§

impl<T> Array for [T; 32]
where\n T: Default,

§

type Item = T

The type of the items in the thing.
§

const CAPACITY: usize = 32usize

The number of slots in the thing.
§

fn as_slice(&self) -> &[T]

Gives a shared slice over the whole thing. Read more
§

fn as_slice_mut(&mut self) -> &mut [T]

Gives a unique slice over the whole thing. Read more
§

fn default() -> [T; 32]

Create a default-initialized instance of ourself, similar to the\nDefault trait, but implemented for the same range of sizes as\n[Array].
","Array","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> Array for [T; N]

§

type Item = T

The type of the array’s elements.
§

fn size() -> usize

Returns the number of items the array can hold.
","Array","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize, T> AsBytes for [T; N]
where\n T: AsBytes,

§

fn as_bytes(&self) -> &[u8] ⓘ

Gets the bytes of this value. Read more
§

fn write_to(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to bytes. Read more
§

fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the prefix of bytes. Read more
§

fn write_to_suffix(&self, bytes: &mut [u8]) -> Option<()>

Writes a copy of self to the suffix of bytes. Read more
","AsBytes","iroh::docs::PeerIdBytes"],["
§

impl AsBytes for [u8; 32]

§

fn as_bytes(&self) -> &[u8] ⓘ

Casts the input type to a byte slice
","AsBytes","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> AsMut<[T]> for [T; N]

source§

fn as_mut(&mut self) -> &mut [T]

Converts this type into a mutable reference of the (usually inferred) input type.
","AsMut<[T]>","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> AsRef<[T]> for [T; N]

source§

fn as_ref(&self) -> &[T]

Converts this type into a shared reference of the (usually inferred) input type.
","AsRef<[T]>","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> BitView for [T; N]
where\n T: BitStore,

Note that overly-large arrays may cause the conversions to fail.

\n
§

type Store = T

The underlying element type.
§

fn view_bits<O>(&self) -> &BitSlice<T, O>
where\n O: BitOrder,

Views a memory region as an immutable bit-slice.
§

fn try_view_bits<O>(&self) -> Result<&BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as an immutable bit-slice. Read more
§

fn view_bits_mut<O>(&mut self) -> &mut BitSlice<T, O>
where\n O: BitOrder,

Views a memory region as a mutable bit-slice.
§

fn try_view_bits_mut<O>(\n &mut self\n) -> Result<&mut BitSlice<T, O>, BitSpanError<T>>
where\n O: BitOrder,

Attempts to view a memory region as a mutable bit-slice. Read more
","BitView","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> BitViewSized for [T; N]
where\n T: BitStore,

§

const ZERO: [T; N] = _

The zero constant.
§

fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]

Views the type as a slice of its elements.
§

fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]

Views the type as a mutable slice of its elements.
§

fn into_bitarray<O>(self) -> BitArray<Self, O>
where\n O: BitOrder,

Wraps self in a BitArray.
","BitViewSized","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T, const N: usize> Borrow<[T]> for [T; N]

source§

fn borrow(&self) -> &[T]

Immutably borrows from an owned value. Read more
","Borrow<[T]>","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T, const N: usize> BorrowMut<[T]> for [T; N]

source§

fn borrow_mut(&mut self) -> &mut [T]

Mutably borrows from an owned value. Read more
","BorrowMut<[T]>","iroh::docs::PeerIdBytes"],["
§

impl<S, const N: usize> Chain for [S; N]
where\n S: Stream,

§

type Item = <S as Stream>::Item

What’s the return type of our stream?
§

type Stream = Chain<S, N>

What stream do we return?
§

fn chain(self) -> <[S; N] as Chain>::Stream

Combine multiple streams into a single stream.
","Chain","iroh::docs::PeerIdBytes"],["
1.58.0 · source§

impl<T, const N: usize> Clone for [T; N]
where\n T: Clone,

source§

fn clone(&self) -> [T; N]

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, other: &[T; N])

Performs copy-assignment from source. Read more
","Clone","iroh::docs::PeerIdBytes"],["
1.0.0 · source§

impl<T, const N: usize> Debug for [T; N]
where\n T: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
","Debug","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize> Decode for [u8; N]

Decodes a byte array from byte[n] as described in RFC4251 § 5:

\n
\n

A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

\n
\n
§

type Error = Error

Type returned in the event of a decoding error.
§

fn decode(reader: &mut impl Reader) -> Result<[u8; N], Error>

Attempt to decode a value of this type using the provided [Reader].
","Decode","iroh::docs::PeerIdBytes"],["
§

impl<'a, T, const N: usize> DecodeValue<'a> for [T; N]
where\n T: Decode<'a>,

§

fn decode_value<R>(reader: &mut R, header: Header) -> Result<[T; N], Error>
where\n R: Reader<'a>,

Attempt to decode this message using the provided [Reader].
","DecodeValue<'a>","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 32]
where\n T: Default,

source§

fn default() -> [T; 32]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 31]
where\n T: Default,

source§

fn default() -> [T; 31]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 30]
where\n T: Default,

source§

fn default() -> [T; 30]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 29]
where\n T: Default,

source§

fn default() -> [T; 29]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 28]
where\n T: Default,

source§

fn default() -> [T; 28]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 27]
where\n T: Default,

source§

fn default() -> [T; 27]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 26]
where\n T: Default,

source§

fn default() -> [T; 26]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 25]
where\n T: Default,

source§

fn default() -> [T; 25]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 24]
where\n T: Default,

source§

fn default() -> [T; 24]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 23]
where\n T: Default,

source§

fn default() -> [T; 23]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 22]
where\n T: Default,

source§

fn default() -> [T; 22]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 21]
where\n T: Default,

source§

fn default() -> [T; 21]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 20]
where\n T: Default,

source§

fn default() -> [T; 20]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 19]
where\n T: Default,

source§

fn default() -> [T; 19]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 18]
where\n T: Default,

source§

fn default() -> [T; 18]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 17]
where\n T: Default,

source§

fn default() -> [T; 17]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 16]
where\n T: Default,

source§

fn default() -> [T; 16]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 15]
where\n T: Default,

source§

fn default() -> [T; 15]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 14]
where\n T: Default,

source§

fn default() -> [T; 14]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 13]
where\n T: Default,

source§

fn default() -> [T; 13]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 12]
where\n T: Default,

source§

fn default() -> [T; 12]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 11]
where\n T: Default,

source§

fn default() -> [T; 11]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 10]
where\n T: Default,

source§

fn default() -> [T; 10]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 9]
where\n T: Default,

source§

fn default() -> [T; 9]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 8]
where\n T: Default,

source§

fn default() -> [T; 8]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 7]
where\n T: Default,

source§

fn default() -> [T; 7]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 6]
where\n T: Default,

source§

fn default() -> [T; 6]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 5]
where\n T: Default,

source§

fn default() -> [T; 5]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 4]
where\n T: Default,

source§

fn default() -> [T; 4]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 3]
where\n T: Default,

source§

fn default() -> [T; 3]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 2]
where\n T: Default,

source§

fn default() -> [T; 2]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 1]
where\n T: Default,

source§

fn default() -> [T; 1]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
1.4.0 · source§

impl<T> Default for [T; 0]

source§

fn default() -> [T; 0]

Returns the “default value” for a type. Read more
","Default","iroh::docs::PeerIdBytes"],["
source§

impl<'de, T> Deserialize<'de> for [T; 32]
where\n T: Deserialize<'de>,

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<[T; 32], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
","Deserialize<'de>","iroh::docs::PeerIdBytes"],["
source§

impl<'de, const N: usize> Deserialize<'de> for [u8; N]

source§

fn deserialize<D>(\n deserializer: D\n) -> Result<[u8; N], <D as Deserializer<'de>>::Error>
where\n D: Deserializer<'de>,

","Deserialize<'de>","iroh::docs::PeerIdBytes"],["
§

impl<const N: usize> Encode for [u8; N]

Encodes [u8; N] into byte[n] as described in RFC4251 § 5:

\n
\n

A byte represents an arbitrary 8-bit value (octet). Fixed length\ndata is sometimes represented as an array of bytes, written\nbyte[n], where n is the number of bytes in the array.

\n
\n
§

fn encoded_len(&self) -> Result<usize, Error>

Get the length of this type encoded in bytes, prior to Base64 encoding.
§

fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value using the provided [Writer].
§

fn encoded_len_prefixed(&self) -> Result<usize, Error>

Return the length of this type after encoding when prepended with a\nuint32 length prefix.
§

fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode this value, first prepending a uint32 length prefix\nset to [Encode::encoded_len].
","Encode","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> EncodeLabelSet for [T; N]
where\n T: EncodeLabel,

§

fn encode(&self, encoder: LabelSetEncoder<'_>) -> Result<(), Error>

Encode oneself into the given encoder.
","EncodeLabelSet","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> EncodeValue for [T; N]
where\n T: Encode,

§

fn value_len(&self) -> Result<Length, Error>

Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
§

fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
§

fn header(&self) -> Result<Header, Error>
where\n Self: Tagged,

Get the [Header] used to encode this value.
","EncodeValue","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 32]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 31]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 30]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 29]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 28]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 27]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 26]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 25]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 24]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 23]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 22]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 21]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 20]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 19]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 18]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 17]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 16]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 15]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 14]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 13]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 12]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 11]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 10]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 9]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 8]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 7]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 6]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 5]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 4]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 3]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 2]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 1]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 0]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 2048]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 1024]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 512]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 256]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 128]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
source§

impl<T> Fill for [T; 64]
where\n [T]: Fill,

source§

fn try_fill<R>(&mut self, rng: &mut R) -> Result<(), Error>
where\n R: Rng + ?Sized,

Fill self with random data
","Fill","iroh::docs::PeerIdBytes"],["
§

impl<'a> FindToken<&'a u8> for [u8; 32]

§

fn find_token(&self, token: &u8) -> bool

Returns true if self contains the token
","FindToken<&'a u8>","iroh::docs::PeerIdBytes"],["
§

impl FindToken<u8> for [u8; 32]

§

fn find_token(&self, token: u8) -> bool

Returns true if self contains the token
","FindToken","iroh::docs::PeerIdBytes"],["
§

impl<T, const N: usize> FixedTag for [T; N]

§

const TAG: Tag = Tag::Sequence

ASN.1 tag
","FixedTag","iroh::docs::PeerIdBytes"],["
§

impl From<&Signature> for [u8; 64]

§

fn from(sig: &Signature) -> [u8; 64]

Converts to this type from the input type.
","From<&Signature>","iroh::docs::PeerIdBytes"],["
source§

impl From<AuthorId> for [u8; 32]

source§

fn from(value: AuthorId) -> [u8; 32]

Converts to this type from the input type.
","From","iroh::docs::PeerIdBytes"],["
§

impl<T> From<GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> for [T; 32]

§

fn from(\n sel: GenericArray<T, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>\n) -> [T; 32]

Converts to this type from the input type.
","From, B0>, B0>, B0>, B0>, B0>>>","iroh::docs::PeerIdBytes"],["
§

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_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