#[non_exhaustive]pub enum Error {
Show 16 variants
AccessDeniedException(AccessDeniedException),
ConcurrentModificationException(ConcurrentModificationException),
ConflictException(ConflictException),
IdempotentParameterMismatchException(IdempotentParameterMismatchException),
InternalException(InternalException),
InvalidInputException(InvalidInputException),
InvalidStateException(InvalidStateException),
LimitExceededException(LimitExceededException),
PolicyLengthExceededException(PolicyLengthExceededException),
PublicPolicyException(PublicPolicyException),
ResourceAlreadyExistsException(ResourceAlreadyExistsException),
ResourceInUseException(ResourceInUseException),
ResourceNotFoundException(ResourceNotFoundException),
SchemaRegistryUnavailableException(SchemaRegistryUnavailableException),
ThrottlingException(ThrottlingException),
Unhandled(Unhandled),
}Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessDeniedException(AccessDeniedException)
The caller does not have the permissions required to perform the operation. This error is also returned when the operation cannot use the AWS KMS key for the event bus.
ConcurrentModificationException(ConcurrentModificationException)
Another change to the resource is already in progress. Retry the request.
ConflictException(ConflictException)
A client-supplied precondition (e.g. ExpectedRevisionId on a resource-policy write) did not match the current state of the resource. Retrying the same request will fail again; re-read the resource and re-evaluate before retrying. A conditional request is not retry-safe on its own. If an earlier attempt committed but its response never reached the caller, retrying fails with this error, which is indistinguishable from another writer having won. Compare the resource’s current contents with what the request intended: a successful attempt stores a revision ID the caller never saw, so the revision alone cannot tell the two apart, but matching contents mean the change took effect.
IdempotentParameterMismatchException(IdempotentParameterMismatchException)
The request reuses the client token of an earlier request with different parameters. Use a new client token, or resend the earlier request unchanged.
InternalException(InternalException)
The request failed because of an internal service error. Retry the request.
InvalidInputException(InvalidInputException)
A request parameter is missing or not valid.
InvalidStateException(InvalidStateException)
The resource is not in a state that allows the operation. For example, an event bus that is still being created cannot accept events.
LimitExceededException(LimitExceededException)
The request would exceed a service quota for the account.
PolicyLengthExceededException(PolicyLengthExceededException)
The policy document is larger than the account’s resource policy size quota, or larger than the service maximum.
PublicPolicyException(PublicPolicyException)
The policy was rejected because it would grant public access to the event bus. A statement grants public access when its principal is a wildcard and no condition limits the callers to specific AWS accounts or principals. To fix it, replace the wildcard principal with specific principals, or add a condition that limits the callers to specific AWS accounts. Conditions on event content (events:source, events:detail-type, events:Metadata/*) do not identify the caller and do not make a wildcard principal non-public. Returned only for the “default” policy; the “AWS_RAM” policy is composed by AWS Resource Access Manager and never grants public access.
ResourceAlreadyExistsException(ResourceAlreadyExistsException)
A resource with the same name already exists.
ResourceInUseException(ResourceInUseException)
The resource is in use and cannot be deleted. For example, an event bus with subscribers or event sources cannot be deleted until they are deleted.
ResourceNotFoundException(ResourceNotFoundException)
The resource does not exist.
The configured schema registry could not be reached. Retry the request.
ThrottlingException(ThrottlingException)
The request was throttled because it exceeds a request rate limit. Retry the request with backoff.
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<BuildError> for Error
impl From<BuildError> for Error
Source§fn from(value: BuildError) -> Self
fn from(value: BuildError) -> Self
Source§impl From<CreateEventBusError> for Error
impl From<CreateEventBusError> for Error
Source§fn from(err: CreateEventBusError) -> Self
fn from(err: CreateEventBusError) -> Self
Source§impl From<CreateEventSourceError> for Error
impl From<CreateEventSourceError> for Error
Source§fn from(err: CreateEventSourceError) -> Self
fn from(err: CreateEventSourceError) -> Self
Source§impl From<CreateSubscriberError> for Error
impl From<CreateSubscriberError> for Error
Source§fn from(err: CreateSubscriberError) -> Self
fn from(err: CreateSubscriberError) -> Self
Source§impl From<DeleteEventBusError> for Error
impl From<DeleteEventBusError> for Error
Source§fn from(err: DeleteEventBusError) -> Self
fn from(err: DeleteEventBusError) -> Self
Source§impl From<DeleteEventSourceError> for Error
impl From<DeleteEventSourceError> for Error
Source§fn from(err: DeleteEventSourceError) -> Self
fn from(err: DeleteEventSourceError) -> Self
Source§impl From<DeleteResourcePolicyError> for Error
impl From<DeleteResourcePolicyError> for Error
Source§fn from(err: DeleteResourcePolicyError) -> Self
fn from(err: DeleteResourcePolicyError) -> Self
Source§impl From<DeleteSubscriberError> for Error
impl From<DeleteSubscriberError> for Error
Source§fn from(err: DeleteSubscriberError) -> Self
fn from(err: DeleteSubscriberError) -> Self
Source§impl From<DescribeEventBusError> for Error
impl From<DescribeEventBusError> for Error
Source§fn from(err: DescribeEventBusError) -> Self
fn from(err: DescribeEventBusError) -> Self
Source§impl From<DescribeEventSourceError> for Error
impl From<DescribeEventSourceError> for Error
Source§fn from(err: DescribeEventSourceError) -> Self
fn from(err: DescribeEventSourceError) -> Self
Source§impl From<DescribeSubscriberError> for Error
impl From<DescribeSubscriberError> for Error
Source§fn from(err: DescribeSubscriberError) -> Self
fn from(err: DescribeSubscriberError) -> Self
Source§impl From<GetResourcePolicyError> for Error
impl From<GetResourcePolicyError> for Error
Source§fn from(err: GetResourcePolicyError) -> Self
fn from(err: GetResourcePolicyError) -> Self
Source§impl From<ListEventBusesError> for Error
impl From<ListEventBusesError> for Error
Source§fn from(err: ListEventBusesError) -> Self
fn from(err: ListEventBusesError) -> Self
Source§impl From<ListEventSourcesError> for Error
impl From<ListEventSourcesError> for Error
Source§fn from(err: ListEventSourcesError) -> Self
fn from(err: ListEventSourcesError) -> Self
Source§impl From<ListResourcePoliciesError> for Error
impl From<ListResourcePoliciesError> for Error
Source§fn from(err: ListResourcePoliciesError) -> Self
fn from(err: ListResourcePoliciesError) -> Self
Source§impl From<ListSubscribersError> for Error
impl From<ListSubscribersError> for Error
Source§fn from(err: ListSubscribersError) -> Self
fn from(err: ListSubscribersError) -> 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<PutEventsError> for Error
impl From<PutEventsError> for Error
Source§fn from(err: PutEventsError) -> Self
fn from(err: PutEventsError) -> Self
Source§impl From<PutRawEventsError> for Error
impl From<PutRawEventsError> for Error
Source§fn from(err: PutRawEventsError) -> Self
fn from(err: PutRawEventsError) -> Self
Source§impl From<PutResourcePolicyError> for Error
impl From<PutResourcePolicyError> for Error
Source§fn from(err: PutResourcePolicyError) -> Self
fn from(err: PutResourcePolicyError) -> Self
Source§impl From<RevokeResourceError> for Error
impl From<RevokeResourceError> for Error
Source§fn from(err: RevokeResourceError) -> Self
fn from(err: RevokeResourceError) -> Self
Source§impl<R> From<SdkError<CreateEventBusError, R>> for Error
impl<R> From<SdkError<CreateEventBusError, R>> for Error
Source§fn from(err: SdkError<CreateEventBusError, R>) -> Self
fn from(err: SdkError<CreateEventBusError, R>) -> Self
Source§impl<R> From<SdkError<CreateEventSourceError, R>> for Error
impl<R> From<SdkError<CreateEventSourceError, R>> for Error
Source§fn from(err: SdkError<CreateEventSourceError, R>) -> Self
fn from(err: SdkError<CreateEventSourceError, R>) -> Self
Source§impl<R> From<SdkError<CreateSubscriberError, R>> for Error
impl<R> From<SdkError<CreateSubscriberError, R>> for Error
Source§fn from(err: SdkError<CreateSubscriberError, R>) -> Self
fn from(err: SdkError<CreateSubscriberError, R>) -> Self
Source§impl<R> From<SdkError<DeleteEventBusError, R>> for Error
impl<R> From<SdkError<DeleteEventBusError, R>> for Error
Source§fn from(err: SdkError<DeleteEventBusError, R>) -> Self
fn from(err: SdkError<DeleteEventBusError, R>) -> Self
Source§impl<R> From<SdkError<DeleteEventSourceError, R>> for Error
impl<R> From<SdkError<DeleteEventSourceError, R>> for Error
Source§fn from(err: SdkError<DeleteEventSourceError, R>) -> Self
fn from(err: SdkError<DeleteEventSourceError, R>) -> Self
Source§impl<R> From<SdkError<DeleteResourcePolicyError, R>> for Error
impl<R> From<SdkError<DeleteResourcePolicyError, R>> for Error
Source§fn from(err: SdkError<DeleteResourcePolicyError, R>) -> Self
fn from(err: SdkError<DeleteResourcePolicyError, R>) -> Self
Source§impl<R> From<SdkError<DeleteSubscriberError, R>> for Error
impl<R> From<SdkError<DeleteSubscriberError, R>> for Error
Source§fn from(err: SdkError<DeleteSubscriberError, R>) -> Self
fn from(err: SdkError<DeleteSubscriberError, R>) -> Self
Source§impl<R> From<SdkError<DescribeEventBusError, R>> for Error
impl<R> From<SdkError<DescribeEventBusError, R>> for Error
Source§fn from(err: SdkError<DescribeEventBusError, R>) -> Self
fn from(err: SdkError<DescribeEventBusError, R>) -> Self
Source§impl<R> From<SdkError<DescribeEventSourceError, R>> for Error
impl<R> From<SdkError<DescribeEventSourceError, R>> for Error
Source§fn from(err: SdkError<DescribeEventSourceError, R>) -> Self
fn from(err: SdkError<DescribeEventSourceError, R>) -> Self
Source§impl<R> From<SdkError<DescribeSubscriberError, R>> for Error
impl<R> From<SdkError<DescribeSubscriberError, R>> for Error
Source§fn from(err: SdkError<DescribeSubscriberError, R>) -> Self
fn from(err: SdkError<DescribeSubscriberError, R>) -> Self
Source§impl<R> From<SdkError<GetResourcePolicyError, R>> for Error
impl<R> From<SdkError<GetResourcePolicyError, R>> for Error
Source§fn from(err: SdkError<GetResourcePolicyError, R>) -> Self
fn from(err: SdkError<GetResourcePolicyError, R>) -> Self
Source§impl<R> From<SdkError<ListEventBusesError, R>> for Error
impl<R> From<SdkError<ListEventBusesError, R>> for Error
Source§fn from(err: SdkError<ListEventBusesError, R>) -> Self
fn from(err: SdkError<ListEventBusesError, R>) -> Self
Source§impl<R> From<SdkError<ListEventSourcesError, R>> for Error
impl<R> From<SdkError<ListEventSourcesError, R>> for Error
Source§fn from(err: SdkError<ListEventSourcesError, R>) -> Self
fn from(err: SdkError<ListEventSourcesError, R>) -> Self
Source§impl<R> From<SdkError<ListResourcePoliciesError, R>> for Error
impl<R> From<SdkError<ListResourcePoliciesError, R>> for Error
Source§fn from(err: SdkError<ListResourcePoliciesError, R>) -> Self
fn from(err: SdkError<ListResourcePoliciesError, R>) -> Self
Source§impl<R> From<SdkError<ListSubscribersError, R>> for Error
impl<R> From<SdkError<ListSubscribersError, R>> for Error
Source§fn from(err: SdkError<ListSubscribersError, R>) -> Self
fn from(err: SdkError<ListSubscribersError, 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<PutEventsError, R>> for Error
impl<R> From<SdkError<PutEventsError, R>> for Error
Source§fn from(err: SdkError<PutEventsError, R>) -> Self
fn from(err: SdkError<PutEventsError, R>) -> Self
Source§impl<R> From<SdkError<PutRawEventsError, R>> for Error
impl<R> From<SdkError<PutRawEventsError, R>> for Error
Source§fn from(err: SdkError<PutRawEventsError, R>) -> Self
fn from(err: SdkError<PutRawEventsError, R>) -> Self
Source§impl<R> From<SdkError<PutResourcePolicyError, R>> for Error
impl<R> From<SdkError<PutResourcePolicyError, R>> for Error
Source§fn from(err: SdkError<PutResourcePolicyError, R>) -> Self
fn from(err: SdkError<PutResourcePolicyError, R>) -> Self
Source§impl<R> From<SdkError<RevokeResourceError, R>> for Error
impl<R> From<SdkError<RevokeResourceError, R>> for Error
Source§fn from(err: SdkError<RevokeResourceError, R>) -> Self
fn from(err: SdkError<RevokeResourceError, 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<UpdateEventBusError, R>> for Error
impl<R> From<SdkError<UpdateEventBusError, R>> for Error
Source§fn from(err: SdkError<UpdateEventBusError, R>) -> Self
fn from(err: SdkError<UpdateEventBusError, R>) -> Self
Source§impl<R> From<SdkError<UpdateEventSourceError, R>> for Error
impl<R> From<SdkError<UpdateEventSourceError, R>> for Error
Source§fn from(err: SdkError<UpdateEventSourceError, R>) -> Self
fn from(err: SdkError<UpdateEventSourceError, R>) -> Self
Source§impl<R> From<SdkError<UpdateSubscriberError, R>> for Error
impl<R> From<SdkError<UpdateSubscriberError, R>> for Error
Source§fn from(err: SdkError<UpdateSubscriberError, R>) -> Self
fn from(err: SdkError<UpdateSubscriberError, R>) -> 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<UpdateEventBusError> for Error
impl From<UpdateEventBusError> for Error
Source§fn from(err: UpdateEventBusError) -> Self
fn from(err: UpdateEventBusError) -> Self
Source§impl From<UpdateEventSourceError> for Error
impl From<UpdateEventSourceError> for Error
Source§fn from(err: UpdateEventSourceError) -> Self
fn from(err: UpdateEventSourceError) -> Self
Source§impl From<UpdateSubscriberError> for Error
impl From<UpdateSubscriberError> for Error
Source§fn from(err: UpdateSubscriberError) -> Self
fn from(err: UpdateSubscriberError) -> 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 Freeze 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);