init bucketmetadata_sys

This commit is contained in:
weisd
2024-10-01 23:06:09 +08:00
parent 32baa7f146
commit 25bfd1bbc4
13 changed files with 372 additions and 147 deletions
+10
View File
@@ -1,3 +1,5 @@
use crate::error::Error;
#[derive(Debug, thiserror::Error)]
pub enum ConfigError {
#[error("config not found")]
@@ -13,3 +15,11 @@ impl ConfigError {
matches!(self, Self::NotFound)
}
}
pub fn is_not_found(err: &Error) -> bool {
if let Some(e) = err.downcast_ref::<ConfigError>() {
ConfigError::is_not_found(&e)
} else {
false
}
}