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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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.

§

ContinuousBackupsUnavailableException(ContinuousBackupsUnavailableException)

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.

§

PointInTimeRecoveryUnavailableException(PointInTimeRecoveryUnavailableException)

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 concurrent TransactWriteItems request. In this case the TransactWriteItems operation fails with a TransactionCanceledException.

DynamoDB cancels a TransactGetItems request under the following circumstances:

  • There is an ongoing TransactGetItems operation that conflicts with a concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. In this case the TransactGetItems operation fails with a TransactionCanceledException.

  • 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 the TransactWriteItems operation.

  • Set socketTimeout to a value a little lower than the requestTimeout 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 and TransactionInProgressException 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)

👎Deprecated: 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 Debug for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Error

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for Error

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl From<BatchExecuteStatementError> for Error

source§

fn from(err: BatchExecuteStatementError) -> Self

Converts to this type from the input type.
source§

impl From<BatchGetItemError> for Error

source§

fn from(err: BatchGetItemError) -> Self

Converts to this type from the input type.
source§

impl From<BatchWriteItemError> for Error

source§

fn from(err: BatchWriteItemError) -> Self

Converts to this type from the input type.
source§

impl From<BuildError> for Error

source§

fn from(value: BuildError) -> Self

Converts to this type from the input type.
source§

impl From<CreateBackupError> for Error

source§

fn from(err: CreateBackupError) -> Self

Converts to this type from the input type.
source§

impl From<CreateGlobalTableError> for Error

source§

fn from(err: CreateGlobalTableError) -> Self

Converts to this type from the input type.
source§

impl From<CreateTableError> for Error

source§

fn from(err: CreateTableError) -> Self

Converts to this type from the input type.
source§

impl From<DeleteBackupError> for Error

source§

fn from(err: DeleteBackupError) -> Self

Converts to this type from the input type.
source§

impl From<DeleteItemError> for Error

source§

fn from(err: DeleteItemError) -> Self

Converts to this type from the input type.
source§

impl From<DeleteResourcePolicyError> for Error

source§

fn from(err: DeleteResourcePolicyError) -> Self

Converts to this type from the input type.
source§

impl From<DeleteTableError> for Error

source§

