Unverified Commit ddc3eda7 authored by Nugine's avatar Nugine
Browse files

s3s: error

parent 43993b38
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -61,6 +61,10 @@ impl S3Error {
        self.message = Some(val.into());
    }

    pub fn set_request_id(&mut self, val: impl Into<String>) {
        self.request_id = Some(val.into());
    }

    pub fn set_source(&mut self, val: Box<dyn std::error::Error + Send + Sync + 'static>) {
        self.source = Some(val);
    }
@@ -75,6 +79,11 @@ impl S3Error {
        self.message.as_deref()
    }

    #[must_use]
    pub fn request_id(&self) -> Option<&str> {
        self.request_id.as_deref()
    }

    #[must_use]
    pub fn source(&self) -> Option<&(dyn std::error::Error + Send + Sync + 'static)> {
        self.source.as_deref()