Skip to main content

diskann_utils/
lib.rs

1/*
2 * Copyright (c) Microsoft Corporation.
3 * Licensed under the MIT license.
4 */
5
6pub mod reborrow;
7pub use reborrow::{Reborrow, ReborrowMut};
8
9pub mod lifetime;
10pub use lifetime::WithLifetime;
11
12pub mod future;
13
14pub mod sampling;
15
16// Views
17pub mod strided;
18pub mod views;
19
20mod lazystring;
21pub use lazystring::LazyString;
22
23#[cfg(feature = "testing")]
24#[doc(hidden)]
25pub fn workspace_root() -> std::path::PathBuf {
26    std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
27        .parent()
28        .unwrap()
29        .to_path_buf()
30}
31
32#[cfg(feature = "testing")]
33#[doc(hidden)]
34pub fn test_data_directory() -> &'static str {
35    "test_data"
36}
37
38#[cfg(feature = "testing")]
39#[doc(hidden)]
40pub fn test_data_root() -> std::path::PathBuf {
41    workspace_root().join(test_data_directory())
42}