Add StoreId::components() to get components of StoreId "id" part

This commit is contained in:
Matthias Beyer 2016-08-25 18:39:24 +02:00
parent 11e2af0c14
commit d252623b75

View file

@ -4,6 +4,7 @@ use semver::Version;
use std::fmt::{Display, Debug, Formatter};
use std::fmt::Error as FmtError;
use std::result::Result as RResult;
use std::path::Components;
use libimagerror::into::IntoError;
@ -78,6 +79,14 @@ impl StoreId {
.ok_or(SEK::StoreIdHandlingError.into_error())
}
/// Returns the components of the `id` part of the StoreId object.
///
/// Can be used to check whether a StoreId points to an entry in a specific collection of
/// StoreIds.
pub fn components(&self) -> Components {
self.id.components()
}
}
impl Into<PathBuf> for StoreId {