fn from(err: DeleteTableError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeBackupError> for Error

source§

fn from(err: DescribeBackupError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeContinuousBackupsError> for Error

source§

fn from(err: DescribeContinuousBackupsError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeContributorInsightsError> for Error

source§

fn from(err: DescribeContributorInsightsError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeEndpointsError> for Error

source§

fn from(err: DescribeEndpointsError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeExportError> for Error

source§

fn from(err: DescribeExportError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeGlobalTableError> for Error

source§

fn from(err: DescribeGlobalTableError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeGlobalTableSettingsError> for Error

source§

fn from(err: DescribeGlobalTableSettingsError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeImportError> for Error

source§

fn from(err: DescribeImportError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeKinesisStreamingDestinationError> for Error

source§

fn from(err: DescribeKinesisStreamingDestinationError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeLimitsError> for Error

source§

fn from(err: DescribeLimitsError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeTableError> for Error

source§

fn from(err: DescribeTableError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeTableReplicaAutoScalingError> for Error

source§

fn from(err: DescribeTableReplicaAutoScalingError) -> Self

Converts to this type from the input type.
source§

impl From<DescribeTimeToLiveError> for Error

source§

fn from(err: DescribeTimeToLiveError) -> Self

Converts to this type from the input type.
source§

impl From<DisableKinesisStreamingDestinationError> for Error

source§

fn from(err: DisableKinesisStreamingDestinationError) -> Self

Converts to this type from the input type.
source§

impl From<EnableKinesisStreamingDestinationError> for Error

source§

fn from(err: EnableKinesisStreamingDestinationError) -> Self

Converts to this type from the input type.
source§

impl From<ExecuteStatementError> for Error

source§

fn from(err: ExecuteStatementError) -> Self

Converts to this type from the input type.
source§

impl From<ExecuteTransactionError> for Error

source§

fn from(err: ExecuteTransactionError) -> Self

Converts to this type from the input type.
source§

impl From<ExportTableToPointInTimeError> for Error

source§

fn from(err: ExportTableToPointInTimeError) -> Self

Converts to this type from the input type.
source§

impl From<GetItemError> for Error

source§

fn from(err: GetItemError) -> Self

Converts to this type from the input type.
source§

impl From<GetResourcePolicyError> for Error

source§

fn from(err: GetResourcePolicyError) -> Self

Converts to this type from the input type.
source§

impl From<ImportTableError> for Error

source§

fn from(err: ImportTableError) -> Self

Converts to this type from the input type.
source§

impl From<ListBackupsError> for Error

source§

fn from(err: ListBackupsError) -> Self

Converts to this type from the input type.
source§

impl From<ListContributorInsightsError> for Error

source§

fn from(err: ListContributorInsightsError) -> Self

Converts to this type from the input type.
source§

impl From<ListExportsError> for Error

source§

fn from(err: ListExportsError) -> Self

Converts to this type from the input type.
source§

impl From<ListGlobalTablesError> for Error

source§

fn from(err: ListGlobalTablesError) -> Self

Converts to this type from the input type.
source§

impl From<ListImportsError> for Error

source§

fn from(err: ListImportsError) -> Self

Converts to this type from the input type.
source§

impl From<ListTablesError> for Error

source§

fn from(err: ListTablesError) -> Self

Converts to this type from the input type.
source§

impl From<ListTagsOfResourceError> for Error

source§

fn from(err: ListTagsOfResourceError) -> Self

Converts to this type from the input type.
source§

impl From<PutItemError> for Error

source§

fn from(err: PutItemError) -> Self

Converts to this type from the input type.
source§

impl From<PutResourcePolicyError> for Error

source§

fn from(err: PutResourcePolicyError) -> Self

Converts to this type from the input type.
source§

impl From<QueryError> for Error

source§

fn from(err: QueryError) -> Self

Converts to this type from the input type.
source§

impl From<RestoreTableFromBackupError> for Error

source§

fn from(err: RestoreTableFromBackupError) -> Self

Converts to this type from the input type.
source§

impl From<RestoreTableToPointInTimeError> for Error

source§

fn from(err: RestoreTableToPointInTimeError) -> Self

Converts to this type from the input type.
source§

impl From<ScanError> for Error

source§

fn from(err: ScanError) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<BatchExecuteStatementError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<BatchExecuteStatementError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<BatchGetItemError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<BatchGetItemError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<BatchWriteItemError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<BatchWriteItemError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<CreateBackupError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<CreateBackupError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<CreateGlobalTableError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<CreateGlobalTableError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<CreateTableError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<CreateTableError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DeleteBackupError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DeleteBackupError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DeleteItemError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DeleteItemError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DeleteResourcePolicyError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DeleteResourcePolicyError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DeleteTableError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DeleteTableError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeBackupError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeBackupError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeContinuousBackupsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeContinuousBackupsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeContributorInsightsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeContributorInsightsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeEndpointsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeEndpointsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeExportError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeExportError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeGlobalTableError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeGlobalTableError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeGlobalTableSettingsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeGlobalTableSettingsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeImportError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeImportError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeKinesisStreamingDestinationError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeKinesisStreamingDestinationError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeLimitsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeLimitsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeTableError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeTableError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeTableReplicaAutoScalingError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeTableReplicaAutoScalingError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DescribeTimeToLiveError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DescribeTimeToLiveError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<DisableKinesisStreamingDestinationError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<DisableKinesisStreamingDestinationError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<EnableKinesisStreamingDestinationError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<EnableKinesisStreamingDestinationError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ExecuteStatementError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ExecuteStatementError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ExecuteTransactionError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ExecuteTransactionError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ExportTableToPointInTimeError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ExportTableToPointInTimeError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<GetItemError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<GetItemError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<GetResourcePolicyError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<GetResourcePolicyError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ImportTableError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ImportTableError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ListBackupsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ListBackupsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ListContributorInsightsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ListContributorInsightsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ListExportsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ListExportsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ListGlobalTablesError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ListGlobalTablesError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ListImportsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ListImportsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ListTablesError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ListTablesError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ListTagsOfResourceError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ListTagsOfResourceError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<PutItemError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<PutItemError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<PutResourcePolicyError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<PutResourcePolicyError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<QueryError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<QueryError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<RestoreTableFromBackupError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<RestoreTableFromBackupError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<RestoreTableToPointInTimeError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<RestoreTableToPointInTimeError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<ScanError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<ScanError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<TagResourceError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<TagResourceError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<TransactGetItemsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<TransactGetItemsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<TransactWriteItemsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<TransactWriteItemsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UntagResourceError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UntagResourceError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateContinuousBackupsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateContinuousBackupsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateContributorInsightsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateContributorInsightsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateGlobalTableError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateGlobalTableError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateGlobalTableSettingsError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateGlobalTableSettingsError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateItemError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateItemError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateKinesisStreamingDestinationError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateKinesisStreamingDestinationError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateTableError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateTableError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateTableReplicaAutoScalingError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateTableReplicaAutoScalingError, R>) -> Self

Converts to this type from the input type.
source§

impl<R> From<SdkError<UpdateTimeToLiveError, R>> for Error
where R: Send + Sync + Debug + 'static,

source§

fn from(err: SdkError<UpdateTimeToLiveError, R>) -> Self

Converts to this type from the input type.
source§

impl From<TagResourceError> for Error

source§

fn from(err: TagResourceError) -> Self

Converts to this type from the input type.
source§

impl From<TransactGetItemsError> for Error

source§

fn from(err: TransactGetItemsError) -> Self

Converts to this type from the input type.
source§

impl From<TransactWriteItemsError> for Error

source§

fn from(err: TransactWriteItemsError) -> Self

Converts to this type from the input type.
source§

impl From<UntagResourceError> for Error

source§

fn from(err: UntagResourceError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateContinuousBackupsError> for Error

source§

fn from(err: UpdateContinuousBackupsError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateContributorInsightsError> for Error

source§

fn from(err: UpdateContributorInsightsError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateGlobalTableError> for Error

source§

fn from(err: UpdateGlobalTableError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateGlobalTableSettingsError> for Error

source§

fn from(err: UpdateGlobalTableSettingsError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateItemError> for Error

source§

fn from(err: UpdateItemError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateKinesisStreamingDestinationError> for Error

source§

fn from(err: UpdateKinesisStreamingDestinationError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateTableError> for Error

source§

fn from(err: UpdateTableError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateTableReplicaAutoScalingError> for Error

source§

fn from(err: UpdateTableReplicaAutoScalingError) -> Self

Converts to this type from the input type.
source§

impl From<UpdateTimeToLiveError> for Error

source§

fn from(err: UpdateTimeToLiveError) -> Self

Converts to this type from the input type.
source§

impl<O, E> From<WaiterError<O, E>> for Error
where O: Debug + Send + Sync + 'static, E: Error + Send + Sync + 'static,

source§

fn from(err: WaiterError<O, E>) -> Self

Converts to this type from the input type.
source§

impl ProvideErrorMetadata for Error

source§

fn meta(&self) -> &ErrorMetadata

Returns error metadata, which includes the error code, message, request ID, and potentially additional information.
source§

fn code(&self) -> Option<&str>

Returns the error code if it’s available.
source§

fn message(&self) -> Option<&str>

Returns the error message, if there is one.
source§

impl RequestId for Error

source§

fn request_id(&self) -> Option<&str>

Returns the request ID, or None if the service could not be reached.

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> Paint for T
where T: ?Sized,

§

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 primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Primary].

§Example
println!("{}", value.primary());
§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color::Fixed].

§Example
println!("{}", value.fixed(color));
§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color::Rgb].

§Example
println!("{}", value.rgb(r, g, b));
§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Black].

§Example
println!("{}", value.black());
§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Red].

§Example
println!("{}", value.red());
§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Green].

§Example
println!("{}", value.green());
§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Yellow].

§Example
println!("{}", value.yellow());
§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Blue].

§Example
println!("{}", value.blue());
§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Magenta].

§Example
println!("{}", value.magenta());
§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Cyan].

§Example
println!("{}", value.cyan());
§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color::White].

§Example
println!("{}", value.white());
§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightBlack].

§Example
println!("{}", value.bright_black());
§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightRed].

§Example
println!("{}", value.bright_red());
§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightGreen].

§Example
println!("{}", value.bright_green());
§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightYellow].

§Example
println!("{}", value.bright_yellow());
§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightBlue].

§Example
println!("{}", value.bright_blue());
§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightMagenta].

§Example
println!("{}", value.bright_magenta());
§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightCyan].

§Example
println!("{}", value.bright_cyan());
§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightWhite].

