docs(tvix/castore): fix docstrings

There were some broken references. Also, during the split of service
urls to castore and store parts we forgot to update the docstring.

Change-Id: Ifc2b3a2c49c9e4d31f1b210dbfe4afcad8a8d5bd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13249
Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Domen Kožar <domen@cachix.org>
This commit is contained in:
Florian Klink 2025-03-13 07:11:18 +01:00 committed by clbot
parent 29e4b3210b
commit d3da3238c2
7 changed files with 13 additions and 12 deletions

View file

@ -11,9 +11,9 @@ use super::BlobService;
/// Constructs a new instance of a [BlobService] from an URI. /// Constructs a new instance of a [BlobService] from an URI.
/// ///
/// The following schemes are supported by the following services: /// The following schemes are supported by the following services:
/// - `memory://` ([MemoryBlobService]) /// - `memory://` ([super::MemoryBlobService])
/// - `grpc+*://` ([GRPCBlobService]) /// - `grpc+*://` ([super::GRPCBlobService])
/// - `objectstore+*://` ([ObjectStoreBlobService]) /// - `objectstore+*://` ([super::ObjectStoreBlobService])
/// ///
/// See their `from_url` methods for more details about their syntax. /// See their `from_url` methods for more details about their syntax.
pub async fn from_addr( pub async fn from_addr(

View file

@ -51,7 +51,7 @@ where
} }
} }
/// Starts a [Filesystem] with the specified number of threads, and provides /// Starts a [FileSystem] with the specified number of threads, and provides
/// functions to unmount, and wait for it to have completed. /// functions to unmount, and wait for it to have completed.
#[derive(Clone)] #[derive(Clone)]
pub struct FuseDaemon { pub struct FuseDaemon {

View file

@ -78,7 +78,8 @@ where
/// ///
/// The produced stream is buffered, so uploads can happen concurrently. /// The produced stream is buffered, so uploads can happen concurrently.
/// ///
/// The root is the [Path] in the filesystem that is being ingested into the castore. /// The root is the [std::path::Path] in the filesystem that is being ingested
/// into castore.
pub fn dir_entries_to_ingestion_stream<'a, BS, I, P>( pub fn dir_entries_to_ingestion_stream<'a, BS, I, P>(
blob_service: BS, blob_service: BS,
iter: I, iter: I,

View file

@ -77,7 +77,7 @@ impl Directory {
/// will yield an error, as well as exceeding the maximum size. /// will yield an error, as well as exceeding the maximum size.
/// ///
/// In case you want to construct a [Directory] from multiple elements, use /// In case you want to construct a [Directory] from multiple elements, use
/// [from_iter] instead. /// [Directory::try_from_iter] instead.
pub fn add(&mut self, name: PathComponent, node: Node) -> Result<(), DirectoryError> { pub fn add(&mut self, name: PathComponent, node: Node) -> Result<(), DirectoryError> {
check_insert_node(self.size(), &mut self.nodes, name, node)?; check_insert_node(self.size(), &mut self.nodes, name, node)?;
Ok(()) Ok(())

View file

@ -6,9 +6,9 @@ use crate::B3Digest;
pub use directory::Directory; pub use directory::Directory;
pub use symlink_target::{SymlinkTarget, SymlinkTargetError}; pub use symlink_target::{SymlinkTarget, SymlinkTargetError};
/// A Node is either a [DirectoryNode], [FileNode] or [SymlinkNode]. /// A Node is either a directory, file or symlink.
/// Nodes themselves don't have names, what gives them names is either them /// Nodes themselves don't have names, what gives them names is either them
/// being inside a [Directory], or a root node with its own name attached to it. /// being inside a [Directory], or a root node with a name attached adjacently.
#[derive(Debug, Clone, PartialEq, Eq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub enum Node { pub enum Node {
/// A DirectoryNode is a pointer to a [Directory], by its [Directory::digest]. /// A DirectoryNode is a pointer to a [Directory], by its [Directory::digest].

View file

@ -251,7 +251,7 @@ impl PathBuf {
PathBuf { inner: bytes } PathBuf { inner: bytes }
} }
/// Convert from a [&std::path::Path] to [Self]. /// Convert from a [std::path::Path] to [PathBuf].
/// ///
/// - Self uses `/` as path separator. /// - Self uses `/` as path separator.
/// - Absolute paths are always rejected, are are these with custom prefixes. /// - Absolute paths are always rejected, are are these with custom prefixes.

View file

@ -18,7 +18,7 @@ pub struct CompositionConfigs {
>, >,
} }
/// Provides a set clap arguments to configure tvix-[ca]store services. /// Provides a set of clap arguments to configure tvix-castore services.
/// ///
/// This particular variant has defaults tailored for usecases accessing data /// This particular variant has defaults tailored for usecases accessing data
/// directly locally, like the `tvix-store daemon` command. /// directly locally, like the `tvix-store daemon` command.
@ -47,7 +47,7 @@ pub struct ServiceUrls {
experimental_store_composition: Option<String>, experimental_store_composition: Option<String>,
} }
/// Provides a set clap arguments to configure tvix-[ca]store services. /// Provides a set of clap arguments to configure tvix-castore services.
/// ///
/// This particular variant has defaults tailored for usecases accessing data /// This particular variant has defaults tailored for usecases accessing data
/// from another running tvix daemon, via gRPC. /// from another running tvix daemon, via gRPC.
@ -65,7 +65,7 @@ pub struct ServiceUrlsGrpc {
experimental_store_composition: Option<String>, experimental_store_composition: Option<String>,
} }
/// Provides a set clap arguments to configure tvix-[ca]store services. /// Provides a set of clap arguments to configure tvix-castore services.
/// ///
/// This particular variant has defaults tailored for usecases keeping all data /// This particular variant has defaults tailored for usecases keeping all data
/// in memory. /// in memory.