Enum aws_sdk_dynamodb::Error
source · #[non_exhaustive]pub enum Error {
Show 34 variants
BackupInUseException(BackupInUseException),
BackupNotFoundException(BackupNotFoundException),
ConditionalCheckFailedException(ConditionalCheckFailedException),
ContinuousBackupsUnavailableException(ContinuousBackupsUnavailableException),
DuplicateItemException(DuplicateItemException),
ExportConflictException(ExportConflictException),
ExportNotFoundException(ExportNotFoundException),
GlobalTableAlreadyExistsException(GlobalTableAlreadyExistsException),
GlobalTableNotFoundException(GlobalTableNotFoundException),
IdempotentParameterMismatchException(IdempotentParameterMismatchException),
ImportConflictException(ImportConflictException),
ImportNotFoundException(ImportNotFoundException),
IndexNotFoundException(IndexNotFoundException),
InternalServerError(InternalServerError),
InvalidEndpointException(InvalidEndpointException),
InvalidExportTimeException(InvalidExportTimeException),
InvalidRestoreTimeException(InvalidRestoreTimeException),
ItemCollectionSizeLimitExceededException(ItemCollectionSizeLimitExceededException),
LimitExceededException(LimitExceededException),
PointInTimeRecoveryUnavailableException(PointInTimeRecoveryUnavailableException),
PolicyNotFoundException(PolicyNotFoundException),
ProvisionedThroughputExceededException(ProvisionedThroughputExceededException),
ReplicaAlreadyExistsException(ReplicaAlreadyExistsException),
ReplicaNotFoundException(ReplicaNotFoundException),
RequestLimitExceeded(RequestLimitExceeded),
ResourceInUseException(ResourceInUseException),
ResourceNotFoundException(ResourceNotFoundException),
TableAlreadyExistsException(TableAlreadyExistsException),
TableInUseException(TableInUseException),
TableNotFoundException(TableNotFoundException),
TransactionCanceledException(TransactionCanceledException),
TransactionConflictException(TransactionConflictException),
TransactionInProgressException(TransactionInProgressException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BackupInUseException(BackupInUseException)
There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.
BackupNotFoundException(BackupNotFoundException)
Backup not found for the given BackupARN.
ConditionalCheckFailedException(ConditionalCheckFailedException)
A condition specified in the operation could not be evaluated.
Backups have not yet been enabled for this table.
DuplicateItemException(DuplicateItemException)
There was an attempt to insert an item with the same primary key as an item that already exists in the DynamoDB table.
ExportConflictException(ExportConflictException)
There was a conflict when writing to the specified S3 bucket.
ExportNotFoundException(ExportNotFoundException)
The specified export was not found.
GlobalTableAlreadyExistsException(GlobalTableAlreadyExistsException)
The specified global table already exists.
GlobalTableNotFoundException(GlobalTableNotFoundException)
The specified global table does not exist.
IdempotentParameterMismatchException(IdempotentParameterMismatchException)
DynamoDB rejected the request because you retried a request with a different payload but with an idempotent token that was already used.
ImportConflictException(ImportConflictException)
There was a conflict when importing from the specified S3 source. This can occur when the current import conflicts with a previous import request that had the same client token.
ImportNotFoundException(ImportNotFoundException)
The specified import was not found.
IndexNotFoundException(IndexNotFoundException)
The operation tried to access a nonexistent index.
InternalServerError(InternalServerError)
An error occurred on the server side.
InvalidEndpointException(InvalidEndpointException)
InvalidExportTimeException(InvalidExportTimeException)
The specified ExportTime
is outside of the point in time recovery window.
InvalidRestoreTimeException(InvalidRestoreTimeException)
An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime and LatestRestorableDateTime.
ItemCollectionSizeLimitExceededException(ItemCollectionSizeLimitExceededException)
An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.
LimitExceededException(LimitExceededException)
There is no limit to the number of daily on-demand backups that can be taken.
For most purposes, up to 500 simultaneous table operations are allowed per account. These operations include CreateTable
, UpdateTable
, DeleteTable
,UpdateTimeToLive
, RestoreTableFromBackup
, and RestoreTableToPointInTime
.
When you are creating a table with one or more secondary indexes, you can have up to 250 such requests running at a time. However, if the table or index specifications are complex, then DynamoDB might temporarily reduce the number of concurrent operations.
When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.
There is a soft account quota of 2,500 tables.
GetRecords was called with a value of more than 1000 for the limit request parameter.
More than 2 processes are reading from the same streams shard at the same time. Exceeding this limit may result in request throttling.
Point in time recovery has not yet been enabled for this source table.
PolicyNotFoundException(PolicyNotFoundException)
The operation tried to access a nonexistent resource-based policy.
If you specified an ExpectedRevisionId
, it's possible that a policy is present for the resource but its revision ID didn't match the expected value.
ProvisionedThroughputExceededException(ProvisionedThroughputExceededException)
Your request rate is too high. The Amazon Web Services SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to Error Retries and Exponential Backoff in the Amazon DynamoDB Developer Guide.
ReplicaAlreadyExistsException(ReplicaAlreadyExistsException)
The specified replica is already part of the global table.
ReplicaNotFoundException(ReplicaNotFoundException)
The specified replica is no longer part of the global table.
RequestLimitExceeded(RequestLimitExceeded)
Throughput exceeds the current throughput quota for your account. Please contact Amazon Web Services Support to request a quota increase.
ResourceInUseException(ResourceInUseException)
The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING
state.
ResourceNotFoundException(ResourceNotFoundException)
The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE
.
TableAlreadyExistsException(TableAlreadyExistsException)
A target table with the specified name already exists.
TableInUseException(TableInUseException)
A target table with the specified name is either being created or deleted.
TableNotFoundException(TableNotFoundException)
A source table with the name TableName
does not currently exist within the subscriber's account or the subscriber is operating in the wrong Amazon Web Services Region.
TransactionCanceledException(TransactionCanceledException)
The entire transaction request was canceled.
DynamoDB cancels a TransactWriteItems
request under the following circumstances:
-
A condition in one of the condition expressions is not met.
-
A table in the
TransactWriteItems
request is in a different account or region. -
More than one action in the
TransactWriteItems
operation targets the same item. -
There is insufficient provisioned capacity for the transaction to be completed.
-
An item size becomes too large (larger than 400 KB), or a local secondary index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.
-
There is a user error, such as an invalid data format.
-
There is an ongoing
TransactWriteItems
operation that conflicts with a concurrentTransactWriteItems
request. In this case theTransactWriteItems
operation fails with aTransactionCanceledException
.
DynamoDB cancels a TransactGetItems
request under the following circumstances:
-
There is an ongoing
TransactGetItems
operation that conflicts with a concurrentPutItem
,UpdateItem
,DeleteItem
orTransactWriteItems
request. In this case theTransactGetItems
operation fails with aTransactionCanceledException
. -
A table in the
TransactGetItems
request is in a different account or region. -
There is insufficient provisioned capacity for the transaction to be completed.
-
There is a user error, such as an invalid data format.
If using Java, DynamoDB lists the cancellation reasons on the CancellationReasons
property. This property is not set for other languages. Transaction cancellation reasons are ordered in the order of requested items, if an item has no error it will have None
code and Null
message.
Cancellation reason codes and possible error messages:
-
No Errors:
-
Code:
None
-
Message:
null
-
-
Conditional Check Failed:
-
Code:
ConditionalCheckFailed
-
Message: The conditional request failed.
-
-
Item Collection Size Limit Exceeded:
-
Code:
ItemCollectionSizeLimitExceeded
-
Message: Collection size exceeded.
-
-
Transaction Conflict:
-
Code:
TransactionConflict
-
Message: Transaction is ongoing for the item.
-
-
Provisioned Throughput Exceeded:
-
Code:
ProvisionedThroughputExceeded
-
Messages:
-
The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API.
This Message is received when provisioned throughput is exceeded is on a provisioned DynamoDB table.
-
The level of configured provisioned throughput for one or more global secondary indexes of the table was exceeded. Consider increasing your provisioning level for the under-provisioned global secondary indexes with the UpdateTable API.
This message is returned when provisioned throughput is exceeded is on a provisioned GSI.
-
-
-
Throttling Error:
-
Code:
ThrottlingError
-
Messages:
-
Throughput exceeds the current capacity of your table or index. DynamoDB is automatically scaling your table or index so please try again shortly. If exceptions persist, check if you have a hot key: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-partition-key-design.html.
This message is returned when writes get throttled on an On-Demand table as DynamoDB is automatically scaling the table.
-
Throughput exceeds the current capacity for one or more global secondary indexes. DynamoDB is automatically scaling your index so please try again shortly.
This message is returned when writes get throttled on an On-Demand GSI as DynamoDB is automatically scaling the GSI.
-
-
-
Validation Error:
-
Code:
ValidationError
-
Messages:
-
One or more parameter values were invalid.
-
The update expression attempted to update the secondary index key beyond allowed size limits.
-
The update expression attempted to update the secondary index key to unsupported type.
-
An operand in the update expression has an incorrect data type.
-
Item size to update has exceeded the maximum allowed size.
-
Number overflow. Attempting to store a number with magnitude larger than supported range.
-
Type mismatch for attribute to update.
-
Nesting Levels have exceeded supported limits.
-
The document path provided in the update expression is invalid for update.
-
The provided expression refers to an attribute that does not exist in the item.
-
-
TransactionConflictException(TransactionConflictException)
Operation was rejected because there is an ongoing transaction for the item.
TransactionInProgressException(TransactionInProgressException)
The transaction with the given request token is already in progress.
Recommended Settings
This is a general recommendation for handling the TransactionInProgressException
. These settings help ensure that the client retries will trigger completion of the ongoing TransactWriteItems
request.
-
Set
clientExecutionTimeout
to a value that allows at least one retry to be processed after 5 seconds have elapsed since the first attempt for theTransactWriteItems
operation. -
Set
socketTimeout
to a value a little lower than therequestTimeout
setting. -
requestTimeout
should be set based on the time taken for the individual retries of a single HTTP request for your use case, but setting it to 1 second or higher should work well to reduce chances of retries andTransactionInProgressException
errors. -
Use exponential backoff when retrying and tune backoff if needed.
Assuming default retry policy, example timeout settings based on the guidelines above are as follows:
Example timeline:
-
0-1000 first attempt
-
1000-1500 first sleep/delay (default retry policy uses 500 ms as base delay for 4xx errors)
-
1500-2500 second attempt
-
2500-3500 second sleep/delay (500 * 2, exponential backoff)
-
3500-4500 third attempt
-
4500-6500 third sleep/delay (500 * 2^2)
-
6500-7500 fourth attempt (this can trigger inline recovery since 5 seconds have elapsed since the first attempt reached TC)
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<BatchExecuteStatementError> for Error
impl From<BatchExecuteStatementError> for Error
source§fn from(err: BatchExecuteStatementError) -> Self
fn from(err: BatchExecuteStatementError) -> Self
source§impl From<BatchGetItemError> for Error
impl From<BatchGetItemError> for Error
source§fn from(err: BatchGetItemError) -> Self
fn from(err: BatchGetItemError) -> Self
source§impl From<BatchWriteItemError> for Error
impl From<BatchWriteItemError> for Error
source§fn from(err: BatchWriteItemError) -> Self
fn from(err: BatchWriteItemError) -> 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<CreateBackupError> for Error
impl From<CreateBackupError> for Error
source§fn from(err: CreateBackupError) -> Self
fn from(err: CreateBackupError) -> Self
source§impl From<CreateGlobalTableError> for Error
impl From<CreateGlobalTableError> for Error
source§fn from(err: CreateGlobalTableError) -> Self
fn from(err: CreateGlobalTableError) -> Self
source§impl From<CreateTableError> for Error
impl From<CreateTableError> for Error
source§fn from(err: CreateTableError) -> Self
fn from(err: CreateTableError) -> Self
source§impl From<DeleteBackupError> for Error
impl From<DeleteBackupError> for Error
source§fn from(err: DeleteBackupError) -> Self
fn from(err: DeleteBackupError) -> Self
source§impl From<DeleteItemError> for Error
impl From<DeleteItemError> for Error
source§fn from(err: DeleteItemError) -> Self
fn from(err: DeleteItemError) -> 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<DeleteTableError> for Error
impl From<DeleteTableError> for Error
source§fn from(err: DeleteTableError) -> Self
fn from(err: DeleteTableError) -> Self
source§impl From<DescribeBackupError> for Error
impl From<DescribeBackupError> for Error
source§fn from(err: DescribeBackupError) -> Self
fn from(err: DescribeBackupError) -> Self
source§impl From<DescribeContinuousBackupsError> for Error
impl From<DescribeContinuousBackupsError> for Error
source§fn from(err: DescribeContinuousBackupsError) -> Self
fn from(err: DescribeContinuousBackupsError) -> Self
source§impl From<DescribeContributorInsightsError> for Error
impl From<DescribeContributorInsightsError> for Error
source§fn from(err: DescribeContributorInsightsError) -> Self
fn from(err: DescribeContributorInsightsError) -> Self
source§impl From<DescribeEndpointsError> for Error
impl From<DescribeEndpointsError> for Error
source§fn from(err: DescribeEndpointsError) -> Self
fn from(err: DescribeEndpointsError) -> Self
source§impl From<DescribeExportError> for Error
impl From<DescribeExportError> for Error
source§fn from(err: DescribeExportError) -> Self
fn from(err: DescribeExportError) -> Self
source§impl From<DescribeGlobalTableError> for Error
impl From<DescribeGlobalTableError> for Error
source§fn from(err: DescribeGlobalTableError) -> Self
fn from(err: DescribeGlobalTableError) -> Self
source§impl From<DescribeGlobalTableSettingsError> for Error
impl From<DescribeGlobalTableSettingsError> for Error
source§fn from(err: DescribeGlobalTableSettingsError) -> Self
fn from(err: DescribeGlobalTableSettingsError) -> Self
source§impl From<DescribeImportError> for Error
impl From<DescribeImportError> for Error
source§fn from(err: DescribeImportError) -> Self
fn from(err: DescribeImportError) -> Self
source§impl From<DescribeKinesisStreamingDestinationError> for Error
impl From<DescribeKinesisStreamingDestinationError> for Error
source§fn from(err: DescribeKinesisStreamingDestinationError) -> Self
fn from(err: DescribeKinesisStreamingDestinationError) -> Self
source§impl From<DescribeLimitsError> for Error
impl From<DescribeLimitsError> for Error
source§fn from(err: DescribeLimitsError) -> Self
fn from(err: DescribeLimitsError) -> Self
source§impl From<DescribeTableError> for Error
impl From<DescribeTableError> for Error
source§fn from(err: DescribeTableError) -> Self
fn from(err: DescribeTableError) -> Self
source§impl From<DescribeTableReplicaAutoScalingError> for Error
impl From<DescribeTableReplicaAutoScalingError> for Error
source§fn from(err: DescribeTableReplicaAutoScalingError) -> Self
fn from(err: DescribeTableReplicaAutoScalingError) -> Self
source§impl From<DescribeTimeToLiveError> for Error
impl From<DescribeTimeToLiveError> for Error
source§fn from(err: DescribeTimeToLiveError) -> Self
fn from(err: DescribeTimeToLiveError) -> Self
source§impl From<DisableKinesisStreamingDestinationError> for Error
impl From<DisableKinesisStreamingDestinationError> for Error
source§fn from(err: DisableKinesisStreamingDestinationError) -> Self
fn from(err: DisableKinesisStreamingDestinationError) -> Self
source§impl From<EnableKinesisStreamingDestinationError> for Error
impl From<EnableKinesisStreamingDestinationError> for Error
source§fn from(err: EnableKinesisStreamingDestinationError) -> Self
fn from(err: EnableKinesisStreamingDestinationError) -> Self
source§impl From<ExecuteStatementError> for Error
impl From<ExecuteStatementError> for Error
source§fn from(err: ExecuteStatementError) -> Self
fn from(err: ExecuteStatementError) -> Self
source§impl From<ExecuteTransactionError> for Error
impl From<ExecuteTransactionError> for Error
source§fn from(err: ExecuteTransactionError) -> Self
fn from(err: ExecuteTransactionError) -> Self
source§impl From<ExportTableToPointInTimeError> for Error
impl From<ExportTableToPointInTimeError> for Error
source§fn from(err: ExportTableToPointInTimeError) -> Self
fn from(err: ExportTableToPointInTimeError) -> Self
source§impl From<GetItemError> for Error
impl From<GetItemError> for Error
source§fn from(err: GetItemError) -> Self
fn from(err: GetItemError) -> 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<ImportTableError> for Error
impl From<ImportTableError> for Error
source§fn from(err: ImportTableError) -> Self
fn from(err: ImportTableError) -> Self
source§impl From<ListBackupsError> for Error
impl From<ListBackupsError> for Error
source§fn from(err: ListBackupsError) -> Self
fn from(err: ListBackupsError) -> Self
source§impl From<ListContributorInsightsError> for Error
impl From<ListContributorInsightsError> for Error
source§fn from(err: ListContributorInsightsError) -> Self
fn from(err: ListContributorInsightsError) -> Self
source§impl From<ListExportsError> for Error
impl From<ListExportsError> for Error
source§fn from(err: ListExportsError) -> Self
fn from(err: ListExportsError) -> Self
source§impl From<ListGlobalTablesError> for Error
impl From<ListGlobalTablesError> for Error
source§fn from(err: ListGlobalTablesError) -> Self
fn from(err: ListGlobalTablesError) -> Self
source§impl From<ListImportsError> for Error
impl From<ListImportsError> for Error
source§fn from(err: ListImportsError) -> Self
fn from(err: ListImportsError) -> Self
source§impl From<ListTablesError> for Error
impl From<ListTablesError> for Error
source§fn from(err: ListTablesError) -> Self
fn from(err: ListTablesError) -> Self
source§impl From<ListTagsOfResourceError> for Error
impl From<ListTagsOfResourceError> for Error
source§fn from(err: ListTagsOfResourceError) -> Self
fn from(err: ListTagsOfResourceError) -> Self
source§impl From<PutItemError> for Error
impl From<PutItemError> for Error
source§fn from(err: PutItemError) -> Self
fn from(err: PutItemError) -> 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<QueryError> for Error
impl From<QueryError> for Error
source§fn from(err: QueryError) -> Self
fn from(err: QueryError) -> Self
source§impl From<RestoreTableFromBackupError> for Error
impl From<RestoreTableFromBackupError> for Error
source§fn from(err: RestoreTableFromBackupError) -> Self
fn from(err: RestoreTableFromBackupError) -> Self
source§impl From<RestoreTableToPointInTimeError> for Error
impl From<RestoreTableToPointInTimeError> for Error
source§fn from(err: RestoreTableToPointInTimeError) -> Self
fn from(err: RestoreTableToPointInTimeError) -> Self
source§impl<R> From<SdkError<BatchExecuteStatementError, R>> for Error
impl<R> From<SdkError<BatchExecuteStatementError, R>> for Error
source§fn from(err: SdkError<BatchExecuteStatementError, R>) -> Self
fn from(err: SdkError<BatchExecuteStatementError, R>) -> Self
source§impl<R> From<SdkError<BatchGetItemError, R>> for Error
impl<R> From<SdkError<BatchGetItemError, R>> for Error
source§fn from(err: SdkError<BatchGetItemError, R>) -> Self
fn from(err: SdkError<BatchGetItemError, R>) -> Self
source§impl<R> From<SdkError<BatchWriteItemError, R>> for Error
impl<R> From<SdkError<BatchWriteItemError, R>> for Error
source§fn from(err: SdkError<BatchWriteItemError, R>) -> Self
fn from(err: SdkError<BatchWriteItemError, R>) -> Self
source§impl<R> From<SdkError<CreateBackupError, R>> for Error
impl<R> From<SdkError<CreateBackupError, R>> for Error
source§fn from(err: SdkError<CreateBackupError, R>) -> Self
fn from(err: SdkError<CreateBackupError, R>) -> Self
source§impl<R> From<SdkError<CreateGlobalTableError, R>> for Error
impl<R> From<SdkError<CreateGlobalTableError, R>> for Error
source§fn from(err: SdkError<CreateGlobalTableError, R>) -> Self
fn from(err: SdkError<CreateGlobalTableError, R>) -> Self
source§impl<R> From<SdkError<CreateTableError, R>> for Error
impl<R> From<SdkError<CreateTableError, R>> for Error
source§fn from(err: SdkError<CreateTableError, R>) -> Self
fn from(err: SdkError<CreateTableError, R>) -> Self
source§impl<R> From<SdkError<DeleteBackupError, R>> for Error
impl<R> From<SdkError<DeleteBackupError, R>> for Error
source§fn from(err: SdkError<DeleteBackupError, R>) -> Self
fn from(err: SdkError<DeleteBackupError, R>) -> Self
source§impl<R> From<SdkError<DeleteItemError, R>> for Error
impl<R> From<SdkError<DeleteItemError, R>> for Error
source§fn from(err: SdkError<DeleteItemError, R>) -> Self
fn from(err: SdkError<DeleteItemError, 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<DeleteTableError, R>> for Error
impl<R> From<SdkError<DeleteTableError, R>> for Error
source§fn from(err: SdkError<DeleteTableError, R>) -> Self
fn from(err: SdkError<DeleteTableError, R>) -> Self
source§impl<R> From<SdkError<DescribeBackupError, R>> for Error
impl<R> From<SdkError<DescribeBackupError, R>> for Error
source§fn from(err: SdkError<DescribeBackupError, R>) -> Self
fn from(err: SdkError<DescribeBackupError, R>) -> Self
source§impl<R> From<SdkError<DescribeContinuousBackupsError, R>> for Error
impl<R> From<SdkError<DescribeContinuousBackupsError, R>> for Error
source§fn from(err: SdkError<DescribeContinuousBackupsError, R>) -> Self
fn from(err: SdkError<DescribeContinuousBackupsError, R>) -> Self
source§impl<R> From<SdkError<DescribeContributorInsightsError, R>> for Error
impl<R> From<SdkError<DescribeContributorInsightsError, R>> for Error
source§fn from(err: SdkError<DescribeContributorInsightsError, R>) -> Self
fn from(err: SdkError<DescribeContributorInsightsError, R>) -> Self
source§impl<R> From<SdkError<DescribeEndpointsError, R>> for Error
impl<R> From<SdkError<DescribeEndpointsError, R>> for Error
source§fn from(err: SdkError<DescribeEndpointsError, R>) -> Self
fn from(err: SdkError<DescribeEndpointsError, R>) -> Self
source§impl<R> From<SdkError<DescribeExportError, R>> for Error
impl<R> From<SdkError<DescribeExportError, R>> for Error
source§fn from(err: SdkError<DescribeExportError, R>) -> Self
fn from(err: SdkError<DescribeExportError, R>) -> Self
source§impl<R> From<SdkError<DescribeGlobalTableError, R>> for Error
impl<R> From<SdkError<DescribeGlobalTableError, R>> for Error
source§fn from(err: SdkError<DescribeGlobalTableError, R>) -> Self
fn from(err: SdkError<DescribeGlobalTableError, R>) -> Self
source§impl<R> From<SdkError<DescribeGlobalTableSettingsError, R>> for Error
impl<R> From<SdkError<DescribeGlobalTableSettingsError, R>> for Error
source§fn from(err: SdkError<DescribeGlobalTableSettingsError, R>) -> Self
fn from(err: SdkError<DescribeGlobalTableSettingsError, R>) -> Self
source§impl<R> From<SdkError<DescribeImportError, R>> for Error
impl<R> From<SdkError<DescribeImportError, R>> for Error
source§fn from(err: SdkError<DescribeImportError, R>) -> Self
fn from(err: SdkError<DescribeImportError, R>) -> Self
source§impl<R> From<SdkError<DescribeKinesisStreamingDestinationError, R>> for Error
impl<R> From<SdkError<DescribeKinesisStreamingDestinationError, R>> for Error
source§fn from(err: SdkError<DescribeKinesisStreamingDestinationError, R>) -> Self
fn from(err: SdkError<DescribeKinesisStreamingDestinationError, R>) -> Self
source§impl<R> From<SdkError<DescribeLimitsError, R>> for Error
impl<R> From<SdkError<DescribeLimitsError, R>> for Error
source§fn from(err: SdkError<DescribeLimitsError, R>) -> Self
fn from(err: SdkError<DescribeLimitsError, R>) -> Self
source§impl<R> From<SdkError<DescribeTableError, R>> for Error
impl<R> From<SdkError<DescribeTableError, R>> for Error
source§fn from(err: SdkError<DescribeTableError, R>) -> Self
fn from(err: SdkError<DescribeTableError, R>) -> Self
source§impl<R> From<SdkError<DescribeTableReplicaAutoScalingError, R>> for Error
impl<R> From<SdkError<DescribeTableReplicaAutoScalingError, R>> for Error
source§fn from(err: SdkError<DescribeTableReplicaAutoScalingError, R>) -> Self
fn from(err: SdkError<DescribeTableReplicaAutoScalingError, R>) -> Self
source§impl<R> From<SdkError<DescribeTimeToLiveError, R>> for Error
impl<R> From<SdkError<DescribeTimeToLiveError, R>> for Error
source§fn from(err: SdkError<DescribeTimeToLiveError, R>) -> Self
fn from(err: SdkError<DescribeTimeToLiveError, R>) -> Self
source§impl<R> From<SdkError<DisableKinesisStreamingDestinationError, R>> for Error
impl<R> From<SdkError<DisableKinesisStreamingDestinationError, R>> for Error
source§fn from(err: SdkError<DisableKinesisStreamingDestinationError, R>) -> Self
fn from(err: SdkError<DisableKinesisStreamingDestinationError, R>) -> Self
source§impl<R> From<SdkError<EnableKinesisStreamingDestinationError, R>> for Error
impl<R> From<SdkError<EnableKinesisStreamingDestinationError, R>> for Error
source§fn from(err: SdkError<EnableKinesisStreamingDestinationError, R>) -> Self
fn from(err: SdkError<EnableKinesisStreamingDestinationError, R>) -> Self
source§impl<R> From<SdkError<ExecuteStatementError, R>> for Error
impl<R> From<SdkError<ExecuteStatementError, R>> for Error
source§fn from(err: SdkError<ExecuteStatementError, R>) -> Self
fn from(err: SdkError<ExecuteStatementError, R>) -> Self
source§impl<R> From<SdkError<ExecuteTransactionError, R>> for Error
impl<R> From<SdkError<ExecuteTransactionError, R>> for Error
source§fn from(err: SdkError<ExecuteTransactionError, R>) -> Self
fn from(err: SdkError<ExecuteTransactionError, R>) -> Self
source§impl<R> From<SdkError<ExportTableToPointInTimeError, R>> for Error
impl<R> From<SdkError<ExportTableToPointInTimeError, R>> for Error
source§fn from(err: SdkError<ExportTableToPointInTimeError, R>) -> Self
fn from(err: SdkError<ExportTableToPointInTimeError, R>) -> Self
source§impl<R> From<SdkError<GetItemError, R>> for Error
impl<R> From<SdkError<GetItemError, R>> for Error
source§fn from(err: SdkError<GetItemError, R>) -> Self
fn from(err: SdkError<GetItemError, 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<ImportTableError, R>> for Error
impl<R> From<SdkError<ImportTableError, R>> for Error
source§fn from(err: SdkError<ImportTableError, R>) -> Self
fn from(err: SdkError<ImportTableError, R>) -> Self
source§impl<R> From<SdkError<ListBackupsError, R>> for Error
impl<R> From<SdkError<ListBackupsError, R>> for Error
source§fn from(err: SdkError<ListBackupsError, R>) -> Self
fn from(err: SdkError<ListBackupsError, R>) -> Self
source§impl<R> From<SdkError<ListContributorInsightsError, R>> for Error
impl<R> From<SdkError<ListContributorInsightsError, R>> for Error
source§fn from(err: SdkError<ListContributorInsightsError, R>) -> Self
fn from(err: SdkError<ListContributorInsightsError, R>) -> Self
source§impl<R> From<SdkError<ListExportsError, R>> for Error
impl<R> From<SdkError<ListExportsError, R>> for Error
source§fn from(err: SdkError<ListExportsError, R>) -> Self
fn from(err: SdkError<ListExportsError, R>) -> Self
source§impl<R> From<SdkError<ListGlobalTablesError, R>> for Error
impl<R> From<SdkError<ListGlobalTablesError, R>> for Error
source§fn from(err: SdkError<ListGlobalTablesError, R>) -> Self
fn from(err: SdkError<ListGlobalTablesError, R>) -> Self
source§impl<R> From<SdkError<ListImportsError, R>> for Error
impl<R> From<SdkError<ListImportsError, R>> for Error
source§fn from(err: SdkError<ListImportsError, R>) -> Self
fn from(err: SdkError<ListImportsError, R>) -> Self
source§impl<R> From<SdkError<ListTablesError, R>> for Error
impl<R> From<SdkError<ListTablesError, R>> for Error
source§fn from(err: SdkError<ListTablesError, R>) -> Self
fn from(err: SdkError<ListTablesError, R>) -> Self
source§impl<R> From<SdkError<ListTagsOfResourceError, R>> for Error
impl<R> From<SdkError<ListTagsOfResourceError, R>> for Error
source§fn from(err: SdkError<ListTagsOfResourceError, R>) -> Self
fn from(err: SdkError<ListTagsOfResourceError, R>) -> Self
source§impl<R> From<SdkError<PutItemError, R>> for Error
impl<R> From<SdkError<PutItemError, R>> for Error
source§fn from(err: SdkError<PutItemError, R>) -> Self
fn from(err: SdkError<PutItemError, 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<QueryError, R>> for Error
impl<R> From<SdkError<QueryError, R>> for Error
source§fn from(err: SdkError<QueryError, R>) -> Self
fn from(err: SdkError<QueryError, R>) -> Self
source§impl<R> From<SdkError<RestoreTableFromBackupError, R>> for Error
impl<R> From<SdkError<RestoreTableFromBackupError, R>> for Error
source§fn from(err: SdkError<RestoreTableFromBackupError, R>) -> Self
fn from(err: SdkError<RestoreTableFromBackupError, R>) -> Self
source§impl<R> From<SdkError<RestoreTableToPointInTimeError, R>> for Error
impl<R> From<SdkError<RestoreTableToPointInTimeError, R>> for Error
source§fn from(err: SdkError<RestoreTableToPointInTimeError, R>) -> Self
fn from(err: SdkError<RestoreTableToPointInTimeError, 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<TransactGetItemsError, R>> for Error
impl<R> From<SdkError<TransactGetItemsError, R>> for Error
source§fn from(err: SdkError<TransactGetItemsError, R>) -> Self
fn from(err: SdkError<TransactGetItemsError, R>) -> Self
source§impl<R> From<SdkError<TransactWriteItemsError, R>> for Error
impl<R> From<SdkError<TransactWriteItemsError, R>> for Error
source§fn from(err: SdkError<TransactWriteItemsError, R>) -> Self
fn from(err: SdkError<TransactWriteItemsError, 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<UpdateContinuousBackupsError, R>> for Error
impl<R> From<SdkError<UpdateContinuousBackupsError, R>> for Error
source§fn from(err: SdkError<UpdateContinuousBackupsError, R>) -> Self
fn from(err: SdkError<UpdateContinuousBackupsError, R>) -> Self
source§impl<R> From<SdkError<UpdateContributorInsightsError, R>> for Error
impl<R> From<SdkError<UpdateContributorInsightsError, R>> for Error
source§fn from(err: SdkError<UpdateContributorInsightsError, R>) -> Self
fn from(err: SdkError<UpdateContributorInsightsError, R>) -> Self
source§impl<R> From<SdkError<UpdateGlobalTableError, R>> for Error
impl<R> From<SdkError<UpdateGlobalTableError, R>> for Error
source§fn from(err: SdkError<UpdateGlobalTableError, R>) -> Self
fn from(err: SdkError<UpdateGlobalTableError, R>) -> Self
source§impl<R> From<SdkError<UpdateGlobalTableSettingsError, R>> for Error
impl<R> From<SdkError<UpdateGlobalTableSettingsError, R>> for Error
source§fn from(err: SdkError<UpdateGlobalTableSettingsError, R>) -> Self
fn from(err: SdkError<UpdateGlobalTableSettingsError, R>) -> Self
source§impl<R> From<SdkError<UpdateItemError, R>> for Error
impl<R> From<SdkError<UpdateItemError, R>> for Error
source§fn from(err: SdkError<UpdateItemError, R>) -> Self
fn from(err: SdkError<UpdateItemError, R>) -> Self
source§impl<R> From<SdkError<UpdateKinesisStreamingDestinationError, R>> for Error
impl<R> From<SdkError<UpdateKinesisStreamingDestinationError, R>> for Error
source§fn from(err: SdkError<UpdateKinesisStreamingDestinationError, R>) -> Self
fn from(err: SdkError<UpdateKinesisStreamingDestinationError, R>) -> Self
source§impl<R> From<SdkError<UpdateTableError, R>> for Error
impl<R> From<SdkError<UpdateTableError, R>> for Error
source§fn from(err: SdkError<UpdateTableError, R>) -> Self
fn from(err: SdkError<UpdateTableError, R>) -> Self
source§impl<R> From<SdkError<UpdateTableReplicaAutoScalingError, R>> for Error
impl<R> From<SdkError<UpdateTableReplicaAutoScalingError, R>> for Error
source§fn from(err: SdkError<UpdateTableReplicaAutoScalingError, R>) -> Self
fn from(err: SdkError<UpdateTableReplicaAutoScalingError, R>) -> Self
source§impl<R> From<SdkError<UpdateTimeToLiveError, R>> for Error
impl<R> From<SdkError<UpdateTimeToLiveError, R>> for Error
source§fn from(err: SdkError<UpdateTimeToLiveError, R>) -> Self
fn from(err: SdkError<UpdateTimeToLiveError, 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<TransactGetItemsError> for Error
impl From<TransactGetItemsError> for Error
source§fn from(err: TransactGetItemsError) -> Self
fn from(err: TransactGetItemsError) -> Self
source§impl From<TransactWriteItemsError> for Error
impl From<TransactWriteItemsError> for Error
source§fn from(err: TransactWriteItemsError) -> Self
fn from(err: TransactWriteItemsError) -> 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<UpdateContinuousBackupsError> for Error
impl From<UpdateContinuousBackupsError> for Error
source§fn from(err: UpdateContinuousBackupsError) -> Self
fn from(err: UpdateContinuousBackupsError) -> Self
source§impl From<UpdateContributorInsightsError> for Error
impl From<UpdateContributorInsightsError> for Error
source§fn from(err: UpdateContributorInsightsError) -> Self
fn from(err: UpdateContributorInsightsError) -> Self
source§impl From<UpdateGlobalTableError> for Error
impl From<UpdateGlobalTableError> for Error
source§fn from(err: UpdateGlobalTableError) -> Self
fn from(err: UpdateGlobalTableError) -> Self
source§impl From<UpdateGlobalTableSettingsError> for Error
impl From<UpdateGlobalTableSettingsError> for Error
source§fn from(err: UpdateGlobalTableSettingsError) -> Self
fn from(err: UpdateGlobalTableSettingsError) -> Self
source§impl From<UpdateItemError> for Error
impl From<UpdateItemError> for Error
source§fn from(err: UpdateItemError) -> Self
fn from(err: UpdateItemError) -> Self
source§impl From<UpdateKinesisStreamingDestinationError> for Error
impl From<UpdateKinesisStreamingDestinationError> for Error
source§fn from(err: UpdateKinesisStreamingDestinationError) -> Self
fn from(err: UpdateKinesisStreamingDestinationError) -> Self
source§impl From<UpdateTableError> for Error
impl From<UpdateTableError> for Error
source§fn from(err: UpdateTableError) -> Self
fn from(err: UpdateTableError) -> Self
source§impl From<UpdateTableReplicaAutoScalingError> for Error
impl From<UpdateTableReplicaAutoScalingError> for Error
source§fn from(err: UpdateTableReplicaAutoScalingError) -> Self
fn from(err: UpdateTableReplicaAutoScalingError) -> Self
source§impl From<UpdateTimeToLiveError> for Error
impl From<UpdateTimeToLiveError> for Error
source§fn from(err: UpdateTimeToLiveError) -> Self
fn from(err: UpdateTimeToLiveError) -> 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 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§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();
§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§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();
§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§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();
§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§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();
§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.§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);