Doc for Store::retrieve_copy()

This commit is contained in:
Matthias Beyer 2017-02-20 16:04:28 +01:00
parent 1f47db3951
commit c82d7bf7bc

View file

@ -663,6 +663,22 @@ impl Store {
/// Retrieve a copy of a given entry, this cannot be used to mutate
/// the one on disk
///
/// TODO: Create Hooks for retrieving a copy
///
/// # Executed Hooks
///
/// - (none yet)
///
/// # Return value
///
/// On success: Entry
///
/// On error:
/// - RetrieveCopyCallError(LockPoisoned()) if the internal write lock cannot be aquierd.
/// - RetrieveCopyCallError(IdLocked()) if the Entry is borrowed currently
/// - Errors StoreEntry::new() might return
///
pub fn retrieve_copy<S: IntoStoreId>(&self, id: S) -> Result<Entry> {
let id = try!(id.into_storeid()).with_base(self.path().clone());
let entries = match self.entries.write() {