Hook data accessors should implement Debug

This commit is contained in:
Matthias Beyer 2016-05-28 23:45:27 +02:00
parent ac89856e1c
commit 812379c46d

View file

@ -1,19 +1,22 @@
use std::fmt::Debug;
use hook::result::HookResult;
use store::FileLockEntry;
use storeid::StoreId;
pub trait StoreIdAccessor : Send + Sync {
pub trait StoreIdAccessor : Debug + Send + Sync {
fn access(&self, &StoreId) -> HookResult<()>;
}
pub trait MutableHookDataAccessor : Send + Sync {
pub trait MutableHookDataAccessor : Debug + Send + Sync {
fn access_mut(&self, &mut FileLockEntry) -> HookResult<()>;
}
pub trait NonMutableHookDataAccessor : Send + Sync {
pub trait NonMutableHookDataAccessor : Debug + Send + Sync {
fn access(&self, &FileLockEntry) -> HookResult<()>;
}
#[derive(Debug)]
pub enum HookDataAccessor<'a> {
StoreIdAccess(&'a StoreIdAccessor),
MutableAccess(&'a MutableHookDataAccessor),