macro_rules! s3_error {
($code:ident) => { ... };
($code:ident, $msg:expr) => { ... };
}Expand description
Create an S3Error from an error code.
ยงExamples
use rustack_s3_model::s3_error;
use rustack_s3_model::error::S3ErrorCode;
let err = s3_error!(NoSuchBucket);
assert_eq!(err.code, S3ErrorCode::NoSuchBucket);
let err = s3_error!(NoSuchKey, "The key does not exist");
assert_eq!(err.message, "The key does not exist");