pub trait ToResult<T> { fn to_result<F>(&self, fail_method: F) -> Result<&T, Error> where F: Fn() -> String; }