#[non_exhaustive]pub enum Error {
ConcurrentModificationException(ConcurrentModificationException),
DeveloperUserAlreadyRegisteredException(DeveloperUserAlreadyRegisteredException),
ExternalServiceException(ExternalServiceException),
InternalErrorException(InternalErrorException),
InvalidIdentityPoolConfigurationException(InvalidIdentityPoolConfigurationException),
InvalidParameterException(InvalidParameterException),
LimitExceededException(LimitExceededException),
NotAuthorizedException(NotAuthorizedException),
ResourceConflictException(ResourceConflictException),
ResourceNotFoundException(ResourceNotFoundException),
TooManyRequestsException(TooManyRequestsException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConcurrentModificationException(ConcurrentModificationException)
Thrown if there are parallel requests to modify a resource.
DeveloperUserAlreadyRegisteredException(DeveloperUserAlreadyRegisteredException)
The provided developer user identifier is already registered with Cognito under a different identity ID.
ExternalServiceException(ExternalServiceException)
An exception thrown when a dependent service such as Facebook or Twitter is not responding
InternalErrorException(InternalErrorException)
Thrown when the service encounters an error during processing the request.
InvalidIdentityPoolConfigurationException(InvalidIdentityPoolConfigurationException)
If you provided authentication information in the request, the identity pool has no authenticated role configured, or STS returned an error response to the request to assume the authenticated role from the identity pool. If you provided no authentication information in the request, the identity pool has no unauthenticated role configured, or STS returned an error response to the request to assume the unauthenticated role from the identity pool.
Your role trust policy must grant AssumeRoleWithWebIdentity
permissions to cognito-identity.amazonaws.com
.
InvalidParameterException(InvalidParameterException)
Thrown for missing or bad input parameter(s).
LimitExceededException(LimitExceededException)
Thrown when the total number of user pools has exceeded a preset limit.
NotAuthorizedException(NotAuthorizedException)
Thrown when a user is not authorized to access the requested resource.
ResourceConflictException(ResourceConflictException)
Thrown when a user tries to use a login which is already linked to another account.
ResourceNotFoundException(ResourceNotFoundException)
Thrown when the requested resource (for example, a dataset or record) does not exist.
TooManyRequestsException(TooManyRequestsException)
Thrown when a request is throttled.
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<BuildError> for Error
impl From<BuildError> for Error
Source§fn from(value: BuildError) -> Self
fn from(value: BuildError) -> Self
Source§impl From<CreateIdentityPoolError> for Error
impl From<CreateIdentityPoolError> for Error
Source§fn from(err: CreateIdentityPoolError) -> Self
fn from(err: CreateIdentityPoolError) -> Self
Source§impl From<DeleteIdentitiesError> for Error
impl From<DeleteIdentitiesError> for Error
Source§fn from(err: DeleteIdentitiesError) -> Self
fn from(err: DeleteIdentitiesError) -> Self
Source§impl From<DeleteIdentityPoolError> for Error
impl From<DeleteIdentityPoolError> for Error
Source§fn from(err: DeleteIdentityPoolError) -> Self
fn from(err: DeleteIdentityPoolError) -> Self
Source§impl From<DescribeIdentityError> for Error
impl From<DescribeIdentityError> for Error
Source§fn from(err: DescribeIdentityError) -> Self
fn from(err: DescribeIdentityError) -> Self
Source§impl From<DescribeIdentityPoolError> for Error
impl From<DescribeIdentityPoolError> for Error
Source§fn from(err: DescribeIdentityPoolError) -> Self
fn from(err: DescribeIdentityPoolError) -> Self
Source§impl From<GetCredentialsForIdentityError> for Error
impl From<GetCredentialsForIdentityError> for Error
Source§fn from(err: GetCredentialsForIdentityError) -> Self
fn from(err: GetCredentialsForIdentityError) -> Self
Source§impl From<GetIdError> for Error
impl From<GetIdError> for Error
Source§fn from(err: GetIdError) -> Self
fn from(err: GetIdError) -> Self
Source§impl From<GetIdentityPoolRolesError> for Error
impl From<GetIdentityPoolRolesError> for Error
Source§fn from(err: GetIdentityPoolRolesError) -> Self
fn from(err: GetIdentityPoolRolesError) -> Self
Source§impl From<GetOpenIdTokenError> for Error
impl From<GetOpenIdTokenError> for Error
Source§fn from(err: GetOpenIdTokenError) -> Self
fn from(err: GetOpenIdTokenError) -> Self
Source§impl From<GetOpenIdTokenForDeveloperIdentityError> for Error
impl From<GetOpenIdTokenForDeveloperIdentityError> for Error
Source§fn from(err: GetOpenIdTokenForDeveloperIdentityError) -> Self
fn from(err: GetOpenIdTokenForDeveloperIdentityError) -> Self
Source§impl From<GetPrincipalTagAttributeMapError> for Error
impl From<GetPrincipalTagAttributeMapError> for Error
Source§fn from(err: GetPrincipalTagAttributeMapError) -> Self
fn from(err: GetPrincipalTagAttributeMapError) -> Self
Source§impl From<ListIdentitiesError> for Error
impl From<ListIdentitiesError> for Error
Source§fn from(err: ListIdentitiesError) -> Self
fn from(err: ListIdentitiesError) -> Self
Source§impl From<ListIdentityPoolsError> for Error
impl From<ListIdentityPoolsError> for Error
Source§fn from(err: ListIdentityPoolsError) -> Self
fn from(err: ListIdentityPoolsError) -> 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<LookupDeveloperIdentityError> for Error
impl From<LookupDeveloperIdentityError> for Error
Source§fn from(err: LookupDeveloperIdentityError) -> Self
fn from(err: LookupDeveloperIdentityError) -> Self
Source§impl From<MergeDeveloperIdentitiesError> for Error
impl From<MergeDeveloperIdentitiesError> for Error
Source§fn from(err: MergeDeveloperIdentitiesError) -> Self
fn from(err: MergeDeveloperIdentitiesError) -> Self
Source§impl<R> From<SdkError<CreateIdentityPoolError, R>> for Error
impl<R> From<SdkError<CreateIdentityPoolError, R>> for Error
Source§fn from(err: SdkError<CreateIdentityPoolError, R>) -> Self
fn from(err: SdkError<CreateIdentityPoolError, R>) -> Self
Source§impl<R> From<SdkError<DeleteIdentitiesError, R>> for Error
impl<R> From<SdkError<DeleteIdentitiesError, R>> for Error
Source§fn from(err: SdkError<DeleteIdentitiesError, R>) -> Self
fn from(err: SdkError<DeleteIdentitiesError, R>) -> Self
Source§impl<R> From<SdkError<DeleteIdentityPoolError, R>> for Error
impl<R> From<SdkError<DeleteIdentityPoolError, R>> for Error
Source§fn from(err: SdkError<DeleteIdentityPoolError, R>) -> Self
fn from(err: SdkError<DeleteIdentityPoolError, R>) -> Self
Source§impl<R> From<SdkError<DescribeIdentityError, R>> for Error
impl<R> From<SdkError<DescribeIdentityError, R>> for Error
Source§fn from(err: SdkError<DescribeIdentityError, R>) -> Self
fn from(err: SdkError<DescribeIdentityError, R>) -> Self
Source§impl<R> From<SdkError<DescribeIdentityPoolError, R>> for Error
impl<R> From<SdkError<DescribeIdentityPoolError, R>> for Error
Source§fn from(err: SdkError<DescribeIdentityPoolError, R>) -> Self
fn from(err: SdkError<DescribeIdentityPoolError, R>) -> Self
Source§impl<R> From<SdkError<GetCredentialsForIdentityError, R>> for Error
impl<R> From<SdkError<GetCredentialsForIdentityError, R>> for Error
Source§fn from(err: SdkError<GetCredentialsForIdentityError, R>) -> Self
fn from(err: SdkError<GetCredentialsForIdentityError, R>) -> Self
Source§impl<R> From<SdkError<GetIdError, R>> for Error
impl<R> From<SdkError<GetIdError, R>> for Error
Source§fn from(err: SdkError<GetIdError, R>) -> Self
fn from(err: SdkError<GetIdError, R>) -> Self
Source§impl<R> From<SdkError<GetIdentityPoolRolesError, R>> for Error
impl<R> From<SdkError<GetIdentityPoolRolesError, R>> for Error
Source§fn from(err: SdkError<GetIdentityPoolRolesError, R>) -> Self
fn from(err: SdkError<GetIdentityPoolRolesError, R>) -> Self
Source§impl<R> From<SdkError<GetOpenIdTokenError, R>> for Error
impl<R> From<SdkError<GetOpenIdTokenError, R>> for Error
Source§fn from(err: SdkError<GetOpenIdTokenError, R>) -> Self
fn from(err: SdkError<GetOpenIdTokenError, R>) -> Self
Source§impl<R> From<SdkError<GetOpenIdTokenForDeveloperIdentityError, R>> for Error
impl<R> From<SdkError<GetOpenIdTokenForDeveloperIdentityError, R>> for Error
Source§fn from(err: SdkError<GetOpenIdTokenForDeveloperIdentityError, R>) -> Self
fn from(err: SdkError<GetOpenIdTokenForDeveloperIdentityError, R>) -> Self
Source§impl<R> From<SdkError<GetPrincipalTagAttributeMapError, R>> for Error
impl<R> From<SdkError<GetPrincipalTagAttributeMapError, R>> for Error
Source§fn from(err: SdkError<GetPrincipalTagAttributeMapError, R>) -> Self
fn from(err: SdkError<GetPrincipalTagAttributeMapError, R>) -> Self
Source§impl<R> From<SdkError<ListIdentitiesError, R>> for Error
impl<R> From<SdkError<ListIdentitiesError, R>> for Error
Source§fn from(err: SdkError<ListIdentitiesError, R>) -> Self
fn from(err: SdkError<ListIdentitiesError, R>) -> Self
Source§impl<R> From<SdkError<ListIdentityPoolsError, R>> for Error
impl<R> From<SdkError<ListIdentityPoolsError, R>> for Error
Source§fn from(err: SdkError<ListIdentityPoolsError, R>) -> Self
fn from(err: SdkError<ListIdentityPoolsError, 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<LookupDeveloperIdentityError, R>> for Error
impl<R> From<SdkError<LookupDeveloperIdentityError, R>> for Error
Source§fn from(err: SdkError<LookupDeveloperIdentityError, R>) -> Self
fn from(err: SdkError<LookupDeveloperIdentityError, R>) -> Self
Source§impl<R> From<SdkError<MergeDeveloperIdentitiesError, R>> for Error
impl<R> From<SdkError<MergeDeveloperIdentitiesError, R>> for Error
Source§fn from(err: SdkError<MergeDeveloperIdentitiesError, R>) -> Self
fn from(err: SdkError<MergeDeveloperIdentitiesError, R>) -> Self
Source§impl<R> From<SdkError<SetIdentityPoolRolesError, R>> for Error
impl<R> From<SdkError<SetIdentityPoolRolesError, R>> for Error
Source§fn from(err: SdkError<SetIdentityPoolRolesError, R>) -> Self
fn from(err: SdkError<SetIdentityPoolRolesError, R>) -> Self
Source§impl<R> From<SdkError<SetPrincipalTagAttributeMapError, R>> for Error
impl<R> From<SdkError<SetPrincipalTagAttributeMapError, R>> for Error
Source§fn from(err: SdkError<SetPrincipalTagAttributeMapError, R>) -> Self
fn from(err: SdkError<SetPrincipalTagAttributeMapError, 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<UnlinkDeveloperIdentityError, R>> for Error
impl<R> From<SdkError<UnlinkDeveloperIdentityError, R>> for Error
Source§fn from(err: SdkError<UnlinkDeveloperIdentityError, R>) -> Self
fn from(err: SdkError<UnlinkDeveloperIdentityError, R>) -> Self
Source§impl<R> From<SdkError<UnlinkIdentityError, R>> for Error
impl<R> From<SdkError<UnlinkIdentityError, R>> for Error
Source§fn from(err: SdkError<UnlinkIdentityError, R>) -> Self
fn from(err: SdkError<UnlinkIdentityError, 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<UpdateIdentityPoolError, R>> for Error
impl<R> From<SdkError<UpdateIdentityPoolError, R>> for Error
Source§fn from(err: SdkError<UpdateIdentityPoolError, R>) -> Self
fn from(err: SdkError<UpdateIdentityPoolError, R>) -> Self
Source§impl From<SetIdentityPoolRolesError> for Error
impl From<SetIdentityPoolRolesError> for Error
Source§fn from(err: SetIdentityPoolRolesError) -> Self
fn from(err: SetIdentityPoolRolesError) -> Self
Source§impl From<SetPrincipalTagAttributeMapError> for Error
impl From<SetPrincipalTagAttributeMapError> for Error
Source§fn from(err: SetPrincipalTagAttributeMapError) -> Self
fn from(err: SetPrincipalTagAttributeMapError) -> 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<UnlinkDeveloperIdentityError> for Error
impl From<UnlinkDeveloperIdentityError> for Error
Source§fn from(err: UnlinkDeveloperIdentityError) -> Self
fn from(err: UnlinkDeveloperIdentityError) -> Self
Source§impl From<UnlinkIdentityError> for Error
impl From<UnlinkIdentityError> for Error
Source§fn from(err: UnlinkIdentityError) -> Self
fn from(err: UnlinkIdentityError) -> 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<UpdateIdentityPoolError> for Error
impl From<UpdateIdentityPoolError> for Error
Source§fn from(err: UpdateIdentityPoolError) -> Self
fn from(err: UpdateIdentityPoolError) -> 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);