Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit 6bebf9c

Browse files
committed
Fix doc links
1 parent ae967e3 commit 6bebf9c

File tree

8 files changed

+32
-32
lines changed

8 files changed

+32
-32
lines changed

src/api/blobs.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ pub struct AddPathOptions {
577577
/// It also implements [`IntoFuture`], so you can await it to get the [`TempTag`] that
578578
/// contains the hash of the added content and also protects the content.
579579
///
580-
/// If you want access to the stream, you can use the [`AddResult::stream`] method.
580+
/// If you want access to the stream, you can use the [`AddProgress::stream`] method.
581581
pub struct AddProgress<'a> {
582582
blobs: &'a Blobs,
583583
inner: stream::Boxed<AddProgressItem>,
@@ -643,9 +643,6 @@ impl<'a> AddProgress<'a> {
643643
///
644644
/// Calling [`ObserveProgress::stream`] will return a stream of updates, where
645645
/// the first item is the current state and subsequent items are updates.
646-
///
647-
/// Calling [`ObserveProgress::aggregated`] will return a stream of states,
648-
/// where each state is the current state at the time of the update.
649646
pub struct ObserveProgress {
650647
inner: future::Boxed<irpc::Result<mpsc::Receiver<Bitfield>>>,
651648
}
@@ -826,7 +823,7 @@ impl BlobsListProgress {
826823
/// is often inconvenient, so there are a number of higher level methods to
827824
/// process the stream.
828825
///
829-
/// You can get access to the underlying stream using the [`ExportBaoResult::stream`] method.
826+
/// You can get access to the underlying stream using the [`ExportBaoProgress::stream`] method.
830827
pub struct ExportRangesProgress {
831828
ranges: RangeSet2<u64>,
832829
inner: future::Boxed<irpc::Result<mpsc::Receiver<ExportRangesItem>>>,
@@ -907,7 +904,7 @@ impl ExportRangesProgress {
907904
/// is often inconvenient, so there are a number of higher level methods to
908905
/// process the stream.
909906
///
910-
/// You can get access to the underlying stream using the [`ExportBaoResult::stream`] method.
907+
/// You can get access to the underlying stream using the [`ExportBaoProgress::stream`] method.
911908
pub struct ExportBaoProgress {
912909
inner: future::Boxed<irpc::Result<mpsc::Receiver<EncodedItem>>>,
913910
}

src/api/proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ impl From<Leaf> for ExportRangesItem {
574574
/// Progress events for exporting to a local file.
575575
///
576576
/// Exporting does not involve outboard computation, so the events are simpler
577-
/// than [`ImportProgress`].
577+
/// than [`AddProgressItem`].
578578
///
579579
/// Size -> CopyProgress(*n) -> Done
580580
///

src/api/remote.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! API for downloading blobs from a single remote node.
22
//!
3-
//! The entry point is the [`Download`] struct.
3+
//! The entry point is the [`Remote`] struct.
44
use genawaiter::sync::{Co, Gen};
55
use iroh::endpoint::SendStream;
66
use irpc::util::{AsyncReadVarintExt, WriteVarintExt};
@@ -24,18 +24,18 @@ use crate::{
2424
/// API to compute request and to download from remote nodes.
2525
///
2626
/// Usually you want to first find out what, if any, data you have locally.
27-
/// This can be done using [`Download::local`], which inspects the local store
27+
/// This can be done using [`Remote::local`], which inspects the local store
2828
/// and returns a [`LocalInfo`].
2929
///
3030
/// From this you can compute various values such as the number of locally present
3131
/// bytes. You can also compute a request to get the missing data using [`LocalInfo::missing`].
3232
///
33-
/// Once you have a request, you can execute it using [`Download::execute`].
33+
/// Once you have a request, you can execute it using [`Remote::execute_get`].
3434
/// Executing a request will store to the local store, but otherwise does not take
3535
/// the available data into account.
3636
///
3737
/// If you are not interested in the details and just want your data, you can use
38-
/// [`Download::fetch`]. This will internally do the dance described above.
38+
/// [`Remote::fetch`]. This will internally do the dance described above.
3939
#[derive(Debug, Clone, RefCast)]
4040
#[repr(transparent)]
4141
pub struct Remote {

src/get.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! The low level client side API
22
//!
33
//! Note that while using this API directly is fine, a simpler way to get data
4-
//! to a store is to use the [`crate::api::download`] API, in particular the
5-
//! [`crate::api::download::Download::fetch`] function to download data to your
4+
//! to a store is to use the [`crate::api::remote`] API, in particular the
5+
//! [`crate::api::remote::Remote::fetch`] function to download data to your
66
//! local store.
77
//!
88
//! To get data, create a connection using an [`iroh::Endpoint`].
@@ -592,8 +592,8 @@ pub mod fsm {
592592
/// provider should never do this, so this is an indication that the provider is
593593
/// not behaving correctly.
594594
///
595-
/// The [`DecodeError::Io`] variant is just a fallback for any other io error that
596-
/// is not actually a [`ReadError`].
595+
/// The [`DecodeError::DecodeIo`] variant is just a fallback for any other io error that
596+
/// is not actually a [`DecodeError::Read`].
597597
///
598598
/// [`ReadError`]: endpoint::ReadError
599599
#[common_fields({

src/get/request.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! Utilities to generate or execute complex get requests without persisting to a store.
22
//!
33
//! Any complex request can be executed with downloading to a store, using the
4-
//! [`crate::api::download::Download::execute`] method. But for some requests it
4+
//! [`crate::api::remote::Remote::execute_get`] method. But for some requests it
55
//! is useful to just get the data without persisting it to a store.
66
//!
7-
//! In addition to these utilities, there are also constructors in [`crate::protocol::RangeSpecSeq`]
7+
//! In addition to these utilities, there are also constructors in [`crate::protocol::ChunkRangesSeq`]
88
//! to construct complex requests.
99
use std::{
1010
pin::Pin,

src/protocol.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
//! want the entire blob, no matter how many chunks it has.
110110
//!
111111
//! Since this is a very common case, there is a convenience method
112-
//! [`GetRequest::single`] that only requires the hash of the blob.
112+
//! [`GetRequest::blob`] that only requires the hash of the blob.
113113
//!
114114
//! ```rust
115115
//! # use iroh_blobs::protocol::GetRequest;
@@ -285,7 +285,7 @@
285285
//! let request = GetRequest::blob(child_hash);
286286
//! ```
287287
//!
288-
//! ### Why RangeSpec and RangeSpecSeq?
288+
//! ### Why ChunkRanges and ChunkRangesSeq?
289289
//!
290290
//! You might wonder why we have [`ChunkRangesSeq`], when a simple
291291
//! sequence of [`ChunkRanges`] might also do.
@@ -416,7 +416,7 @@ pub enum Request {
416416
Push(PushRequest),
417417
/// Get multiple blobs in a single request, from a single provider
418418
///
419-
/// This is identical to a [`GetRequest`] for a [`HashSeq`], but the provider
419+
/// This is identical to a [`GetRequest`] for a [`crate::hashseq::HashSeq`], but the provider
420420
/// does not need to have the hash seq.
421421
GetMany(GetManyRequest),
422422
}
@@ -971,15 +971,15 @@ mod tests {
971971
r"
972972
00 # enum variant for GetRequest
973973
dadadadadadadadadadadadadadadadadadadadadadadadadadadadadadadada # the hash
974-
020001000100 # the RangeSpecSeq
974+
020001000100 # the ChunkRangesSeq
975975
",
976976
),
977977
(
978978
Request::from(GetRequest::all(hash)),
979979
r"
980980
00 # enum variant for GetRequest
981981
dadadadadadadadadadadadadadadadadadadadadadadadadadadadadadadada # the hash
982-
01000100 # the RangeSpecSeq
982+
01000100 # the ChunkRangesSeq
983983
",
984984
),
985985
];

src/protocol/range_spec.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! Specifications for ranges selection in blobs and sequences of blobs.
22
//!
3-
//! The [`RangeSpec`] allows specifying which BAO chunks inside a single blob should be
3+
//! The [`ChunkRanges`] allows specifying which BAO chunks inside a single blob should be
44
//! selected.
55
//!
6-
//! The [`RangeSpecSeq`] builds on top of this to select blob chunks in an entire
6+
//! The [`ChunkRangesSeq`] builds on top of this to select blob chunks in an entire
77
//! collection.
88
use std::{fmt, sync::OnceLock};
99

@@ -62,37 +62,37 @@ impl ChunkRangesSeq {
6262
Self(inner)
6363
}
6464

65-
/// A [`RangeSpecSeq`] containing all chunks from all blobs.
65+
/// A [`ChunkRangesSeq`] containing all chunks from all blobs.
6666
///
67-
/// [`RangeSpecSeq::iter`], will return a full range forever.
67+
/// [`ChunkRangesSeq::iter`], will return a full range forever.
6868
pub fn all() -> Self {
6969
let mut inner = SmallVec::new();
7070
inner.push((0, ChunkRanges::all()));
7171
Self(inner)
7272
}
7373

74-
/// A [`RangeSpecSeq`] getting the verified size for the first blob.
74+
/// A [`ChunkRangesSeq`] getting the verified size for the first blob.
7575
pub fn verified_size() -> Self {
7676
let mut inner = SmallVec::new();
7777
inner.push((0, ChunkRanges::last_chunk()));
7878
inner.push((1, ChunkRanges::empty()));
7979
Self(inner)
8080
}
8181

82-
/// A [`RangeSpecSeq`] getting the entire first blob and verified sizes for all others.
82+
/// A [`ChunkRangesSeq`] getting the entire first blob and verified sizes for all others.
8383
pub fn verified_child_sizes() -> Self {
8484
let mut inner = SmallVec::new();
8585
inner.push((0, ChunkRanges::all()));
8686
inner.push((1, ChunkRanges::last_chunk()));
8787
Self(inner)
8888
}
8989

90-
/// Checks if this [`RangeSpec`] does not select any chunks in the blob.
90+
/// Checks if this [`ChunkRangesSeq`] does not select any chunks in the blob.
9191
pub fn is_empty(&self) -> bool {
9292
self.0.is_empty()
9393
}
9494

95-
/// Checks if this [`RangeSpec`] selects all chunks in the blob.
95+
/// Checks if this [`ChunkRangesSeq`] selects all chunks in the blob.
9696
pub fn is_all(&self) -> bool {
9797
if self.0.len() != 1 {
9898
return false;
@@ -155,7 +155,7 @@ impl ChunkRangesSeq {
155155
/// This iterator will only yield items for blobs which have at least one chunk
156156
/// selected.
157157
///
158-
/// This iterator is infinite if the [`RangeSpecSeq`] ends on a non-empty [`RangeSpec`],
158+
/// This iterator is infinite if the [`ChunkRangesSeq`] ends on a non-empty [`ChunkRanges`],
159159
/// that is all further blobs have selected chunks spans.
160160
pub fn iter_non_empty_infinite(&self) -> NonEmptyRequestRangeSpecIter<'_> {
161161
NonEmptyRequestRangeSpecIter::new(self.iter_infinite())
@@ -339,6 +339,9 @@ impl<'a> Iterator for NonEmptyRequestRangeSpecIter<'a> {
339339

340340
/// A chunk range specification as a sequence of chunk offsets.
341341
///
342+
/// This is just the wire encoding of a [`ChunkRanges`]. You should rarely have to
343+
/// interact with this directly.
344+
///
342345
/// Offsets encode alternating spans starting on 0, where the first span is always
343346
/// deselected.
344347
///

src/store/fs/import.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ async fn import_bytes_tiny_impl(
195195
) -> io::Result<ImportEntry> {
196196
let size = cmd.data.len() as u64;
197197
// send the required progress events
198-
// ImportProgress::Done will be sent when finishing the import!
198+
// AddProgressItem::Done will be sent when finishing the import!
199199
tx.send(AddProgressItem::Size(size))
200200
.await
201201
.map_err(|_e| io::Error::other("error"))?;

0 commit comments

Comments
 (0)