Expose errorkind

This commit is contained in:
Aode (lion) 2022-03-11 19:51:43 -06:00
parent 8ddc953db5
commit cddcb52750

View file

@ -38,6 +38,12 @@ pub struct Iter<'a, K: IndexType, V: IndexType> {
iter: TxIndexIter<'a, K, V>,
}
impl Error {
pub fn kind(&self) -> &ErrorKind {
&self.kind
}
}
impl Db {
pub fn open(path: impl AsRef<Path>) -> Result<Self, Error> {
let persy = Persy::open_or_create_with(path, Config::new(), |_| Ok(()))?;