#[non_exhaustive]pub enum Error {
Show 25 variants
EmptyUploadException(EmptyUploadException),
ImageAlreadyExistsException(ImageAlreadyExistsException),
ImageDigestDoesNotMatchException(ImageDigestDoesNotMatchException),
ImageNotFoundException(ImageNotFoundException),
ImageTagAlreadyExistsException(ImageTagAlreadyExistsException),
InvalidLayerException(InvalidLayerException),
InvalidLayerPartException(InvalidLayerPartException),
InvalidParameterException(InvalidParameterException),
InvalidTagParameterException(InvalidTagParameterException),
LayerAlreadyExistsException(LayerAlreadyExistsException),
LayerPartTooSmallException(LayerPartTooSmallException),
LayersNotFoundException(LayersNotFoundException),
LimitExceededException(LimitExceededException),
ReferencedImagesNotFoundException(ReferencedImagesNotFoundException),
RegistryNotFoundException(RegistryNotFoundException),
RepositoryAlreadyExistsException(RepositoryAlreadyExistsException),
RepositoryCatalogDataNotFoundException(RepositoryCatalogDataNotFoundException),
RepositoryNotEmptyException(RepositoryNotEmptyException),
RepositoryNotFoundException(RepositoryNotFoundException),
RepositoryPolicyNotFoundException(RepositoryPolicyNotFoundException),
ServerException(ServerException),
TooManyTagsException(TooManyTagsException),
UnsupportedCommandException(UnsupportedCommandException),
UploadNotFoundException(UploadNotFoundException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyUploadException(EmptyUploadException)
The specified layer upload doesn't contain any layer parts.
ImageAlreadyExistsException(ImageAlreadyExistsException)
The specified image has already been pushed, and there were no changes to the manifest or image tag after the last push.
ImageDigestDoesNotMatchException(ImageDigestDoesNotMatchException)
The specified image digest doesn't match the digest that Amazon ECR calculated for the image.
ImageNotFoundException(ImageNotFoundException)
The image requested doesn't exist in the specified repository.
ImageTagAlreadyExistsException(ImageTagAlreadyExistsException)
The specified image is tagged with a tag that already exists. The repository is configured for tag immutability.
InvalidLayerException(InvalidLayerException)
The layer digest calculation performed by Amazon ECR when the image layer doesn't match the digest specified.
InvalidLayerPartException(InvalidLayerPartException)
The layer part size isn't valid, or the first byte specified isn't consecutive to the last byte of a previous layer part upload.
InvalidParameterException(InvalidParameterException)
The specified parameter is invalid. Review the available parameters for the API request.
InvalidTagParameterException(InvalidTagParameterException)
An invalid parameter has been specified. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
LayerAlreadyExistsException(LayerAlreadyExistsException)
The image layer already exists in the associated repository.
LayerPartTooSmallException(LayerPartTooSmallException)
Layer parts must be at least 5 MiB in size.
LayersNotFoundException(LayersNotFoundException)
The specified layers can't be found, or the specified layer isn't valid for this repository.
LimitExceededException(LimitExceededException)
The operation didn't succeed because it would have exceeded a service limit for your account. For more information, see Amazon ECR Service Quotas in the Amazon Elastic Container Registry User Guide.
ReferencedImagesNotFoundException(ReferencedImagesNotFoundException)
The manifest list is referencing an image that doesn't exist.
RegistryNotFoundException(RegistryNotFoundException)
The registry doesn't exist.
RepositoryAlreadyExistsException(RepositoryAlreadyExistsException)
The specified repository already exists in the specified registry.
RepositoryCatalogDataNotFoundException(RepositoryCatalogDataNotFoundException)
The repository catalog data doesn't exist.
RepositoryNotEmptyException(RepositoryNotEmptyException)
The specified repository contains images. To delete a repository that contains images, you must force the deletion with the force
parameter.
RepositoryNotFoundException(RepositoryNotFoundException)
The specified repository can't be found. Check the spelling of the specified repository and ensure that you're performing operations on the correct registry.
RepositoryPolicyNotFoundException(RepositoryPolicyNotFoundException)
The specified repository and registry combination doesn't have an associated repository policy.
ServerException(ServerException)
These errors are usually caused by a server-side issue.
TooManyTagsException(TooManyTagsException)
The list of tags on the repository is over the limit. The maximum number of tags that can be applied to a repository is 50.
UnsupportedCommandException(UnsupportedCommandException)
The action isn't supported in this Region.
UploadNotFoundException(UploadNotFoundException)
The upload can't be found, or the specified upload ID isn't valid for this repository.
Unhandled(Unhandled)
Unhandled
directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code()
:
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata
for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<BatchCheckLayerAvailabilityError> for Error
impl From<BatchCheckLayerAvailabilityError> for Error
Source§fn from(err: BatchCheckLayerAvailabilityError) -> Self
fn from(err: BatchCheckLayerAvailabilityError) -> Self
Source§impl From<BatchDeleteImageError> for Error
impl From<BatchDeleteImageError> for Error
Source§fn from(err: BatchDeleteImageError) -> Self
fn from(err: BatchDeleteImageError) -> Self
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<CompleteLayerUploadError> for Error
impl From<CompleteLayerUploadError> for Error
Source§fn from(err: CompleteLayerUploadError) -> Self
fn from(err: CompleteLayerUploadError) -> Self
Source§impl From<CreateRepositoryError> for Error
impl From<CreateRepositoryError> for Error
Source§fn from(err: CreateRepositoryError) -> Self
fn from(err: CreateRepositoryError) -> Self
Source§impl From<DeleteRepositoryError> for Error
impl From<DeleteRepositoryError> for Error
Source§fn from(err: DeleteRepositoryError) -> Self
fn from(err: DeleteRepositoryError) -> Self
Source§impl From<DeleteRepositoryPolicyError> for Error
impl From<DeleteRepositoryPolicyError> for Error
Source§fn from(err: DeleteRepositoryPolicyError) -> Self
fn from(err: DeleteRepositoryPolicyError) -> Self
Source§impl From<DescribeImageTagsError> for Error
impl From<DescribeImageTagsError> for Error
Source§fn from(err: DescribeImageTagsError) -> Self
fn from(err: DescribeImageTagsError) -> Self
Source§impl From<DescribeImagesError> for Error
impl From<DescribeImagesError> for Error
Source§fn from(err: DescribeImagesError) -> Self
fn from(err: DescribeImagesError) -> Self
Source§impl From<DescribeRegistriesError> for Error
impl From<DescribeRegistriesError> for Error
Source§fn from(err: DescribeRegistriesError) -> Self
fn from(err: DescribeRegistriesError) -> Self
Source§impl From<DescribeRepositoriesError> for Error
impl From<DescribeRepositoriesError> for Error
Source§fn from(err: DescribeRepositoriesError) -> Self
fn from(err: DescribeRepositoriesError) -> Self
Source§impl From<GetAuthorizationTokenError> for Error
impl From<GetAuthorizationTokenError> for Error
Source§fn from(err: GetAuthorizationTokenError) -> Self
fn from(err: GetAuthorizationTokenError) -> Self
Source§impl From<GetRegistryCatalogDataError> for Error
impl From<GetRegistryCatalogDataError> for Error
Source§fn from(err: GetRegistryCatalogDataError) -> Self
fn from(err: GetRegistryCatalogDataError) -> Self
Source§impl From<GetRepositoryCatalogDataError> for Error
impl From<GetRepositoryCatalogDataError> for Error
Source§fn from(err: GetRepositoryCatalogDataError) -> Self
fn from(err: GetRepositoryCatalogDataError) -> Self
Source§impl From<GetRepositoryPolicyError> for Error
impl From<GetRepositoryPolicyError> for Error
Source§fn from(err: GetRepositoryPolicyError) -> Self
fn from(err: GetRepositoryPolicyError) -> Self
Source§impl From<InitiateLayerUploadError> for Error
impl From<InitiateLayerUploadError> for Error
Source§fn from(err: InitiateLayerUploadError) -> Self
fn from(err: InitiateLayerUploadError) -> Self
Source§impl From<ListTagsForResourceError> for Error
impl From<ListTagsForResourceError> for Error
Source§fn from(err: ListTagsForResourceError) -> Self
fn from(err: ListTagsForResourceError) -> Self
Source§impl From<PutImageError> for Error
impl From<PutImageError> for Error
Source§fn from(err: PutImageError) -> Self
fn from(err: PutImageError) -> Self
Source§impl From<PutRegistryCatalogDataError> for Error
impl From<PutRegistryCatalogDataError> for Error
Source§fn from(err: PutRegistryCatalogDataError) -> Self
fn from(err: PutRegistryCatalogDataError) -> Self
Source§impl From<PutRepositoryCatalogDataError> for Error
impl From<PutRepositoryCatalogDataError> for Error
Source§fn from(err: PutRepositoryCatalogDataError) -> Self
fn from(err: PutRepositoryCatalogDataError) -> Self
Source§impl<R> From<SdkError<BatchCheckLayerAvailabilityError, R>> for Error
impl<R> From<SdkError<BatchCheckLayerAvailabilityError, R>> for Error
Source§fn from(err: SdkError<BatchCheckLayerAvailabilityError, R>) -> Self
fn from(err: SdkError<BatchCheckLayerAvailabilityError, R>) -> Self
Source§impl<R> From<SdkError<BatchDeleteImageError, R>> for Error
impl<R> From<SdkError<BatchDeleteImageError, R>> for Error
Source§fn from(err: SdkError<BatchDeleteImageError, R>) -> Self
fn from(err: SdkError<BatchDeleteImageError, R>) -> Self
Source§impl<R> From<SdkError<CompleteLayerUploadError, R>> for Error
impl<R> From<SdkError<CompleteLayerUploadError, R>> for Error
Source§fn from(err: SdkError<CompleteLayerUploadError, R>) -> Self
fn from(err: SdkError<CompleteLayerUploadError, R>) -> Self
Source§impl<R> From<SdkError<CreateRepositoryError, R>> for Error
impl<R> From<SdkError<CreateRepositoryError, R>> for Error
Source§fn from(err: SdkError<CreateRepositoryError, R>) -> Self
fn from(err: SdkError<CreateRepositoryError, R>) -> Self
Source§impl<R> From<SdkError<DeleteRepositoryError, R>> for Error
impl<R> From<SdkError<DeleteRepositoryError, R>> for Error
Source§fn from(err: SdkError<DeleteRepositoryError, R>) -> Self
fn from(err: SdkError<DeleteRepositoryError, R>) -> Self
Source§impl<R> From<SdkError<DeleteRepositoryPolicyError, R>> for Error
impl<R> From<SdkError<DeleteRepositoryPolicyError, R>> for Error
Source§fn from(err: SdkError<DeleteRepositoryPolicyError, R>) -> Self
fn from(err: SdkError<DeleteRepositoryPolicyError, R>) -> Self
Source§impl<R> From<SdkError<DescribeImageTagsError, R>> for Error
impl<R> From<SdkError<DescribeImageTagsError, R>> for Error
Source§fn from(err: SdkError<DescribeImageTagsError, R>) -> Self
fn from(err: SdkError<DescribeImageTagsError, R>) -> Self
Source§impl<R> From<SdkError<DescribeImagesError, R>> for Error
impl<R> From<SdkError<DescribeImagesError, R>> for Error
Source§fn from(err: SdkError<DescribeImagesError, R>) -> Self
fn from(err: SdkError<DescribeImagesError, R>) -> Self
Source§impl<R> From<SdkError<DescribeRegistriesError, R>> for Error
impl<R> From<SdkError<DescribeRegistriesError, R>> for Error
Source§fn from(err: SdkError<DescribeRegistriesError, R>) -> Self
fn from(err: SdkError<DescribeRegistriesError, R>) -> Self
Source§impl<R> From<SdkError<DescribeRepositoriesError, R>> for Error
impl<R> From<SdkError<DescribeRepositoriesError, R>> for Error
Source§fn from(err: SdkError<DescribeRepositoriesError, R>) -> Self
fn from(err: SdkError<DescribeRepositoriesError, R>) -> Self
Source§impl<R> From<SdkError<GetAuthorizationTokenError, R>> for Error
impl<R> From<SdkError<GetAuthorizationTokenError, R>> for Error
Source§fn from(err: SdkError<GetAuthorizationTokenError, R>) -> Self
fn from(err: SdkError<GetAuthorizationTokenError, R>) -> Self
Source§impl<R> From<SdkError<GetRegistryCatalogDataError, R>> for Error
impl<R> From<SdkError<GetRegistryCatalogDataError, R>> for Error
Source§fn from(err: SdkError<GetRegistryCatalogDataError, R>) -> Self
fn from(err: SdkError<GetRegistryCatalogDataError, R>) -> Self
Source§impl<R> From<SdkError<GetRepositoryCatalogDataError, R>> for Error
impl<R> From<SdkError<GetRepositoryCatalogDataError, R>> for Error
Source§fn from(err: SdkError<GetRepositoryCatalogDataError, R>) -> Self
fn from(err: SdkError<GetRepositoryCatalogDataError, R>) -> Self
Source§impl<R> From<SdkError<GetRepositoryPolicyError, R>> for Error
impl<R> From<SdkError<GetRepositoryPolicyError, R>> for Error
Source§fn from(err: SdkError<GetRepositoryPolicyError, R>) -> Self
fn from(err: SdkError<GetRepositoryPolicyError, R>) -> Self
Source§impl<R> From<SdkError<InitiateLayerUploadError, R>> for Error
impl<R> From<SdkError<InitiateLayerUploadError, R>> for Error
Source§fn from(err: SdkError<InitiateLayerUploadError, R>) -> Self
fn from(err: SdkError<InitiateLayerUploadError, R>) -> Self
Source§impl<R> From<SdkError<ListTagsForResourceError, R>> for Error
impl<R> From<SdkError<ListTagsForResourceError, R>> for Error
Source§fn from(err: SdkError<ListTagsForResourceError, R>) -> Self
fn from(err: SdkError<ListTagsForResourceError, R>) -> Self
Source§impl<R> From<SdkError<PutImageError, R>> for Error
impl<R> From<SdkError<PutImageError, R>> for Error
Source§fn from(err: SdkError<PutImageError, R>) -> Self
fn from(err: SdkError<PutImageError, R>) -> Self
Source§impl<R> From<SdkError<PutRegistryCatalogDataError, R>> for Error
impl<R> From<SdkError<PutRegistryCatalogDataError, R>> for Error
Source§fn from(err: SdkError<PutRegistryCatalogDataError, R>) -> Self
fn from(err: SdkError<PutRegistryCatalogDataError, R>) -> Self
Source§impl<R> From<SdkError<PutRepositoryCatalogDataError, R>> for Error
impl<R> From<SdkError<PutRepositoryCatalogDataError, R>> for Error
Source§fn from(err: SdkError<PutRepositoryCatalogDataError, R>) -> Self
fn from(err: SdkError<PutRepositoryCatalogDataError, R>) -> Self
Source§impl<R> From<SdkError<SetRepositoryPolicyError, R>> for Error
impl<R> From<SdkError<SetRepositoryPolicyError, R>> for Error
Source§fn from(err: SdkError<SetRepositoryPolicyError, R>) -> Self
fn from(err: SdkError<SetRepositoryPolicyError, R>) -> Self
Source§impl<R> From<SdkError<TagResourceError, R>> for Error
impl<R> From<SdkError<TagResourceError, R>> for Error
Source§fn from(err: SdkError<TagResourceError, R>) -> Self
fn from(err: SdkError<TagResourceError, R>) -> Self
Source§impl<R> From<SdkError<UntagResourceError, R>> for Error
impl<R> From<SdkError<UntagResourceError, R>> for Error
Source§fn from(err: SdkError<UntagResourceError, R>) -> Self
fn from(err: SdkError<UntagResourceError, R>) -> Self
Source§impl<R> From<SdkError<UploadLayerPartError, R>> for Error
impl<R> From<SdkError<UploadLayerPartError, R>> for Error
Source§fn from(err: SdkError<UploadLayerPartError, R>) -> Self
fn from(err: SdkError<UploadLayerPartError, R>) -> Self
Source§impl From<SetRepositoryPolicyError> for Error
impl From<SetRepositoryPolicyError> for Error
Source§fn from(err: SetRepositoryPolicyError) -> Self
fn from(err: SetRepositoryPolicyError) -> Self
Source§impl From<TagResourceError> for Error
impl From<TagResourceError> for Error
Source§fn from(err: TagResourceError) -> Self
fn from(err: TagResourceError) -> Self
Source§impl From<UntagResourceError> for Error
impl From<UntagResourceError> for Error
Source§fn from(err: UntagResourceError) -> Self
fn from(err: UntagResourceError) -> Self
Source§impl From<UploadLayerPartError> for Error
impl From<UploadLayerPartError> for Error
Source§fn from(err: UploadLayerPartError) -> Self
fn from(err: UploadLayerPartError) -> Self
Source§impl ProvideErrorMetadata for Error
impl ProvideErrorMetadata for Error
Source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);