pub struct Error { /* private fields */ }Expand description
Errors returned by this library.
NOTE: Use aws_smithy_types::error::display::DisplayErrorContext or similar to display
the entire error cause/source chain.
Implementations§
Source§impl Error
impl Error
Sourcepub fn new<E>(kind: ErrorKind, err: E) -> Error
pub fn new<E>(kind: ErrorKind, err: E) -> Error
Creates a new transfer Error from a known kind and an arbitrary source.
Sourcepub fn operation_name(&self) -> Option<&str>
pub fn operation_name(&self) -> Option<&str>
The S3 operation that produced this error, if it originated from a service
call (e.g. "GetObject", "HeadObject", "PutObject").
Sourcepub fn code(&self) -> Option<&str>
pub fn code(&self) -> Option<&str>
The service error code, if any (e.g. "NoSuchKey", "AccessDenied").
Sourcepub fn request_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
The AWS request id of the failed call, if any.
Sourcepub fn extended_request_id(&self) -> Option<&str>
pub fn extended_request_id(&self) -> Option<&str>
The AWS extended request id of the failed call, if any.
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Whether the service error code denotes a missing bucket, key, or multipart upload.
Sourcepub fn upload_id(&self) -> Option<&str>
pub fn upload_id(&self) -> Option<&str>
The ID of a multipart upload that the failed upload left open in S3.
Set on the error an upload’s join or
abort returns when the upload created a
multipart upload that was neither completed nor aborted: the
FailedMultipartUploadPolicy::Retain
policy kept it, the AbortMultipartUpload request failed, or a worker panicked while
executing the upload, as when the caller’s PartStream panics,
which ends it with ErrorKind::RuntimeError without sending AbortMultipartUpload. S3
keeps, and bills for, the uploaded parts until the multipart upload is completed or
aborted with this ID.
A panic that ends the upload while CompleteMultipartUpload or AbortMultipartUpload is in flight also sets the ID, although that request may still close the multipart upload.
None when no multipart upload was created, when AbortMultipartUpload removed it, and on
errors from other operations.
Sourcepub fn failed_uploads(&self) -> Option<&[FailedUpload]>
pub fn failed_uploads(&self) -> Option<&[FailedUpload]>
Per-object upload failures, when this error aggregates a bulk upload.
Sourcepub fn failed_downloads(&self) -> Option<&[FailedDownload]>
pub fn failed_downloads(&self) -> Option<&[FailedDownload]>
Per-object download failures, when this error aggregates a bulk download.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The underlying cause.
For ErrorKind::ChildOperationFailed carrying per-object failures,
this is the first failed object’s error, so the source chain reaches
the child’s own cause. Otherwise it is the error this one was created
from.
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BuildError> for Error
impl From<BuildError> for Error
Source§fn from(value: BuildError) -> Self
fn from(value: BuildError) -> Self
Source§impl From<WalkError> for Error
impl From<WalkError> for Error
Source§fn from(e: WalkError) -> Self
fn from(e: WalkError) -> Self
Maps a directory-walk failure to a transfer error, preserving the
WalkError as the source so its classification and path remain reachable
via std::error::Error::source.
A ListObjectsV2 service failure is recovered to a full
ErrorKind::ServiceError (with operation, code, and request ids); an
unreadable or non-directory source root is ErrorKind::InputInvalid;
per-entry filesystem failures are ErrorKind::IOError.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more