#[non_exhaustive]pub enum Error {
AccessDeniedException(AccessDeniedException),
ConflictException(ConflictException),
InternalServerException(InternalServerException),
ResourceNotFoundException(ResourceNotFoundException),
ServiceQuotaExceededException(ServiceQuotaExceededException),
ThrottlingException(ThrottlingException),
ValidationException(ValidationException),
Unhandled(Unhandled),
}Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessDeniedException(AccessDeniedException)
You don't have sufficient access to perform this operation. To use this operation, you must have AWS Identity and Access Management (IAM) permissions for the operation, and on the resource it acts on. If the space uses a customer managed AWS Key Management Service (AWS KMS) key, you must also have permission to use the key.
ConflictException(ConflictException)
The request conflicts with the current state of the resource. For example, the space is being created, updated, or deleted, a space with the same name already exists, or you reused a client token with different parameters. Wait for the space to finish being created, updated, or deleted, or use a different name or client token, and then retry.
InternalServerException(InternalServerException)
The service couldn't process the request because of an internal error. Retry the request.
ResourceNotFoundException(ResourceNotFoundException)
The specified resource doesn't exist. Check the IDs in the request.
ServiceQuotaExceededException(ServiceQuotaExceededException)
The request would exceed a quota, such as the number of spaces in your account or the number of strategies in a space.
ThrottlingException(ThrottlingException)
The service throttled the request. Retry the request with exponential backoff.
ValidationException(ValidationException)
The request isn't valid. The reason, message, and fieldList members describe the problem. Fix the request, and then try again.
Unhandled(Unhandled)
Matching 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
use the Display impl or to_string()
Source§impl From<BatchGetEventError> for Error
impl From<BatchGetEventError> for Error
Source§fn from(err: BatchGetEventError) -> Self
fn from(err: BatchGetEventError) -> 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<CreateEventError> for Error
impl From<CreateEventError> for Error
Source§fn from(err: CreateEventError) -> Self
fn from(err: CreateEventError) -> Self
Source§impl From<CreateMemoryError> for Error
impl From<CreateMemoryError> for Error
Source§fn from(err: CreateMemoryError) -> Self
fn from(err: CreateMemoryError) -> Self
Source§impl From<CreateSpaceError> for Error
impl From<CreateSpaceError> for Error
Source§fn from(err: CreateSpaceError) -> Self
fn from(err: CreateSpaceError) -> Self
Source§impl From<DeleteEventError> for Error
impl From<DeleteEventError> for Error
Source§fn from(err: DeleteEventError) -> Self
fn from(err: DeleteEventError) -> Self
Source§impl From<DeleteMemoryError> for Error
impl From<DeleteMemoryError> for Error
Source§fn from(err: DeleteMemoryError) -> Self
fn from(err: DeleteMemoryError) -> Self
Source§impl From<DeleteSpaceError> for Error
impl From<DeleteSpaceError> for Error
Source§fn from(err: DeleteSpaceError) -> Self
fn from(err: DeleteSpaceError) -> Self
Source§impl From<GetEventError> for Error
impl From<GetEventError> for Error
Source§fn from(err: GetEventError) -> Self
fn from(err: GetEventError) -> Self
Source§impl From<GetMemoryError> for Error
impl From<GetMemoryError> for Error
Source§fn from(err: GetMemoryError) -> Self
fn from(err: GetMemoryError) -> Self
Source§impl From<GetSpaceError> for Error
impl From<GetSpaceError> for Error
Source§fn from(err: GetSpaceError) -> Self
fn from(err: GetSpaceError) -> Self
Source§impl From<ListEventsError> for Error
impl From<ListEventsError> for Error
Source§fn from(err: ListEventsError) -> Self
fn from(err: ListEventsError) -> Self
Source§impl From<ListMemoriesError> for Error
impl From<ListMemoriesError> for Error
Source§fn from(err: ListMemoriesError) -> Self
fn from(err: ListMemoriesError) -> Self
Source§impl From<ListSpacesError> for Error
impl From<ListSpacesError> for Error
Source§fn from(err: ListSpacesError) -> Self
fn from(err: ListSpacesError) -> 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<R> From<SdkError<BatchGetEventError, R>> for Error
impl<R> From<SdkError<BatchGetEventError, R>> for Error
Source§fn from(err: SdkError<BatchGetEventError, R>) -> Self
fn from(err: SdkError<BatchGetEventError, R>) -> Self
Source§impl<R> From<SdkError<CreateEventError, R>> for Error
impl<R> From<SdkError<CreateEventError, R>> for Error
Source§fn from(err: SdkError<CreateEventError, R>) -> Self
fn from(err: SdkError<CreateEventError, R>) -> Self
Source§impl<R> From<SdkError<CreateMemoryError, R>> for Error
impl<R> From<SdkError<CreateMemoryError, R>> for Error
Source§fn from(err: SdkError<CreateMemoryError, R>) -> Self
fn from(err: SdkError<CreateMemoryError, R>) -> Self
Source§impl<R> From<SdkError<CreateSpaceError, R>> for Error
impl<R> From<SdkError<CreateSpaceError, R>> for Error
Source§fn from(err: SdkError<CreateSpaceError, R>) -> Self
fn from(err: SdkError<CreateSpaceError, R>) -> Self
Source§impl<R> From<SdkError<DeleteEventError, R>> for Error
impl<R> From<SdkError<DeleteEventError, R>> for Error
Source§fn from(err: SdkError<DeleteEventError, R>) -> Self
fn from(err: SdkError<DeleteEventError, R>) -> Self
Source§impl<R> From<SdkError<DeleteMemoryError, R>> for Error
impl<R> From<SdkError<DeleteMemoryError, R>> for Error
Source§fn from(err: SdkError<DeleteMemoryError, R>) -> Self
fn from(err: SdkError<DeleteMemoryError, R>) -> Self
Source§impl<R> From<SdkError<DeleteSpaceError, R>> for Error
impl<R> From<SdkError<DeleteSpaceError, R>> for Error
Source§fn from(err: SdkError<DeleteSpaceError, R>) -> Self
fn from(err: SdkError<DeleteSpaceError, R>) -> Self
Source§impl<R> From<SdkError<GetEventError, R>> for Error
impl<R> From<SdkError<GetEventError, R>> for Error
Source§fn from(err: SdkError<GetEventError, R>) -> Self
fn from(err: SdkError<GetEventError, R>) -> Self
Source§impl<R> From<SdkError<GetMemoryError, R>> for Error
impl<R> From<SdkError<GetMemoryError, R>> for Error
Source§fn from(err: SdkError<GetMemoryError, R>) -> Self
fn from(err: SdkError<GetMemoryError, R>) -> Self
Source§impl<R> From<SdkError<GetSpaceError, R>> for Error
impl<R> From<SdkError<GetSpaceError, R>> for Error
Source§fn from(err: SdkError<GetSpaceError, R>) -> Self
fn from(err: SdkError<GetSpaceError, R>) -> Self
Source§impl<R> From<SdkError<ListEventsError, R>> for Error
impl<R> From<SdkError<ListEventsError, R>> for Error
Source§fn from(err: SdkError<ListEventsError, R>) -> Self
fn from(err: SdkError<ListEventsError, R>) -> Self
Source§impl<R> From<SdkError<ListMemoriesError, R>> for Error
impl<R> From<SdkError<ListMemoriesError, R>> for Error
Source§fn from(err: SdkError<ListMemoriesError, R>) -> Self
fn from(err: SdkError<ListMemoriesError, R>) -> Self
Source§impl<R> From<SdkError<ListSpacesError, R>> for Error
impl<R> From<SdkError<ListSpacesError, R>> for Error
Source§fn from(err: SdkError<ListSpacesError, R>) -> Self
fn from(err: SdkError<ListSpacesError, 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<SearchEventsError, R>> for Error
impl<R> From<SdkError<SearchEventsError, R>> for Error
Source§fn from(err: SdkError<SearchEventsError, R>) -> Self
fn from(err: SdkError<SearchEventsError, R>) -> Self
Source§impl<R> From<SdkError<SearchMemoriesError, R>> for Error
impl<R> From<SdkError<SearchMemoriesError, R>> for Error
Source§fn from(err: SdkError<SearchMemoriesError, R>) -> Self
fn from(err: SdkError<SearchMemoriesError, 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<UpdateMemoryError, R>> for Error
impl<R> From<SdkError<UpdateMemoryError, R>> for Error
Source§fn from(err: SdkError<UpdateMemoryError, R>) -> Self
fn from(err: SdkError<UpdateMemoryError, R>) -> Self
Source§impl<R> From<SdkError<UpdateSpaceError, R>> for Error
impl<R> From<SdkError<UpdateSpaceError, R>> for Error
Source§fn from(err: SdkError<UpdateSpaceError, R>) -> Self
fn from(err: SdkError<UpdateSpaceError, R>) -> Self
Source§impl From<SearchEventsError> for Error
impl From<SearchEventsError> for Error
Source§fn from(err: SearchEventsError) -> Self
fn from(err: SearchEventsError) -> Self
Source§impl From<SearchMemoriesError> for Error
impl From<SearchMemoriesError> for Error
Source§fn from(err: SearchMemoriesError) -> Self
fn from(err: SearchMemoriesError) -> 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<UpdateMemoryError> for Error
impl From<UpdateMemoryError> for Error
Source§fn from(err: UpdateMemoryError) -> Self
fn from(err: UpdateMemoryError) -> Self
Source§impl From<UpdateSpaceError> for Error
impl From<UpdateSpaceError> for Error
Source§fn from(err: UpdateSpaceError) -> Self
fn from(err: UpdateSpaceError) -> Self
Source§impl<O, E> From<WaiterError<O, E>> for Error
impl<O, E> From<WaiterError<O, E>> for Error
Source§fn from(err: WaiterError<O, E>) -> Self
fn from(err: WaiterError<O, E>) -> Self
Source§impl ProvideErrorMetadata for Error
impl ProvideErrorMetadata for Error
Source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
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 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>
renamed to 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);