use std::result;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error(transparent)]
Tree(#[from] wbftree::Error),
#[error("数据格式损坏: {0}")]
Corrupted(&'static str),
#[error("参数非法: {0}")]
InvalidArgument(&'static str),
#[error("空值非法")]
EmptyValue,
#[error("键或字段超长")]
KeyTooLong,
}
pub type CollectionError = Error;
pub type Result<T> = result::Result<T, Error>;