mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 21:07:43 +00:00
add put_object_metadata
This commit is contained in:
@@ -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),
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user