Add documentation to StoreId type
This commit is contained in:
parent
c86e4e7db4
commit
3bdd5c959b
1 changed files with 9 additions and 0 deletions
|
@ -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<PathBuf>,
|
||||
|
@ -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<bool> {
|
||||
self.clone().into_pathbuf().map(|pb| pb.exists())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue