Struct iroh_blobs::downloader::DownloadRequest
source · pub struct DownloadRequest { /* private fields */ }Expand description
A download request.
Implementations§
source§impl DownloadRequest
impl DownloadRequest
sourcepub fn new(
resource: impl Into<DownloadKind>,
- nodes: impl IntoIterator<Item = impl Into<NodeAddr>>
+ nodes: impl IntoIterator<Item = impl Into<NodeAddr>>
) -> Self
pub fn new( resource: impl Into<DownloadKind>, - nodes: impl IntoIterator<Item = impl Into<NodeAddr>> + nodes: impl IntoIterator<Item = impl Into<NodeAddr>> ) -> Self
Create a new download request.
It is the responsibility of the caller to ensure that the data is tagged either with a temp tag or with a persistent tag to make sure the data is not garbage collected during diff --git a/pr/2638/docs/iroh_blobs/downloader/struct.Downloader.html b/pr/2638/docs/iroh_blobs/downloader/struct.Downloader.html index 1c6762c576..88d2e7f7c0 100644 --- a/pr/2638/docs/iroh_blobs/downloader/struct.Downloader.html +++ b/pr/2638/docs/iroh_blobs/downloader/struct.Downloader.html @@ -11,7 +11,7 @@ S: Store,
Create a new Downloader with custom ConcurrencyLimits and RetryConfig.
sourcepub async fn queue(&self, request: DownloadRequest) -> DownloadHandle ⓘ
pub async fn queue(&self, request: DownloadRequest) -> DownloadHandle ⓘ
Queue a download.
sourcepub async fn cancel(&self, handle: DownloadHandle)
pub async fn cancel(&self, handle: DownloadHandle)
Cancel a download.
-sourcepub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
Declare that certains nodes can be used to download a hash.
+sourcepub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
pub async fn nodes_have(&mut self, hash: Hash, nodes: Vec<NodeId>)
Declare that certains nodes can be used to download a hash.
Note that this does not start a download, but only provides new nodes to already queued
downloads. Use Self::queue to queue a download.
Trait Implementations§
source§impl Clone for Downloader
impl Clone for Downloader
source§fn clone(&self) -> Downloader
fn clone(&self) -> Downloader
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Downloader
impl !RefUnwindSafe for Downloader
impl Send for Downloader
impl Sync for Downloader
impl Unpin for Downloader
impl !UnwindSafe for Downloader
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2638/docs/iroh_blobs/downloader/trait.Dialer.html
index d23576a87e..2dfc99bd33 100644
--- a/pr/2638/docs/iroh_blobs/downloader/trait.Dialer.html
+++ b/pr/2638/docs/iroh_blobs/downloader/trait.Dialer.html
@@ -1,15 +1,15 @@
-Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+
sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/downloader/trait.Dialer.html b/pr/2638/docs/iroh_blobs/downloader/trait.Dialer.html
index d23576a87e..2dfc99bd33 100644
--- a/pr/2638/docs/iroh_blobs/downloader/trait.Dialer.html
+++ b/pr/2638/docs/iroh_blobs/downloader/trait.Dialer.html
@@ -1,15 +1,15 @@
-Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+
sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
+Dialer in iroh_blobs::downloader - Rust Trait iroh_blobs::downloader::Dialer
source · pub trait Dialer: Stream<Item = (NodeId, Result<Self::Connection>)> + Unpin {
type Connection: Clone + 'static;
// Required methods
- fn queue_dial(&mut self, node_id: NodeId);
+ fn queue_dial(&mut self, node_id: NodeId);
fn pending_count(&self) -> usize;
- fn is_pending(&self, node: NodeId) -> bool;
- fn node_id(&self) -> NodeId;
+ fn is_pending(&self, node: NodeId) -> bool;
+ fn node_id(&self) -> NodeId;
}
Expand description
Trait modeling a dialer. This allows for IO-less testing.
Required Associated Types§
sourcetype Connection: Clone + 'static
Type of connections returned by the Dialer.
-Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
+Required Methods§
sourcefn queue_dial(&mut self, node_id: NodeId)
Dial a node.
sourcefn pending_count(&self) -> usize
Get the number of dialing nodes.
-sourcefn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
-Implementations on Foreign Types§
source§impl Dialer for Dialer
§type Connection = Connection
source§fn queue_dial(&mut self, node_id: NodeId)
source§fn pending_count(&self) -> usize
source§fn is_pending(&self, node: NodeId) -> bool
source§fn node_id(&self) -> NodeId
Implementors§
\ No newline at end of file
+sourcefn is_pending(&self, node: NodeId) -> bool
fn is_pending(&self, node: NodeId) -> bool
Check if a node is being dialed.
+source§impl Dialer for Dialer
impl Dialer for Dialer
type Connection = Connection
fn queue_dial(&mut self, node_id: NodeId)
fn pending_count(&self) -> usize
fn is_pending(&self, node: NodeId) -> bool
fn node_id(&self) -> NodeId
Enum iroh_blobs::BlobFormat
source · pub enum BlobFormat {
+BlobFormat in iroh_blobs - Rust Enum iroh_blobs::BlobFormat
pub enum BlobFormat {
Raw,
HashSeq,
}
Expand description
A format identifier
Variants§
Implementations§
source§impl BlobFormat
Trait Implementations§
source§impl Clone for BlobFormat
source§fn clone(&self) -> BlobFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for BlobFormat
source§impl Default for BlobFormat
source§fn default() -> BlobFormat
Returns the “default value” for a type. Read moresource§impl<'de> Deserialize<'de> for BlobFormat
source§fn deserialize<__D>(
+
Implementations§
§impl BlobFormat
pub const fn is_hash_seq(&self) -> bool
Is hash seq format
+Trait Implementations§
§impl Clone for BlobFormat
§fn clone(&self) -> BlobFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for BlobFormat
§impl Default for BlobFormat
§fn default() -> BlobFormat
Returns the “default value” for a type. Read more§impl<'de> Deserialize<'de> for BlobFormat
§fn deserialize<__D>(
__deserializer: __D
) -> Result<BlobFormat, <__D as Deserializer<'de>>::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for BlobFormat
source§impl Hash for BlobFormat
§impl Display for BlobFormat
§impl Hash for BlobFormat
source§impl MaxSize for BlobFormat
source§const POSTCARD_MAX_SIZE: usize = 1usize
The maximum possible size that the serialization of this
-type can have, in bytes.source§impl Ord for BlobFormat
§impl MaxSize for BlobFormat
§const POSTCARD_MAX_SIZE: usize = 1usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for BlobFormat
source§impl PartialEq for BlobFormat
§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 ==.source§impl PartialOrd for BlobFormat
§impl PartialOrd for BlobFormat
§fn partial_cmp(&self, other: &BlobFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Copy for BlobFormat
source§impl Eq for BlobFormat
source§impl StructuralPartialEq for BlobFormat
Auto Trait Implementations§
§impl Freeze for BlobFormat
§impl RefUnwindSafe for BlobFormat
§impl Send for BlobFormat
§impl Sync for BlobFormat
§impl Unpin for BlobFormat
§impl UnwindSafe for BlobFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ __S: Serializer,
Serialize this value into the given Serde serializer. Read more§impl Copy for BlobFormat
§impl Eq for BlobFormat
§impl StructuralPartialEq for BlobFormat
Auto Trait Implementations§
impl Freeze for BlobFormat
impl RefUnwindSafe for BlobFormat
impl Send for BlobFormat
impl Sync for BlobFormat
impl Unpin for BlobFormat
impl UnwindSafe for BlobFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2638/docs/iroh_blobs/export/enum.ExportProgress.html
index 4b75ec988b..b7ed98104e 100644
--- a/pr/2638/docs/iroh_blobs/export/enum.ExportProgress.html
+++ b/pr/2638/docs/iroh_blobs/export/enum.ExportProgress.html
@@ -14,7 +14,7 @@
id: u64,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress events for an export operation
Variants§
§Found
The download part is done for this id, we are now exporting the data
to the specified out path.
@@ -30,7 +30,7 @@ to the specified out path.
§Done
We finished exporting a blob
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_blobs/export/enum.ExportProgress.html b/pr/2638/docs/iroh_blobs/export/enum.ExportProgress.html
index 4b75ec988b..b7ed98104e 100644
--- a/pr/2638/docs/iroh_blobs/export/enum.ExportProgress.html
+++ b/pr/2638/docs/iroh_blobs/export/enum.ExportProgress.html
@@ -14,7 +14,7 @@
id: u64,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress events for an export operation
Variants§
§Found
The download part is done for this id, we are now exporting the data
to the specified out path.
@@ -30,7 +30,7 @@ to the specified out path.
§Done
We finished exporting a blob
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Expand description
Progress events for an export operation
Variants§
Found
The download part is done for this id, we are now exporting the data to the specified out path.
@@ -30,7 +30,7 @@ to the specified out path.Done
We finished exporting a blob
AllDone
We are done with the whole operation.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Clone for ExportProgress
impl Clone for ExportProgress
source§fn clone(&self) -> ExportProgress
fn clone(&self) -> ExportProgress
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ExportProgress
impl Debug for ExportProgress
source§impl<'de> Deserialize<'de> for ExportProgress
impl<'de> Deserialize<'de> for ExportProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl !Freeze for ExportProgress
impl RefUnwindSafe for ExportProgress
impl Send for ExportProgress
impl Sync for ExportProgress
impl Unpin for ExportProgress
impl UnwindSafe for ExportProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2638/docs/iroh_blobs/get/db/enum.DownloadProgress.html
index ee27dc5703..36d0d471ba 100644
--- a/pr/2638/docs/iroh_blobs/get/db/enum.DownloadProgress.html
+++ b/pr/2638/docs/iroh_blobs/get/db/enum.DownloadProgress.html
@@ -25,7 +25,7 @@
id: u64,
},
AllDone(Stats),
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the get operation.
Variants§
§InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
§FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.
§AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html
index ed6579be27..b0f6a2bbf7 100644
--- a/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html
+++ b/pr/2638/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: CounterTrait Implementations§
source§impl Metric for Metrics
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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
index 93e6005d07..150540eab4 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index 077d221f13..17594127ce 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2638/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
§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§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 moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/get/db/enum.DownloadProgress.html b/pr/2638/docs/iroh_blobs/get/db/enum.DownloadProgress.html
index ee27dc5703..36d0d471ba 100644
--- a/pr/2638/docs/iroh_blobs/get/db/enum.DownloadProgress.html
+++ b/pr/2638/docs/iroh_blobs/get/db/enum.DownloadProgress.html
@@ -25,7 +25,7 @@
id: u64,
},
AllDone(Stats),
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the get operation.
Variants§
§InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
§FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.
§AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html
index ed6579be27..b0f6a2bbf7 100644
--- a/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html
+++ b/pr/2638/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: CounterTrait Implementations§
source§impl Metric for Metrics
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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
index 93e6005d07..150540eab4 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index 077d221f13..17594127ce 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2638/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
§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§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 moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
Expand description
Progress updates for the get operation.
Variants§
InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
FoundLocal
Data was found locally.
@@ -51,7 +51,7 @@ allows to identify the children by their offset in the hashseq.AllDone(Stats)
All operations finished.
This will be the last message in the stream.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Clone for DownloadProgress
impl Clone for DownloadProgress
source§fn clone(&self) -> DownloadProgress
fn clone(&self) -> DownloadProgress
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DownloadProgress
impl Debug for DownloadProgress
source§impl<'de> Deserialize<'de> for DownloadProgress
impl<'de> Deserialize<'de> for DownloadProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Serialize for DownloadProgress
impl Serialize for DownloadProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html
index ed6579be27..b0f6a2bbf7 100644
--- a/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html
+++ b/pr/2638/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: CounterTrait Implementations§
source§impl Metric for Metrics
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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
index 93e6005d07..150540eab4 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index 077d221f13..17594127ce 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2638/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
§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§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 moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html
index ed6579be27..b0f6a2bbf7 100644
--- a/pr/2638/docs/iroh_blobs/metrics/struct.Metrics.html
+++ b/pr/2638/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: CounterTrait Implementations§
source§impl Metric for Metrics
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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
index 93e6005d07..150540eab4 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index 077d221f13..17594127ce 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2638/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
§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§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 moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
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: CounterTrait Implementations§
source§impl Metric for Metrics
impl Metric for Metrics
source§fn with_metric<T, F>(f: F)where
+
fn with_metric<T, F>(f: F)where
+
Fields§
§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: CounterTrait Implementations§
source§impl Metric for Metrics
impl Metric for Metrics
§fn with_metric<T, F>(f: F)
fn with_metric<T, F>(f: F)
source§fn try_get() -> Option<&'static Self>
fn try_get() -> Option<&'static Self>
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
index 93e6005d07..150540eab4 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index 077d221f13..17594127ce 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2638/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
§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§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 moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
index 93e6005d07..150540eab4 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
+++ b/pr/2638/docs/iroh_blobs/provider/enum.AddProgress.html
@@ -17,7 +17,7 @@
format: BlobFormat,
tag: Tag,
},
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the add operation.
Variants§
§Found
An item was found with name name, from now on referred to via id
Fields
§Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index 077d221f13..17594127ce 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2638/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
§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§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 moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
Expand description
Progress updates for the add operation.
Variants§
Found
An item was found with name name, from now on referred to via id
Fields
Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for AddProgress
impl Debug for AddProgress
source§impl<'de> Deserialize<'de> for AddProgress
impl<'de> Deserialize<'de> for AddProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Serialize for AddProgress
impl Serialize for AddProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index 077d221f13..17594127ce 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2638/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
§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§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 moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html b/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
index 077d221f13..17594127ce 100644
--- a/pr/2638/docs/iroh_blobs/provider/enum.BatchAddPathProgress.html
+++ b/pr/2638/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
§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§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 moresource§impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ConsistencyCheckProgress
§impl RefUnwindSafe for ConsistencyCheckProgress
§impl Send for ConsistencyCheckProgress
§impl Sync for ConsistencyCheckProgress
§impl Unpin for ConsistencyCheckProgress
§impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
Expand description
Progress updates for the batch add operation.
Variants§
Found
An item was found with the given size
Fields
Abort(RpcError)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
source§impl Debug for BatchAddPathProgress
impl Debug for BatchAddPathProgress
source§impl<'de> Deserialize<'de> for BatchAddPathProgress
impl<'de> Deserialize<'de> for BatchAddPathProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Serialize for BatchAddPathProgress
impl Serialize for BatchAddPathProgress
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
index fecdaffd6e..a6fe04b699 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ConsistencyCheckProgress.html
@@ -6,7 +6,7 @@
level: ReportLevel,
},
Done,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§level: ReportLevelThe level of the message
§Done
Consistency check ended
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Expand description
Progress updates for the validate operation
Variants§
level: ReportLevelThe level of the message
Done
Consistency check ended
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ConsistencyCheckProgress
impl Debug for ConsistencyCheckProgress
source§impl<'de> Deserialize<'de> for ConsistencyCheckProgress
impl<'de> Deserialize<'de> for ConsistencyCheckProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ConsistencyCheckProgress
impl RefUnwindSafe for ConsistencyCheckProgress
impl Send for ConsistencyCheckProgress
impl Sync for ConsistencyCheckProgress
impl Unpin for ConsistencyCheckProgress
impl UnwindSafe for ConsistencyCheckProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
index b6d020fad3..1ecce81994 100644
--- a/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
+++ b/pr/2638/docs/iroh_blobs/store/enum.ValidateProgress.html
@@ -31,7 +31,7 @@
ranges: RangeSpec,
},
AllDone,
- Abort(RpcError),
+ Abort(RpcError),
}Expand description
Progress updates for the validate operation
Variants§
§Starting
started validating
Fields
§total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.
§AllDone
We are done with the whole operation.
-§Abort(RpcError)
We got an error and need to abort.
+§Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for ValidateProgress
§impl RefUnwindSafe for ValidateProgress
§impl Send for ValidateProgress
§impl Sync for ValidateProgress
§impl Unpin for ValidateProgress
§impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
Expand description
Progress updates for the validate operation
Variants§
Starting
started validating
Fields
total: u64The total number of entries to validate
@@ -62,7 +62,7 @@ Otherwise it might be an url or something else to uniquely identify the entry.AllDone
We are done with the whole operation.
-Abort(RpcError)
We got an error and need to abort.
+Abort(RpcError)
We got an error and need to abort.
Trait Implementations§
source§impl Debug for ValidateProgress
impl Debug for ValidateProgress
source§impl<'de> Deserialize<'de> for ValidateProgress
impl<'de> Deserialize<'de> for ValidateProgress
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ValidateProgress
impl RefUnwindSafe for ValidateProgress
impl Send for ValidateProgress
impl Sync for ValidateProgress
impl Unpin for ValidateProgress
impl UnwindSafe for ValidateProgress
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_blobs/struct.Hash.html b/pr/2638/docs/iroh_blobs/struct.Hash.html
index 1a1bcaba85..c3bab58851 100644
--- a/pr/2638/docs/iroh_blobs/struct.Hash.html
+++ b/pr/2638/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
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
-sourcepub 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§
Trait Implementations§
Trait Implementations§
§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 moresource§impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
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.§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
source§impl PartialOrd for Hash
§impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for Hash
§type SelfType<'a> = Hash
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§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 typesource§impl Copy for Hash
source§impl Eq for Hash
source§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl Copy for Hash
§impl Eq for Hash
§impl StructuralPartialEq for Hash
Auto Trait Implementations§
§impl Freeze for Hash
§impl RefUnwindSafe for Hash
§impl Send for Hash
§impl Sync for Hash
§impl Unpin for Hash
§impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
Struct iroh_blobs::Hash
source · pub struct Hash(/* private fields */);Expand description
Hash type used throughout.
-Implementations§
source§impl Hash
impl Hash
sourcepub const fn from_bytes(bytes: [u8; 32]) -> Hash
pub const fn from_bytes(bytes: [u8; 32]) -> Hash
Create a Hash from its raw bytes representation.
sourcepub fn fmt_short(&self) -> String
pub fn fmt_short(&self) -> String
Convert to a base32 string limited to the first 10 bytes for a friendly string +
Struct iroh_blobs::Hash
pub struct Hash(/* private fields */);Expand description
Hash type used throughout.
+Implementations§
Trait Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for Hash
impl<'de> Deserialize<'de> for Hash
§fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Hash, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
source§impl FromIterator<Hash> for HashSeq
impl FromIterator<Hash> for HashSeq
source§impl FromIterator<Hash> for HashSeq
impl FromIterator<Hash> for HashSeq
source§impl MaxSize for Hash
impl MaxSize for Hash
source§const POSTCARD_MAX_SIZE: usize = 32usize
const POSTCARD_MAX_SIZE: usize = 32usize
§impl MaxSize for Hash
impl MaxSize for Hash
§const POSTCARD_MAX_SIZE: usize = 32usize
const POSTCARD_MAX_SIZE: usize = 32usize
§impl Ord for Hash
impl Ord for Hash
source§impl PartialOrd for Hash
impl PartialOrd for Hash
§impl PartialOrd for Hash
impl PartialOrd for Hash
§fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
fn partial_cmp(&self, other: &Hash) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more§impl Serialize for Hash
impl Serialize for Hash
§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
- S: Serializer,
source§impl Value for Hash
impl Value for Hash
§type SelfType<'a> = Hash
type SelfType<'a> = Hash
type AsBytes<'a> = &'a [u8; 32]
source§fn fixed_width() -> Option<usize>
fn fixed_width() -> Option<usize>
source§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
+ S: Serializer,
§impl Value for Hash
impl Value for Hash
§type SelfType<'a> = Hash
type SelfType<'a> = Hash
type AsBytes<'a> = &'a [u8; 32]
§fn fixed_width() -> Option<usize>
fn fixed_width() -> Option<usize>
§fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
Hash: 'a,
fn from_bytes<'a>(data: &'a [u8]) -> <Hash as Value>::SelfType<'a>where
Hash: 'a,
impl Copy for Hash
impl Eq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations§
impl Copy for Hash
impl Eq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations§
§impl<A, T> AsBits<T> for A
impl<A, T> AsBits<T> for A
§fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
fn as_bits<O>(&self) -> &BitSlice<T, O>where
diff --git a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html b/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
index 7cc7bd9f59..cf3a2169a6 100644
--- a/pr/2638/docs/iroh_blobs/struct.HashAndFormat.html
+++ b/pr/2638/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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
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: HashThe hash
§format: BlobFormatThe format
-Implementations§
source§impl HashAndFormat
sourcepub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
-sourcepub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
-sourcepub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
-Trait Implementations§
source§impl Clone for HashAndFormat
source§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for HashAndFormat
source§impl<'de> Deserialize<'de> for HashAndFormat
source§fn deserialize<D>(
+
Implementations§
§impl HashAndFormat
pub fn new(hash: Hash, format: BlobFormat) -> HashAndFormat
Create a new hash and format pair.
+pub fn raw(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the default (raw) format.
+pub fn hash_seq(hash: Hash) -> HashAndFormat
Create a new hash and format pair, using the collection format.
+Trait Implementations§
§impl Clone for HashAndFormat
§fn clone(&self) -> HashAndFormat
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more§impl Debug for HashAndFormat
§impl<'de> Deserialize<'de> for HashAndFormat
§fn deserialize<D>(
deserializer: D
) -> Result<HashAndFormat, <D as Deserializer<'de>>::Error>where
- D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.source§impl FromStr for HashAndFormat
source§impl Hash for HashAndFormat
§impl Display for HashAndFormat
source§impl From<DownloadKind> for HashAndFormat
source§fn from(value: DownloadKind) -> Self
Converts to this type from the input type.source§impl From<HashAndFormat> for DownloadKind
source§fn from(value: HashAndFormat) -> Self
Converts to this type from the input type.§impl FromStr for HashAndFormat
§impl Hash for HashAndFormat
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
§impl MaxSize for HashAndFormat
§const POSTCARD_MAX_SIZE: usize = 33usize
The maximum possible size that the serialization of this
+type can have, in bytes.§impl Ord for HashAndFormat
source§impl PartialEq for HashAndFormat
§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 ==.source§impl PartialOrd for HashAndFormat
§impl PartialOrd for HashAndFormat
§fn partial_cmp(&self, other: &HashAndFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read 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 moresource§impl Value for HashAndFormat
§type SelfType<'a> = HashAndFormat
SelfType<’a> must be the same type as Self with all lifetimes replaced with ’a§type AsBytes<'a> = [u8; 33]
source§fn fixed_width() -> Option<usize>
Width of a fixed type, or None for variable widthsource§fn from_bytes<'a>(data: &'a [u8]) -> <HashAndFormat as Value>::SelfType<'a>where
+ 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§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 slicesource§impl Copy for HashAndFormat
source§impl Eq for HashAndFormat
source§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
§impl Freeze for HashAndFormat
§impl RefUnwindSafe for HashAndFormat
§impl Send for HashAndFormat
§impl Sync for HashAndFormat
§impl Unpin for HashAndFormat
§impl UnwindSafe for HashAndFormat
Blanket Implementations§
source§impl<T> Any for Twhere
+ HashAndFormat: 'a + 'b,
Serialize the value to a slice§impl Copy for HashAndFormat
§impl Eq for HashAndFormat
§impl StructuralPartialEq for HashAndFormat
Auto Trait Implementations§
impl Freeze for HashAndFormat
impl RefUnwindSafe for HashAndFormat
impl Send for HashAndFormat
impl Sync for HashAndFormat
impl Unpin for HashAndFormat
impl UnwindSafe for HashAndFormat
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
index 6c70a0ff39..cfd29c2ce8 100644
--- a/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
+++ b/pr/2638/docs/iroh_docs/actor/struct.SyncHandle.html
@@ -26,7 +26,7 @@ waiting for the actor to finish happens in an async context, and therefore that
namespace: NamespaceId,
author: AuthorId,
key: Bytes,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<()>sourcepub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
pub async fn delete_prefix(
&self,
diff --git a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
index bb74b62f4d..5b67512912 100644
--- a/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/enum.LiveEvent.html
@@ -3,34 +3,34 @@
entry: Entry,
},
InsertRemote {
- from: PublicKey,
+ from: PublicKey,
entry: Entry,
content_status: ContentStatus,
},
ContentReady {
- hash: Hash,
+ hash: Hash,
},
PendingContentReady,
- NeighborUp(PublicKey),
- NeighborDown(PublicKey),
+ NeighborUp(PublicKey),
+ NeighborDown(PublicKey),
SyncFinished(SyncEvent),
}Expand description
Events informing about actions of the live sync progress.
Variants§
§InsertLocal
A local insertion.
§InsertRemote
Received a remote insert.
-Fields
§from: PublicKeyThe peer that sent us the entry.
+Fields
§from: PublicKeyThe peer that sent us the entry.
§content_status: ContentStatusIf the content is available at the local node
§ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
§hash: HashThe content hash of the newly available entry content
+Fields
§hash: HashThe content hash of the newly available entry content
§PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either
completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If
blobs failed to download, this event will still be emitted after all operations completed.
-§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+§NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+§NeighborDown(PublicKey)
We lost a neighbor in the swarm.
§SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
This method tests for self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an [EntryStatus] into a [‘ContentStatus’].
+entry_to_content_status in iroh_docs::engine - Rust Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatus
Expand description
Converts an EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/index.html b/pr/2638/docs/iroh_docs/engine/index.html
index 5f78e23386..622ab4b871 100644
--- a/pr/2638/docs/iroh_docs/engine/index.html
+++ b/pr/2638/docs/iroh_docs/engine/index.html
@@ -1,4 +1,4 @@
iroh_docs::engine - Rust 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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
\ No newline at end of file
+peers and a gossip swarm for each syncing document.Event emitted when a sync operation completes Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatus into a [‘ContentStatus’].
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/engine/struct.Engine.html b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
index c2fd2f4807..b6924a903d 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.Engine.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.Engine.html
@@ -8,12 +8,12 @@ peers and a gossip swarm for each syncing document.
Fields§
§endpoint: EndpointEndpoint used by the engine.
§sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
Implementations§
source§impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the sourcepub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
Start to sync a document.
If peers is non-empty, it will both do an initial set-reconciliation sync with each peer,
and join an iroh-gossip swarm with these peers to receive and broadcast document updates.
diff --git a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
index cce39940b5..5b713133bd 100644
--- a/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
+++ b/pr/2638/docs/iroh_docs/engine/struct.SyncEvent.html
@@ -1,11 +1,11 @@
SyncEvent in iroh_docs::engine - Rust pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}
Expand description
Event emitted when a sync operation completes
-Fields§
§peer: PublicKeyPeer we synced with
+Fields§
§peer: PublicKeyPeer we synced with
§origin: OriginOrigin of the sync exchange
§finished: SystemTimeTimestamp when the sync started
§started: SystemTimeTimestamp when the sync finished
diff --git a/pr/2638/docs/iroh_docs/index.html b/pr/2638/docs/iroh_docs/index.html
index 41c792c5e5..a37d30e2a6 100644
--- a/pr/2638/docs/iroh_docs/index.html
+++ b/pr/2638/docs/iroh_docs/index.html
@@ -1,7 +1,7 @@
iroh_docs - Rust Expand description
Multi-dimensional key-value documents with an efficient synchronization protocol
The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica.
All entries in a replica are signed with two keypairs:
diff --git a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
index b3db0e4a8f..0adab34807 100644
--- a/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
+++ b/pr/2638/docs/iroh_docs/metrics/struct.Metrics.html
@@ -1,27 +1,27 @@
Metrics in iroh_docs::metrics - Rust pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
}
Expand description
Metrics for iroh-docs
-Fields§
§new_entries_local: Counter§new_entries_remote: Counter§new_entries_local_size: Counter§new_entries_remote_size: Counter§sync_via_connect_success: Counter§sync_via_connect_failure: Counter§sync_via_accept_success: Counter§sync_via_accept_failure: Counter§actor_tick_main: Counter§doc_gossip_tick_main: Counter§doc_gossip_tick_event: Counter§doc_gossip_tick_actor: Counter§doc_gossip_tick_pending_join: Counter§doc_live_tick_main: Counter§doc_live_tick_actor: Counter§doc_live_tick_replica_event: Counter§doc_live_tick_running_sync_connect: Counter§doc_live_tick_running_sync_accept: Counter§doc_live_tick_pending_downloads: CounterTrait Implementations§
source§impl Metric for Metrics
source§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: CounterTrait Implementations§
source§impl Metric for Metrics
§fn with_metric<T, F>(f: F)
Access to this metrics group to record a metric.
-Only records if this metric is registered in the global registry.source§fn try_get() -> Option<&'static Self>
Attempts to get the current metric from the global registry.Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
§impl Freeze for Metrics
§impl RefUnwindSafe for Metrics
§impl Send for Metrics
§impl Sync for Metrics
§impl Unpin for Metrics
§impl UnwindSafe for Metrics
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
index 36f6ee01ef..f852287d7b 100644
--- a/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
+++ b/pr/2638/docs/iroh_docs/net/enum.AcceptError.html
@@ -3,31 +3,31 @@
error: Error,
},
Open {
- peer: PublicKey,
+ peer: PublicKey,
error: Error,
},
Abort {
- peer: PublicKey,
+ peer: PublicKey,
namespace: NamespaceId,
reason: AbortReason,
},
Sync {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
Close {
- peer: PublicKey,
+ peer: PublicKey,
namespace: Option<NamespaceId>,
error: Error,
},
}Expand description
Errors that may occur on handling incoming sync connections.
Variants§
§Connect
Failed to establish connection
§Open
Failed to open replica
-§Abort
We aborted the sync request.
-§Sync
Failed to run sync
-§Close
Failed to close
-Implementations§
source§impl AcceptError
Implementations§
source§impl AcceptError
Trait Implementations§
source§impl Debug for AcceptError
source§impl Display for AcceptError
source§impl Error for AcceptError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more1.0.0 · source§fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()Auto Trait Implementations§
§impl Freeze for AcceptError
§impl RefUnwindSafe for AcceptError
§impl Send for AcceptError
§impl Sync for AcceptError
§impl Unpin for AcceptError
§impl UnwindSafe for AcceptError
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
index 055cbf1e3c..e4ee4a1d00 100644
--- a/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
+++ b/pr/2638/docs/iroh_docs/net/fn.connect_and_sync.html
@@ -2,6 +2,6 @@
endpoint: &Endpoint,
sync: &SyncHandle,
namespace: NamespaceId,
- peer: NodeAddr
+ peer: NodeAddr
) -> Result<SyncFinished, ConnectError>Expand description
Connect to a peer and sync a replica
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
index 3dc400f949..c7e5390970 100644
--- a/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
+++ b/pr/2638/docs/iroh_docs/net/fn.handle_connection.html
@@ -3,6 +3,6 @@
connecting: Connecting,
accept_cb: F
) -> Result<SyncFinished, AcceptError>where
- F: Fn(NamespaceId, PublicKey) -> Fut,
+ F: Fn(NamespaceId, PublicKey) -> Fut,
Fut: Future<Output = AcceptOutcome>,Expand description
Handle an iroh-docs connection and sync all shared documents in the replica store.
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
index 761d1cdb9f..94c5865cd7 100644
--- a/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
+++ b/pr/2638/docs/iroh_docs/net/struct.SyncFinished.html
@@ -1,11 +1,11 @@
SyncFinished in iroh_docs::net - Rust Struct iroh_docs::net::SyncFinished
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}
Expand description
Details of a finished sync operation.
Fields§
§namespace: NamespaceIdThe namespace that was synced.
-§peer: PublicKeyThe peer we syned with.
+§peer: PublicKeyThe peer we syned with.
§outcome: SyncOutcomeThe outcome of the sync operation
§timings: TimingsThe time this operation took
Trait Implementations§
source§impl Clone for SyncFinished
source§fn clone(&self) -> SyncFinished
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moreAuto Trait Implementations§
§impl Freeze for SyncFinished
§impl RefUnwindSafe for SyncFinished
§impl Send for SyncFinished
§impl Sync for SyncFinished
§impl Unpin for SyncFinished
§impl UnwindSafe for SyncFinished
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
index df1fc8865f..8bebf68ec6 100644
--- a/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
+++ b/pr/2638/docs/iroh_docs/store/fs/struct.ContentHashesIterator.html
@@ -6,7 +6,7 @@ It needs a copy of a redb::ReadOnlyTable to be self-contained.
Implementations§
Trait Implementations§
source§impl Debug for ContentHashesIterator
Trait Implementations§
source§impl Debug for ContentHashesIterator
source§impl Iterator for ContentHashesIterator
source§fn next(&mut self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read moresource§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 more1.0.0 · source§fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more1.0.0 · source§fn count(self) -> usizewhere
diff --git a/pr/2638/docs/iroh_docs/struct.DocTicket.html b/pr/2638/docs/iroh_docs/struct.DocTicket.html
index 0b9567c918..bad3e76f79 100644
--- a/pr/2638/docs/iroh_docs/struct.DocTicket.html
+++ b/pr/2638/docs/iroh_docs/struct.DocTicket.html
@@ -1,13 +1,13 @@
DocTicket in iroh_docs - Rust pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}
Expand description
Contains both a key (either secret or public) to a document, and a list of peers to join.
Fields§
§capability: Capabilityeither a public or private key
-§nodes: Vec<NodeAddr>A list of nodes to contact.
-Implementations§
source§impl DocTicket
sourcepub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
Create a new doc ticket
+§nodes: Vec<NodeAddr>A list of nodes to contact.
+Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for DocTicket
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
- __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
source§impl<T> Any for Twhere
+ __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moreAuto Trait Implementations§
§impl Freeze for DocTicket
§impl RefUnwindSafe for DocTicket
§impl Send for DocTicket
§impl Sync for DocTicket
§impl Unpin for DocTicket
§impl UnwindSafe for DocTicket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Entry.html b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
index d1fb1faa87..06a256d8a3 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Entry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Entry.html
@@ -1,6 +1,6 @@
Entry in iroh_docs::sync - Rust pub struct Entry { /* private fields */ }
Expand description
A single entry in a Replica
An entry is identified by a key, its Author, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
Implementations§
source§impl Entry
sourcepub fn new(id: RecordIdentifier, record: Record) -> Self
Create a new entry
sourcepub fn new_empty(id: RecordIdentifier) -> Self
Create a new empty entry with the current timestamp.
@@ -15,7 +15,7 @@ of the entry’s content data, the size of this content data, and a timestamp.
sourcepub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
Sign this entry with a NamespaceSecret and Author.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for Entry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Record.html b/pr/2638/docs/iroh_docs/sync/struct.Record.html
index 9848e9b7d7..64887e1d89 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Record.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Record.html
@@ -1,11 +1,11 @@
Record in iroh_docs::sync - Rust pub struct Record { /* private fields */ }
Expand description
The data part of an entry in a Replica.
-Implementations§
source§impl Record
Implementations§
source§impl Record
sourcepub fn empty_current() -> Self
Create a tombstone record with the timestamp set to now.
sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
+sourcepub fn new_current(hash: Hash, len: u64) -> Self
Create a new Record with the timestamp set to now.
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Record
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl Ord for Record
Ordering for entry values.
diff --git a/pr/2638/docs/iroh_docs/sync/struct.Replica.html b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
index c4e161f3c3..23a9798651 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.Replica.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.Replica.html
@@ -5,7 +5,7 @@
&mut self,
key: impl AsRef<[u8]>,
author: &Author,
- hash: Hash,
+ hash: Hash,
len: u64
) -> Result<usize, InsertError>Insert a new record at the given key.
The entry will by signed by the provided author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.
key: impl AsRef<[u8]>,
author: &Author,
data: impl AsRef<[u8]>
-) -> Result<Hash, InsertError>Hashes the given data and inserts it.
+) -> Result<Hash, InsertError>Hashes the given data and inserts it.
This does not store the content, just the record of it.
Returns the calculated hash.
sourcepub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
sourcepub fn signature(&self) -> &EntrySignature
Get the signature.
sourcepub fn validate_empty(&self) -> Result<(), ValidationFailure>
Validate that the entry has the empty hash if the length is 0, or a non-zero length.
sourcepub fn content_hash(&self) -> Hash
Get the content Hash of the entry.
+sourcepub fn content_hash(&self) -> Hash
Get the content [struct@Hash] of the entry.
sourcepub fn content_len(&self) -> u64
Get the content length of the entry.
Get the author bytes of this entry.
Methods from Deref<Target = Record>§
sourcepub fn content_len(&self) -> u64
Get the length of the data addressed by this record’s content hash.
-sourcepub fn content_hash(&self) -> Hash
Get the Hash of the content data of this record.
+sourcepub fn content_hash(&self) -> Hash
Get the [struct@Hash] of the content data of this record.
Trait Implementations§
source§impl Clone for SignedEntry
source§fn clone(&self) -> SignedEntry
Returns a copy of the value. Read more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for SignedEntry
source§impl Deref for SignedEntry
source§impl<'de> Deserialize<'de> for SignedEntry
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read moresource§impl From<SignedEntry> for Entry
source§fn from(value: SignedEntry) -> Self
Converts to this type from the input type.source§impl Ord for SignedEntry
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
index 84ffdbe8ee..46d5a5a49c 100644
--- a/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
+++ b/pr/2638/docs/iroh_docs/sync/type.ContentStatusCallback.html
@@ -1,2 +1,2 @@
-ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
+ContentStatusCallback in iroh_docs::sync - Rust Type Alias iroh_docs::sync::ContentStatusCallback
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;
Expand description
Callback that may be set on a replica to determine the availability status for a content hash.
Aliased Type§
struct ContentStatusCallback { /* private fields */ }
\ No newline at end of file
diff --git a/pr/2638/docs/iroh_gossip/net/enum.Command.html b/pr/2638/docs/iroh_gossip/net/enum.Command.html
index 600c610824..6c35c606e2 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.Command.html
+++ b/pr/2638/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<'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 moreAuto Trait Implementations§
§impl !Freeze for Command
§impl RefUnwindSafe for Command
§impl Send for Command
§impl Sync for Command
§impl Unpin for Command
§impl UnwindSafe for Command
Blanket Implementations§
source§impl<T> Any for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html b/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
index c63d0f1288..b8690ded0e 100644
--- a/pr/2638/docs/iroh_gossip/net/enum.GossipEvent.html
+++ b/pr/2638/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 more1.0.0 · source§fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read moresource§impl Debug for GossipEvent
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 moresource§impl Ord for GossipEvent
source§impl From<Event<PublicKey>> for GossipEvent
source§impl Ord for GossipEvent
source§fn cmp(&self, other: &GossipEvent) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§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/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/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
sourcepub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
Spawn a gossip actor and get a handle for it
sourcepub fn max_message_size(&self) -> usize
Get the maximum message size configured for this gossip actor.
sourcepub async fn handle_connection(&self, conn: Connection) -> Result<()>
Handle an incoming [Connection].
@@ -21,7 +21,7 @@ gossip actor through sourcepub 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.
sourcepub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/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
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
+Implementations§
source§impl GossipReceiver
sourcepub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Lists our current direct neighbors.
sourcepub 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/2638/docs/iroh_gossip/net/struct.GossipSender.html b/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
index 2f1f00e31d..805a9d514f 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipSender.html
+++ b/pr/2638/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
sourcepub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
Broadcast a message to our direct neighbors.
-sourcepub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Join a set of peers.
Trait Implementations§
Auto Trait Implementations§
§impl Freeze for GossipSender
§impl RefUnwindSafe for GossipSender
§impl Send for GossipSender
§impl Sync for GossipSender
§impl Unpin for GossipSender
§impl UnwindSafe for GossipSender
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
diff --git a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html b/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
index a1d436f18e..fc9bce32ef 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.JoinOptions.html
+++ b/pr/2638/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: usizeThe 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
sourcepub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
Creates JoinOptions with the provided bootstrap nodes and the default subscription
+
Implementations§
source§impl JoinOptions
sourcepub 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§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 moresource§impl Serialize for JoinOptions
source§fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Message.html b/pr/2638/docs/iroh_gossip/net/struct.Message.html
index 148d3dd789..cec746fafc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Message.html
+++ b/pr/2638/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: BytesThe content of the message
§scope: DeliveryScopeThe scope of the message.
This tells us if the message is from a direct neighbor or actual gossip.
-§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
+§delivered_from: NodeIdThe node that delivered the message. This is not the same as the original author.
Trait Implementations§
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 moresource§impl Ord for Message
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more1.21.0 · source§fn min(self, other: Self) -> Selfwhere
diff --git a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html b/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
index bb3b32a214..83257af5b2 100644
--- a/pr/2638/docs/iroh_gossip/net/type.ProtoCommand.html
+++ b/pr/2638/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
Expand description
Events informing about actions of the live sync progress.
InsertLocal
A local insertion.
InsertRemote
Received a remote insert.
-Fields
from: PublicKeyThe peer that sent us the entry.
+Fields
from: PublicKeyThe peer that sent us the entry.
content_status: ContentStatusIf the content is available at the local node
ContentReady
The content of an entry was downloaded and is now available at the local node
-Fields
hash: HashThe content hash of the newly available entry content
+Fields
hash: HashThe content hash of the newly available entry content
PendingContentReady
All pending content is now ready.
This event signals that all queued content downloads from the last sync run have either completed or failed.
It will only be emitted after a Self::SyncFinished event, never before.
Receiving this event does not guarantee that all content in the document is available. If blobs failed to download, this event will still be emitted after all operations completed.
-NeighborUp(PublicKey)
We have a new neighbor in the swarm.
-NeighborDown(PublicKey)
We lost a neighbor in the swarm.
+NeighborUp(PublicKey)
We have a new neighbor in the swarm.
+NeighborDown(PublicKey)
We lost a neighbor in the swarm.
SyncFinished(SyncEvent)
A set-reconciliation sync finished.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LiveEvent
impl<'de> Deserialize<'de> for LiveEvent
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for LiveEvent
impl PartialEq for LiveEvent
source§fn eq(&self, other: &LiveEvent) -> bool
fn eq(&self, other: &LiveEvent) -> bool
self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
index 459a6719d2..3b39df6428 100644
--- a/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
+++ b/pr/2638/docs/iroh_docs/engine/fn.entry_to_content_status.html
@@ -1,2 +1,2 @@
-Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatusExpand description
Converts an [EntryStatus] into a [‘ContentStatus’].
Function iroh_docs::engine::entry_to_content_status
source · pub fn entry_to_content_status(entry: Result<EntryStatus>) -> ContentStatusExpand description
Converts an EntryStatus into a [‘ContentStatus’].
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§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an [
EntryStatus] into a [‘ContentStatus’].
Enums§
- Where to persist the default author.
- Events informing about actions of the live sync progress.
- Why we performed a sync exchange
- Why we started a sync request
Functions§
- Converts an
EntryStatusinto a [‘ContentStatus’].
Fields§
§endpoint: EndpointEndpoint used by the engine.
sync: SyncHandleHandle to the actor thread.
The persistent default author for this engine.
-Implementations§
source§impl Engine
impl Engine
Implementations§
source§impl Engine
impl Engine
sourcepub async fn spawn<B: Store>(
endpoint: Endpoint,
gossip: Gossip,
replica_store: Store,
bao_store: B,
- downloader: Downloader,
+ downloader: Downloader,
default_author_storage: DefaultAuthorStorage
) -> Result<Self>
pub async fn spawn<B: Store>( endpoint: Endpoint, gossip: Gossip, replica_store: Store, bao_store: B, - downloader: Downloader, + downloader: Downloader, default_author_storage: DefaultAuthorStorage ) -> Result<Self>
Start the sync engine.
This will spawn two tokio tasks for the live sync coordination and gossip actors, and a
@@ -21,7 +21,7 @@ thread for the Start to sync a document. If Event emitted when a sync operation completes Peer we synced with Peer we synced with Origin of the sync exchange Timestamp when the sync started Timestamp when the sync finished Multi-dimensional key-value documents with an efficient synchronization protocol The crate operates on Replicas. A replica contains an unlimited number of
Entries. Each entry is identified by a key, its author, and the replica’s
-namespace. Its value is the 32-byte BLAKE3 hash
+namespace. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.
The content data itself is not stored or transferred through a replica. All entries in a replica are signed with two keypairs: Metrics for iroh-docs Errors that may occur on handling incoming sync connections. Failed to establish connection Failed to open replica We aborted the sync request. Failed to run sync Failed to close Connect to a peer and sync a replica Handle an iroh-docs connection and sync all shared documents in the replica store. Details of a finished sync operation. The namespace that was synced. The peer we syned with. The peer we syned with. The outcome of the sync operation The time this operation took Contains both a key (either secret or public) to a document, and a list of peers to join. either a public or private key A list of nodes to contact. Create a new doc ticket A list of nodes to contact. A single entry in a An entry is identified by a key, its Create a new entry Create a new empty entry with the current timestamp. Sign this entry with a Get the length of the data addressed by this record’s content hash. Get the Get the [ The data part of an entry in a Create a tombstone record with the timestamp set to now. Create a new Create a new Get the length of the data addressed by this record’s content hash. Get the Get the [ Ordering for entry values. Insert a new record at the given key. The entry will by signed by the provided Hashes the given data and inserts it. Hashes the given data and inserts it. This does not store the content, just the record of it.
Returns the calculated hash. Get the signature. Validate that the entry has the empty hash if the length is 0, or a non-zero length. Get the content Get the content [ Get the content length of the entry. Get the author bytes of this entry. Get the length of the data addressed by this record’s content hash. Get the Get the [ Callback that may be set on a replica to determine the availability status for a content hash. Callback that may be set on a replica to determine the availability status for a content hash. Send a gossip message Broadcast a message to all nodes in the swarm Broadcast a message to all direct neighbors Connect to a set of peers Connect to a set of peers Events emitted from a gossip topic. These are the events emitted from a We joined the topic with at least one peer. We joined the topic with at least one peer. This is the first event on a We have a new, direct neighbor in the swarm membership layer for this topic. We dropped direct neighbor in the swarm membership layer for this topic. We have a new, direct neighbor in the swarm membership layer for this topic. We dropped direct neighbor in the swarm membership layer for this topic. We received a gossip message for this topic. 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 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. Spawn a gossip actor and get a handle for it Get the maximum message size configured for this gossip actor. Handle an incoming [ Join a gossip topic with the default options and wait for at least one active connection. Receiver for gossip events on a topic. This is a [ Lists our current direct neighbors. Lists our current direct neighbors. Waits until we are connected to at least one node. This progresses the stream until we received Sender for a gossip topic. Broadcast a message to our direct neighbors. Join a set of peers. Options for joining a gossip topic. The initial bootstrap nodes The initial bootstrap nodes The maximum number of messages that can be buffered in a subscription. If this limit is reached, the subscriber will receive a 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. Creates Creates A gossip message The content of the message The scope of the message.
This tells us if the message is from a direct neighbor or actual gossip. The node that delivered the message. This is not the same as the original author. The node that delivered the message. This is not the same as the original author. Commands for the gossip protocolpub async fn start_sync(
&self,
namespace: NamespaceId,
- peers: Vec<NodeAddr>
+ peers: Vec<NodeAddr>
) -> Result<()>
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.pub struct SyncEvent {
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub origin: Origin,
pub finished: SystemTime,
pub started: SystemTime,
pub result: Result<SyncDetails, String>,
}Expand description
Fields§
§peer: PublicKeyFields§
§peer: PublicKeyorigin: Originfinished: SystemTimestarted: SystemTimeExpand description
pub struct Metrics {Show 19 fields
- pub new_entries_local: Counter,
- pub new_entries_remote: Counter,
- pub new_entries_local_size: Counter,
- pub new_entries_remote_size: Counter,
- pub sync_via_connect_success: Counter,
- pub sync_via_connect_failure: Counter,
- pub sync_via_accept_success: Counter,
- pub sync_via_accept_failure: Counter,
- pub actor_tick_main: Counter,
- pub doc_gossip_tick_main: Counter,
- pub doc_gossip_tick_event: Counter,
- pub doc_gossip_tick_actor: Counter,
- pub doc_gossip_tick_pending_join: Counter,
- pub doc_live_tick_main: Counter,
- pub doc_live_tick_actor: Counter,
- pub doc_live_tick_replica_event: Counter,
- pub doc_live_tick_running_sync_connect: Counter,
- pub doc_live_tick_running_sync_accept: Counter,
- pub doc_live_tick_pending_downloads: Counter,
+ pub new_entries_local: Counter,
+ pub new_entries_remote: Counter,
+ pub new_entries_local_size: Counter,
+ pub new_entries_remote_size: Counter,
+ pub sync_via_connect_success: Counter,
+ pub sync_via_connect_failure: Counter,
+ pub sync_via_accept_success: Counter,
+ pub sync_via_accept_failure: Counter,
+ pub actor_tick_main: Counter,
+ pub doc_gossip_tick_main: Counter,
+ pub doc_gossip_tick_event: Counter,
+ pub doc_gossip_tick_actor: Counter,
+ pub doc_gossip_tick_pending_join: Counter,
+ pub doc_live_tick_main: Counter,
+ pub doc_live_tick_actor: Counter,
+ pub doc_live_tick_replica_event: Counter,
+ pub doc_live_tick_running_sync_connect: Counter,
+ pub doc_live_tick_running_sync_accept: Counter,
+ pub doc_live_tick_pending_downloads: Counter,
Expand description
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: CounterTrait Implementations§
impl Metric for Metrics
fn with_metric<T, F>(f: F)
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: CounterTrait Implementations§
impl Metric for Metrics
fn with_metric<T, F>(f: F)
fn try_get() -> Option<&'static Self>
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
impl<'a, T, E> AsTaggedImplicit<'a, E> for T
Expand description
Variants§
Connect
Open
Abort
Sync
Close
Implementations§
impl AcceptError
Implementations§
impl AcceptError
Trait Implementations§
impl Debug for AcceptError
impl Display for AcceptError
impl Error for AcceptError
fn source(&self) -> Option<&(dyn Error + 'static)>
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for AcceptError
impl RefUnwindSafe for AcceptError
impl Send for AcceptError
impl Sync for AcceptError
impl Unpin for AcceptError
impl UnwindSafe for AcceptError
Blanket Implementations§
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
Expand description
Expand description
Struct iroh_docs::
source · pub struct SyncFinished {
pub namespace: NamespaceId,
- pub peer: PublicKey,
+ pub peer: PublicKey,
pub outcome: SyncOutcome,
pub timings: Timings,
}Expand description
Fields§
§namespace: NamespaceIdpeer: PublicKeypeer: PublicKeyoutcome: SyncOutcometimings: TimingsTrait Implementations§
impl Clone for SyncFinished
fn clone(&self) -> SyncFinished
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SyncFinished
impl RefUnwindSafe for SyncFinished
impl Send for SyncFinished
impl Sync for SyncFinished
impl Unpin for SyncFinished
impl UnwindSafe for SyncFinished
Blanket Implementations§
impl<T> Any for T
Implementations§
Trait Implementations§
impl Debug for ContentHashesIterator
Trait Implementations§
impl Debug for ContentHashesIterator
impl Iterator for ContentHashesIterator
fn next(&mut self) -> Option<Self::Item>
fn next_chunk<const N: usize>(
&mut self
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
iter_next_chunk)N values. Read morefn size_hint(&self) -> (usize, Option<usize>)
fn count(self) -> usize
pub struct DocTicket {
pub capability: Capability,
- pub nodes: Vec<NodeAddr>,
+ pub nodes: Vec<NodeAddr>,
}Expand description
Fields§
§capability: Capabilitynodes: Vec<NodeAddr>Implementations§
impl DocTicket
pub fn new(capability: Capability, peers: Vec<NodeAddr>) -> Self
nodes: Vec<NodeAddr>Implementations§
Trait Implementations§
impl<'de> Deserialize<'de> for DocTicket
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
Auto Trait Implementations§
impl Freeze for DocTicket
impl RefUnwindSafe for DocTicket
impl Send for DocTicket
impl Sync for DocTicket
impl Unpin for DocTicket
impl UnwindSafe for DocTicket
Blanket Implementations§
impl<T> Any for T
Auto Trait Implementations§
impl Freeze for DocTicket
impl RefUnwindSafe for DocTicket
impl Send for DocTicket
impl Sync for DocTicket
impl Unpin for DocTicket
impl UnwindSafe for DocTicket
Blanket Implementations§
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
impl<'a, T, E> AsTaggedImplicit<'a, E> for T
pub struct Entry { /* private fields */ }Expand description
ReplicaAuthor, and the Replica’s
-NamespaceSecret. Its value is the 32-byte BLAKE3 hash
+NamespaceSecret. Its value is the 32-byte BLAKE3 hash
of the entry’s content data, the size of this content data, and a timestamp.Implementations§
impl Entry
pub fn new(id: RecordIdentifier, record: Record) -> Self
pub fn new_empty(id: RecordIdentifier) -> Self
pub fn sign(self, namespace: &NamespaceSecret, author: &Author) -> SignedEntry
NamespaceSecret and Author.Methods from Deref<Target = Record>§
pub fn content_len(&self) -> u64
pub fn content_hash(&self) -> Hash
Hash of the content data of this record.pub fn content_hash(&self) -> Hash
struct@Hash] of the content data of this record.Trait Implementations§
impl<'de> Deserialize<'de> for Entry
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
impl From<SignedEntry> for Entry
fn from(value: SignedEntry) -> Self
impl Ord for Entry
fn max(self, other: Self) -> Self
pub struct Record { /* private fields */ }Expand description
Replica.Implementations§
impl Record
Implementations§
impl Record
pub fn empty_current() -> Self
pub fn new_current(hash: Hash, len: u64) -> Self
Record with the timestamp set to now.pub fn new_current(hash: Hash, len: u64) -> Self
Record with the timestamp set to now.pub fn content_len(&self) -> u64
pub fn content_hash(&self) -> Hash
Hash of the content data of this record.pub fn content_hash(&self) -> Hash
struct@Hash] of the content data of this record.Trait Implementations§
impl<'de> Deserialize<'de> for Record
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
impl Ord for Record
author.
@@ -35,7 +35,7 @@ or an error if the entry failed to validate or if a store operation failed.pub fn record_id(
diff --git a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
index d588c9a0fd..b03a4db008 100644
--- a/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
+++ b/pr/2638/docs/iroh_docs/sync/struct.SignedEntry.html
@@ -14,7 +14,7 @@
pub fn signature(&self) -> &EntrySignature
pub fn validate_empty(&self) -> Result<(), ValidationFailure>
pub fn content_hash(&self) -> Hash
Hash of the entry.pub fn content_hash(&self) -> Hash
struct@Hash] of the entry.pub fn content_len(&self) -> u64
Methods from Deref<Target = Record>§
pub fn content_len(&self) -> u64
pub fn content_hash(&self) -> Hash
Hash of the content data of this record.pub fn content_hash(&self) -> Hash
struct@Hash] of the content data of this record.Trait Implementations§
impl Clone for SignedEntry
fn clone(&self) -> SignedEntry
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Debug for SignedEntry
impl Deref for SignedEntry
impl<'de> Deserialize<'de> for SignedEntry
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
impl From<SignedEntry> for Entry
fn from(value: SignedEntry) -> Self
impl Ord for SignedEntry
fn max(self, other: Self) -> Self
Type Alias iroh_docs::
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;Expand description
Type Alias iroh_docs::
source · pub type ContentStatusCallback = Arc<dyn Fn(Hash) -> ContentStatus + Send + Sync + 'static>;Expand description
Aliased Type§
struct ContentStatusCallback { /* private fields */ }Enum iroh_gossip::
source · pub enum Command {
Broadcast(Bytes),
BroadcastNeighbors(Bytes),
- JoinPeers(Vec<NodeId>),
+ JoinPeers(Vec<NodeId>),
}Expand description
Variants§
Broadcast(Bytes)
BroadcastNeighbors(Bytes)
JoinPeers(Vec<NodeId>)
JoinPeers(Vec<NodeId>)
Trait Implementations§
impl<'de> Deserialize<'de> for Command
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
Auto Trait Implementations§
impl !Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
impl<T> Any for T
Enum iroh_gossip::
source · pub enum GossipEvent {
- Joined(Vec<NodeId>),
- NeighborUp(NodeId),
- NeighborDown(NodeId),
+ Joined(Vec<NodeId>),
+ NeighborUp(NodeId),
+ NeighborDown(NodeId),
Received(Message),
}Expand description
GossipReceiver, wrapped in Event::Gossip.Variants§
Joined(Vec<NodeId>)
Variants§
Joined(Vec<NodeId>)
GossipReceiver and will only be emitted once.NeighborUp(NodeId)
NeighborDown(NodeId)
NeighborUp(NodeId)
NeighborDown(NodeId)
Received(Message)
Trait Implementations§
impl Clone for GossipEvent
fn clone(&self) -> GossipEvent
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Debug for GossipEvent
impl<'de> Deserialize<'de> for GossipEvent
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
impl Ord for GossipEvent
impl From<Event<PublicKey>> for GossipEvent
impl Ord for GossipEvent
fn cmp(&self, other: &GossipEvent) -> Ordering
fn max(self, other: Self) -> Self
impl PartialEq for GossipEvent
fn eq(&self, other: &GossipEvent) -> bool
self and other values to be equal, and is used
diff --git a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
index 04fd185aac..9e5a2918cc 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
+++ b/pr/2638/docs/iroh_gossip/net/struct.Gossip.html
@@ -1,7 +1,7 @@
Struct iroh_gossip::
source · pub struct Gossip { /* private fields */ }Expand description
PublicKey of at least one peer that also joined the topic.PublicKey] of at least one peer that also joined the topic.
Implementations§
impl Gossip
pub fn from_endpoint(
endpoint: Endpoint,
config: Config,
- my_addr: &AddrInfo
+ my_addr: &AddrInfo
) -> Self
pub fn max_message_size(&self) -> usize
pub async fn handle_connection(&self, conn: Connection) -> Result<()>
Connection].pub async fn join(
&self,
topic_id: TopicId,
- bootstrap: Vec<NodeId>
+ bootstrap: Vec<NodeId>
) -> Result<GossipTopic>
pub fn join_with_opts(
&self,
diff --git a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
index 994780840d..a7ae3ec70d 100644
--- a/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
+++ b/pr/2638/docs/iroh_gossip/net/struct.GossipReceiver.html
@@ -1,6 +1,6 @@
Struct iroh_gossip::
source · pub struct GossipReceiver { /* private fields */ }Expand description
Stream] of Events emitted from the topic.Implementations§
impl GossipReceiver
pub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
Implementations§
impl GossipReceiver
pub fn neighbors(&self) -> impl Iterator<Item = NodeId> + '_
pub async fn joined(&mut self) -> Result<()>
GossipEvent::Joined, which is the first
item emitted on the stream.Struct iroh_gossip::
source · pub struct GossipSender(/* private fields */);Expand description
Implementations§
impl GossipSender
pub async fn broadcast_neighbors(&self, message: Bytes) -> Result<()>
pub async fn join_peers(&self, peers: Vec<NodeId>) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GossipSender
impl RefUnwindSafe for GossipSender
impl Send for GossipSender
impl Sync for GossipSender
impl Unpin for GossipSender
impl UnwindSafe for GossipSender
Blanket Implementations§
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
impl<'a, T, E> AsTaggedExplicit<'a, E> for T
Struct iroh_gossip::
source · pub struct JoinOptions {
- pub bootstrap: BTreeSet<NodeId>,
+ pub bootstrap: BTreeSet<NodeId>,
pub subscription_capacity: usize,
}Expand description
Fields§
§bootstrap: BTreeSet<NodeId>Fields§
§bootstrap: BTreeSet<NodeId>subscription_capacity: usizeLagged response,
the message will be dropped, and the subscriber will be closed.Implementations§
impl JoinOptions
pub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
JoinOptions with the provided bootstrap nodes and the default subscription
+Implementations§
impl JoinOptions
pub fn with_bootstrap(nodes: impl IntoIterator<Item = NodeId>) -> Self
JoinOptions with the provided bootstrap nodes and the default subscription
capacity.Trait Implementations§
impl Debug for JoinOptions
impl<'de> Deserialize<'de> for JoinOptions
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
impl Serialize for JoinOptions
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
Struct iroh_gossip::
source · pub struct Message {
pub content: Bytes,
pub scope: DeliveryScope,
- pub delivered_from: NodeId,
+ pub delivered_from: NodeId,
}Expand description
Fields§
§content: Bytesscope: DeliveryScopedelivered_from: NodeIddelivered_from: NodeIdTrait Implementations§
impl<'de> Deserialize<'de> for Message
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
impl Ord for Message
fn max(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Type Alias iroh_gossip::
source · pub type ProtoCommand = Command<PublicKey>;Expand description