Implement: execute_pre_retrieve_hooks()
This commit is contained in:
parent
3244b87c7e
commit
94128f8bcc
1 changed files with 6 additions and 1 deletions
|
@ -434,7 +434,12 @@ impl Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn execute_pre_retrieve_hooks(&self, id: &StoreId) -> Result<()> {
|
pub fn execute_pre_retrieve_hooks(&self, id: &StoreId) -> Result<()> {
|
||||||
unimplemented!()
|
let guard = self.pre_retrieve_hooks.deref().lock();
|
||||||
|
if guard.is_err() { return Err(StoreError::new(StoreErrorKind::PreHookExecuteError, None)) }
|
||||||
|
|
||||||
|
guard.unwrap().deref().iter()
|
||||||
|
.fold(Ok(()), |acc, hook| acc.and_then(|_| hook.pre_retrieve(id)))
|
||||||
|
.map_err(|e| StoreError::new(StoreErrorKind::PreHookExecuteError, Some(Box::new(e))))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn execute_post_retrieve_hooks<'a>(&'a self, fle: FileLockEntry<'a>)
|
pub fn execute_post_retrieve_hooks<'a>(&'a self, fle: FileLockEntry<'a>)
|
||||||
|
|
Loading…
Reference in a new issue