gix_odb/store_impls/dynamic/
access.rs

1use crate::Store;
2
3impl Store {
4    /// The root path at which we expect to find all objects and packs, and which is the source of the
5    /// alternate file traversal in case there are linked repositories.
6    pub fn path(&self) -> &std::path::Path {
7        &self.path
8    }
9
10    /// The kind of object hash to assume when dealing with pack indices and pack data files.
11    pub fn object_hash(&self) -> gix_hash::Kind {
12        self.object_hash
13    }
14
15    /// Whether or not we are allowed to use multi-pack indices
16    pub fn use_multi_pack_index(&self) -> bool {
17        self.use_multi_pack_index
18    }
19
20    /// An iterator over replacements from object-ids `X` to `X-replaced` as `(X, X-replaced)`, sorted by the original id `X`.
21    pub fn replacements(&self) -> impl Iterator<Item = (gix_hash::ObjectId, gix_hash::ObjectId)> + '_ {
22        self.replacements.iter().copied()
23    }
24}