§Example
println!("{}", value.bright_white());
§

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>

Returns self with the bg() set to [Color::Primary].

§Example
println!("{}", value.on_primary());
§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color::Fixed].

§Example
println!("{}", value.on_fixed(color));
§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color::Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Black].

§Example
println!("{}", value.on_black());
§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Red].

§Example
println!("{}", value.on_red());
§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Green].

§Example
println!("{}", value.on_green());
§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Yellow].

§Example
println!("{}", value.on_yellow());
§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Blue].

§Example
println!("{}", value.on_blue());
§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Magenta].

§Example
println!("{}", value.on_magenta());
§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Cyan].

§Example
println!("{}", value.on_cyan());
§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color::White].

§Example
println!("{}", value.on_white());
§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightBlack].

§Example
println!("{}", value.on_bright_black());
§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightRed].

§Example
println!("{}", value.on_bright_red());
§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightGreen].

§Example
println!("{}", value.on_bright_green());
§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightBlue].

§Example
println!("{}", value.on_bright_blue());
§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightWhite].

§Example
println!("{}", value.on_bright_white());
§

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 bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Bold].

§Example
println!("{}", value.bold());
§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Dim].

§Example
println!("{}", value.dim());
§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Italic].

§Example
println!("{}", value.italic());
§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute::Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute::RapidBlink].

§Example
println!("{}", value.rapid_blink());
§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Invert].

§Example
println!("{}", value.invert());
§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Conceal].

§Example
println!("{}", value.conceal());
§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Strike].

§Example
println!("{}", value.strike());
§

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 mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Mask].

§Example
println!("{}", value.mask());
§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Wrap].

§Example
println!("{}", value.wrap());
§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Linger].

§Example
println!("{}", value.linger());
§

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.

Returns self with the quirk() set to [Quirk::Clear].

§Example
println!("{}", value.clear());
§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Resetting].

§Example
println!("{}", value.resetting());
§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Bright].

§Example
println!("{}", value.bright());
§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::OnBright].

§Example
println!("{}", value.on_bright());
§

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);
§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new [Painted] with a default [Style]. Read more
§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more