#[non_exhaustive]pub enum Error {
Show 14 variants
ConstructionFailure(ConstructionFailure),
TimeoutError(TimeoutError),
DispatchFailure(DispatchFailure),
Response(ResponseError<Response<SdkBody>>),
ListBuckets(ListBucketsError),
CreateBucket(Box<CreateBucketError>),
GetObject(Box<GetObjectError>),
ListObjectsV2(ListObjectsV2Error),
DeleteObject(DeleteObjectError),
HeadObject(HeadObjectError),
PutObject(Box<PutObjectError>),
ByteStream(ByteStreamError),
HeadBucket(HeadBucketError),
Library(Cow<'static, str>),
}Expand description
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConstructionFailure(ConstructionFailure)
Request failed during construction, it was not dispatched over the network.
TimeoutError(TimeoutError)
Request failed due to a timeout, the request MAY have been sent and received.
DispatchFailure(DispatchFailure)
Request failed during dispatch, an HTTP response was not received. The request MAY have been set.
Response(ResponseError<Response<SdkBody>>)
A response was received but it was not parseable according to the protocol. (for example, the server hung up without sending a complete response)
ListBuckets(ListBucketsError)
Amazon S3 was unable to list buckets. This happens when you call StorageService::init,
since the library performs checks whenever if the bucket exists or not and it needs the ability to check.
CreateBucket(Box<CreateBucketError>)
Amazon S3 was unable to create the bucket for some reason, this will never hit the
CreateBucketError::BucketAlreadyExists or CreateBucketError::BucketAlreadyOwnedByYou
variants, something might’ve been unhandled and is probably isn’t your fault.
- this would be thrown from the
StorageService::inittrait method
GetObject(Box<GetObjectError>)
Amazon S3 was unable to get the object that you were looking for either
from the StorageService::open or the
StorageService::blob methods.
The GetObjectError::NoSuchKey variant will never be reached since
it’ll return Ok(None) if the key wasn’t present in S3, this might
result in an invalid object state (GetObjectError::InvalidObjectState)
or an unhandled variant that the Rust SDK doesn’t support yet.
- this would be thrown from the
StorageService::openor theStorageService::blobtrait methods.
ListObjectsV2(ListObjectsV2Error)
Amazon S3 was unable to list objects from the specific requirements that
it was told to list objects from a ListBlobsRequest.
This might be in a unhandled state as ListObjectsV2Error::NoSuchBucket should never
be matched since remi-s3 handles creating buckets if they don’t exist when
StorageService::init is called.
- this would be thrown from the
StorageService::openor theStorageService::blobtrait methods.
DeleteObject(DeleteObjectError)
Amazon S3 was unable to delete an object from the service.
- this would be thrown from the
StorageService::deletetrait method.
HeadObject(HeadObjectError)
Amazon S3 was unable to check the existence of an object. This will never
reach the HeadObjectError::NotFound state as it’ll return Ok(false).
- this would be thrown from the
StorageService::existstrait method.
PutObject(Box<PutObjectError>)
Amazon S3 was unable to put an object into the service.
- this would be thrown from the
StorageService::uploadtrait method.
ByteStream(ByteStreamError)
Occurs when an error occurred when transforming AWS S3’s responses.
HeadBucket(HeadBucketError)
Occurs when remi-s3 cannot perform a HEAD request to the current bucket. This is mainly
used in healthchecks to determine if the storage service is ok.
Library(Cow<'static, str>)
Something that remi-s3 has emitted on its own.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(value: ByteStreamError) -> Self
fn from(value: ByteStreamError) -> Self
Source§impl From<GetObjectError> for Error
impl From<GetObjectError> for Error
Source§fn from(value: GetObjectError) -> Self
fn from(value: GetObjectError) -> Self
Source§impl From<HeadObjectError> for Error
impl From<HeadObjectError> for Error
Source§fn from(value: HeadObjectError) -> Self
fn from(value: HeadObjectError) -> Self
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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
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