diff --git a/lib/core/libimagstore/src/storeid.rs b/lib/core/libimagstore/src/storeid.rs index 3d639797..66a94c49 100644 --- a/lib/core/libimagstore/src/storeid.rs +++ b/lib/core/libimagstore/src/storeid.rs @@ -38,6 +38,10 @@ use iter::get::StoreGetIterator; use iter::retrieve::StoreRetrieveIterator; /// The Index into the Store +/// +/// A StoreId object is a unique identifier for one entry in the store which might be present or +/// not. +/// #[derive(Debug, Clone, Hash, Eq, PartialOrd, Ord)] pub struct StoreId { base: Option, @@ -104,6 +108,11 @@ impl StoreId { Ok(base) } + /// Check whether the StoreId exists (as in whether the file exists) + /// + /// # Warning + /// + /// Should be considered deprecated pub fn exists(&self) -> Result { self.clone().into_pathbuf().map(|pb| pb.exists()) }