add put_object_metadata

This commit is contained in:
weisd
2024-11-20 16:10:14 +08:00
parent 8439b375ed
commit e9583c6a47
2 changed files with 14 additions and 1 deletions
+3
View File
@@ -9,6 +9,9 @@ pub enum StorageError {
#[error("Invalid arguments provided for {0}/{1}-{2}")]
InvalidArgument(String, String, String),
#[error("method not allowed")]
MethodNotAllowed,
#[error("Bucket not found: {0}")]
BucketNotFound(String),
+11 -1
View File
@@ -290,7 +290,7 @@ pub fn ec_drives_no_config(set_drive_count: usize) -> Result<usize> {
Ok(sc.get_parity_for_sc(storageclass::STANDARD).unwrap_or_default())
}
#[derive(Debug, thiserror::Error)]
#[derive(Debug, PartialEq, thiserror::Error)]
pub enum ErasureError {
#[error("erasure read quorum")]
ErasureReadQuorum,
@@ -307,3 +307,13 @@ pub enum ErasureError {
#[error("invalid part id {0}")]
InvalidPart(usize),
}
impl ErasureError {
pub fn is(&self, err: &Error) -> bool {
if let Some(e) = err.downcast_ref::<ErasureError>() {
return self == e;
}
false
}
}