From a9f453f6da90c39c67df209d298062b751b93f73 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 9 Nov 2024 14:20:03 +0000 Subject: docs(tvix/[ca]store): improve docstrings, remove wildcard imports Extend the docstrings of `add_default_services`, and add one for `addrs_to_configs` as well as the module-wide one at `tvix_store::composition`. Change-Id: Ie9b449988eb210cd65b19b174094bbe0c4af2fd6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12748 Tested-by: BuildkiteCI Reviewed-by: yuka --- tvix/store/src/composition.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'tvix/store/src/composition.rs') diff --git a/tvix/store/src/composition.rs b/tvix/store/src/composition.rs index 063236136fd1..ce35cc2fcac2 100644 --- a/tvix/store/src/composition.rs +++ b/tvix/store/src/composition.rs @@ -1,6 +1,13 @@ +//! This module provides a registry knowing about {Blob,Directory,PathInfo} +//! Services, as well as the [add_default_services] helper to seed new +//! registries with everything known here. +//! The composition machinery itself is defined in +//! [tvix_castore::composition], which works generically with different kinds +//! of services. + use std::sync::LazyLock; -pub use tvix_castore::composition::*; +use tvix_castore::composition::Registry; /// The provided registry of tvix_store, which has all the builtin /// tvix_castore (BlobStore/DirectoryStore) and tvix_store @@ -12,9 +19,11 @@ pub static REG: LazyLock<&'static Registry> = LazyLock::new(|| { Box::leak(Box::new(reg)) }); -/// Register the builtin services of tvix_castore and tvix_store with the given -/// registry. This is useful for creating your own registry with the builtin -/// types _and_ extra third party types. +/// Register the builtin services of tvix_castore (blob services and directory +/// services), as well as the ones from tvix_store (PathInfo service) with the +/// given registry. +/// This can be used outside to create your own registry with the builtin types +/// _and_ extra third party types. pub fn add_default_services(reg: &mut Registry) { tvix_castore::composition::add_default_services(reg); crate::pathinfoservice::register_pathinfo_services(reg); -- cgit 1.4.1