#[non_exhaustive]pub enum Error {
AccessDeniedException(AccessDeniedException),
BadRequestException(BadRequestException),
ConflictException(ConflictException),
InternalFailureException(InternalFailureException),
LimitExceededException(LimitExceededException),
NotFoundException(NotFoundException),
PreconditionFailedException(PreconditionFailedException),
ResourceInUseException(ResourceInUseException),
Unhandled(Unhandled),
}Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessDeniedException(AccessDeniedException)
Your IAM user or role does not have permission to call the Amazon Lex V2 APIs required to migrate your bot.
BadRequestException(BadRequestException)
The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.
ConflictException(ConflictException)
There was a conflict processing the request. Try your request again.
InternalFailureException(InternalFailureException)
An internal Amazon Lex error occurred. Try your request again.
LimitExceededException(LimitExceededException)
The request exceeded a limit. Try your request again.
NotFoundException(NotFoundException)
The resource specified in the request was not found. Check the resource and try again.
PreconditionFailedException(PreconditionFailedException)
The checksum of the resource that you are trying to change does not match the checksum in the request. Check the resource's checksum and try again.
ResourceInUseException(ResourceInUseException)
The resource that you are attempting to delete is referred to by another resource. Use this information to remove references to the resource that you are trying to delete.
The body of the exception contains a JSON object that describes the resource.
{ "resourceType": BOT | BOTALIAS | BOTCHANNEL | INTENT,
"resourceReference": {
"name": string, "version": string } }
Unhandled(Unhandled)
Unhandled directly is not forwards compatible. Instead, match using a variable wildcard pattern and check .code():
err if err.code() == Some("SpecificExceptionCode") => { /* handle the error */ }
See ProvideErrorMetadata for what information is available for the error.An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<BuildError> for Error
impl From<BuildError> for Error
Source§fn from(value: BuildError) -> Self
fn from(value: BuildError) -> Self
Source§impl From<CreateBotVersionError> for Error
impl From<CreateBotVersionError> for Error
Source§fn from(err: CreateBotVersionError) -> Self
fn from(err: CreateBotVersionError) -> Self
Source§impl From<CreateIntentVersionError> for Error
impl From<CreateIntentVersionError> for Error
Source§fn from(err: CreateIntentVersionError) -> Self
fn from(err: CreateIntentVersionError) -> Self
Source§impl From<CreateSlotTypeVersionError> for Error
impl From<CreateSlotTypeVersionError> for Error
Source§fn from(err: CreateSlotTypeVersionError) -> Self
fn from(err: CreateSlotTypeVersionError) -> Self
Source§impl From<DeleteBotAliasError> for Error
impl From<DeleteBotAliasError> for Error
Source§fn from(err: DeleteBotAliasError) -> Self
fn from(err: DeleteBotAliasError) -> Self
Source§impl From<DeleteBotChannelAssociationError> for Error
impl From<DeleteBotChannelAssociationError> for Error
Source§fn from(err: DeleteBotChannelAssociationError) -> Self
fn from(err: DeleteBotChannelAssociationError) -> Self
Source§impl From<DeleteBotError> for Error
impl From<DeleteBotError> for Error
Source§fn from(err: DeleteBotError) -> Self
fn from(err: DeleteBotError) -> Self
Source§impl From<DeleteBotVersionError> for Error
impl From<DeleteBotVersionError> for Error
Source§fn from(err: DeleteBotVersionError) -> Self
fn from(err: DeleteBotVersionError) -> Self
Source§impl From<DeleteIntentError> for Error
impl From<DeleteIntentError> for Error
Source§fn from(err: DeleteIntentError) -> Self
fn from(err: DeleteIntentError) -> Self
Source§impl From<DeleteIntentVersionError> for Error
impl From<DeleteIntentVersionError> for Error
Source§fn from(err: DeleteIntentVersionError) -> Self
fn from(err: DeleteIntentVersionError) -> Self
Source§impl From<DeleteSlotTypeError> for Error
impl From<DeleteSlotTypeError> for Error
Source§fn from(err: DeleteSlotTypeError) -> Self
fn from(err: DeleteSlotTypeError) -> Self
Source§impl From<DeleteSlotTypeVersionError> for Error
impl From<DeleteSlotTypeVersionError> for Error
Source§fn from(err: DeleteSlotTypeVersionError) -> Self
fn from(err: DeleteSlotTypeVersionError) -> Self
Source§impl From<DeleteUtterancesError> for Error
impl From<DeleteUtterancesError> for Error
Source§fn from(err: DeleteUtterancesError) -> Self
fn from(err: DeleteUtterancesError) -> Self
Source§impl From<GetBotAliasError> for Error
impl From<GetBotAliasError> for Error
Source§fn from(err: GetBotAliasError) -> Self
fn from(err: GetBotAliasError) -> Self
Source§impl From<GetBotAliasesError> for Error
impl From<GetBotAliasesError> for Error
Source§fn from(err: GetBotAliasesError) -> Self
fn from(err: GetBotAliasesError) -> Self
Source§impl From<GetBotChannelAssociationError> for Error
impl From<GetBotChannelAssociationError> for Error
Source§fn from(err: GetBotChannelAssociationError) -> Self
fn from(err: GetBotChannelAssociationError) -> Self
Source§impl From<GetBotChannelAssociationsError> for Error
impl From<GetBotChannelAssociationsError> for Error
Source§fn from(err: GetBotChannelAssociationsError) -> Self
fn from(err: GetBotChannelAssociationsError) -> Self
Source§impl From<GetBotError> for Error
impl From<GetBotError> for Error
Source§fn from(err: GetBotError) -> Self
fn from(err: GetBotError) -> Self
Source§impl From<GetBotVersionsError> for Error
impl From<GetBotVersionsError> for Error
Source§fn from(err: GetBotVersionsError) -> Self
fn from(err: GetBotVersionsError) -> Self
Source§impl From<GetBotsError> for Error
impl From<GetBotsError> for Error
Source§fn from(err: GetBotsError) -> Self
fn from(err: GetBotsError) -> Self
Source§impl From<GetBuiltinIntentError> for Error
impl From<GetBuiltinIntentError> for Error
Source§fn from(err: GetBuiltinIntentError) -> Self
fn from(err: GetBuiltinIntentError) -> Self
Source§impl From<GetBuiltinIntentsError> for Error
impl From<GetBuiltinIntentsError> for Error
Source§fn from(err: GetBuiltinIntentsError) -> Self
fn from(err: GetBuiltinIntentsError) -> Self
Source§impl From<GetBuiltinSlotTypesError> for Error
impl From<GetBuiltinSlotTypesError> for Error
Source§fn from(err: GetBuiltinSlotTypesError) -> Self
fn from(err: GetBuiltinSlotTypesError) -> Self
Source§impl From<GetExportError> for Error
impl From<GetExportError> for Error
Source§fn from(err: GetExportError) -> Self
fn from(err: GetExportError) -> Self
Source§impl From<GetImportError> for Error
impl From<GetImportError> for Error
Source§fn from(err: GetImportError) -> Self
fn from(err: GetImportError) -> Self
Source§impl From<GetIntentError> for Error
impl From<GetIntentError> for Error
Source§fn from(err: GetIntentError) -> Self
fn from(err: GetIntentError) -> Self
Source§impl From<GetIntentVersionsError> for Error
impl From<GetIntentVersionsError> for Error
Source§fn from(err: GetIntentVersionsError) -> Self
fn from(err: GetIntentVersionsError) -> Self
Source§impl From<GetIntentsError> for Error
impl From<GetIntentsError> for Error
Source§fn from(err: GetIntentsError) -> Self
fn from(err: GetIntentsError) -> Self
Source§impl From<GetMigrationError> for Error
impl From<GetMigrationError> for Error
Source§fn from(err: GetMigrationError) -> Self
fn from(err: GetMigrationError) -> Self
Source§impl From<GetMigrationsError> for Error
impl From<GetMigrationsError> for Error
Source§fn from(err: GetMigrationsError) -> Self
fn from(err: GetMigrationsError) -> Self
Source§impl From<GetSlotTypeError> for Error
impl From<GetSlotTypeError> for Error
Source§fn from(err: GetSlotTypeError) -> Self
fn from(err: GetSlotTypeError) -> Self
Source§impl From<GetSlotTypeVersionsError> for Error
impl From<GetSlotTypeVersionsError> for Error
Source§fn from(err: GetSlotTypeVersionsError) -> Self
fn from(err: GetSlotTypeVersionsError) -> Self
Source§impl From<GetSlotTypesError> for Error
impl From<GetSlotTypesError> for Error
Source§fn from(err: GetSlotTypesError) -> Self
fn from(err: GetSlotTypesError) -> Self
Source§impl From<GetUtterancesViewError> for Error
impl From<GetUtterancesViewError> for Error
Source§fn from(err: GetUtterancesViewError) -> Self
fn from(err: GetUtterancesViewError) -> Self
Source§impl From<ListTagsForResourceError> for Error
impl From<ListTagsForResourceError> for Error
Source§fn from(err: ListTagsForResourceError) -> Self
fn from(err: ListTagsForResourceError) -> Self
Source§impl From<PutBotAliasError> for Error
impl From<PutBotAliasError> for Error
Source§fn from(err: PutBotAliasError) -> Self
fn from(err: PutBotAliasError) -> Self
Source§impl From<PutBotError> for Error
impl From<PutBotError> for Error
Source§fn from(err: PutBotError) -> Self
fn from(err: PutBotError) -> Self
Source§impl From<PutIntentError> for Error
impl From<PutIntentError> for Error
Source§fn from(err: PutIntentError) -> Self
fn from(err: PutIntentError) -> Self
Source§impl From<PutSlotTypeError> for Error
impl From<PutSlotTypeError> for Error
Source§fn from(err: PutSlotTypeError) -> Self
fn from(err: PutSlotTypeError) -> Self
Source§impl<R> From<SdkError<CreateBotVersionError, R>> for Error
impl<R> From<SdkError<CreateBotVersionError, R>> for Error
Source§fn from(err: SdkError<CreateBotVersionError, R>) -> Self
fn from(err: SdkError<CreateBotVersionError, R>) -> Self
Source§impl<R> From<SdkError<CreateIntentVersionError, R>> for Error
impl<R> From<SdkError<CreateIntentVersionError, R>> for Error
Source§fn from(err: SdkError<CreateIntentVersionError, R>) -> Self
fn from(err: SdkError<CreateIntentVersionError, R>) -> Self
Source§impl<R> From<SdkError<CreateSlotTypeVersionError, R>> for Error
impl<R> From<SdkError<CreateSlotTypeVersionError, R>> for Error
Source§fn from(err: SdkError<CreateSlotTypeVersionError, R>) -> Self
fn from(err: SdkError<CreateSlotTypeVersionError, R>) -> Self
Source§impl<R> From<SdkError<DeleteBotAliasError, R>> for Error
impl<R> From<SdkError<DeleteBotAliasError, R>> for Error
Source§fn from(err: SdkError<DeleteBotAliasError, R>) -> Self
fn from(err: SdkError<DeleteBotAliasError, R>) -> Self
Source§impl<R> From<SdkError<DeleteBotChannelAssociationError, R>> for Error
impl<R> From<SdkError<DeleteBotChannelAssociationError, R>> for Error
Source§fn from(err: SdkError<DeleteBotChannelAssociationError, R>) -> Self
fn from(err: SdkError<DeleteBotChannelAssociationError, R>) -> Self
Source§impl<R> From<SdkError<DeleteBotError, R>> for Error
impl<R> From<SdkError<DeleteBotError, R>> for Error
Source§fn from(err: SdkError<DeleteBotError, R>) -> Self
fn from(err: SdkError<DeleteBotError, R>) -> Self
Source§impl<R> From<SdkError<DeleteBotVersionError, R>> for Error
impl<R> From<SdkError<DeleteBotVersionError, R>> for Error
Source§fn from(err: SdkError<DeleteBotVersionError, R>) -> Self
fn from(err: SdkError<DeleteBotVersionError, R>) -> Self
Source§impl<R> From<SdkError<DeleteIntentError, R>> for Error
impl<R> From<SdkError<DeleteIntentError, R>> for Error
Source§fn from(err: SdkError<DeleteIntentError, R>) -> Self
fn from(err: SdkError<DeleteIntentError, R>) -> Self
Source§impl<R> From<SdkError<DeleteIntentVersionError, R>> for Error
impl<R> From<SdkError<DeleteIntentVersionError, R>> for Error
Source§fn from(err: SdkError<DeleteIntentVersionError, R>) -> Self
fn from(err: SdkError<DeleteIntentVersionError, R>) -> Self
Source§impl<R> From<SdkError<DeleteSlotTypeError, R>> for Error
impl<R> From<SdkError<DeleteSlotTypeError, R>> for Error
Source§fn from(err: SdkError<DeleteSlotTypeError, R>) -> Self
fn from(err: SdkError<DeleteSlotTypeError, R>) -> Self
Source§impl<R> From<SdkError<DeleteSlotTypeVersionError, R>> for Error
impl<R> From<SdkError<DeleteSlotTypeVersionError, R>> for Error
Source§fn from(err: SdkError<DeleteSlotTypeVersionError, R>) -> Self
fn from(err: SdkError<DeleteSlotTypeVersionError, R>) -> Self
Source§impl<R> From<SdkError<DeleteUtterancesError, R>> for Error
impl<R> From<SdkError<DeleteUtterancesError, R>> for Error
Source§fn from(err: SdkError<DeleteUtterancesError, R>) -> Self
fn from(err: SdkError<DeleteUtterancesError, R>) -> Self
Source§impl<R> From<SdkError<GetBotAliasError, R>> for Error
impl<R> From<SdkError<GetBotAliasError, R>> for Error
Source§fn from(err: SdkError<GetBotAliasError, R>) -> Self
fn from(err: SdkError<GetBotAliasError, R>) -> Self
Source§impl<R> From<SdkError<GetBotAliasesError, R>> for Error
impl<R> From<SdkError<GetBotAliasesError, R>> for Error
Source§fn from(err: SdkError<GetBotAliasesError, R>) -> Self
fn from(err: SdkError<GetBotAliasesError, R>) -> Self
Source§impl<R> From<SdkError<GetBotChannelAssociationError, R>> for Error
impl<R> From<SdkError<GetBotChannelAssociationError, R>> for Error
Source§fn from(err: SdkError<GetBotChannelAssociationError, R>) -> Self
fn from(err: SdkError<GetBotChannelAssociationError, R>) -> Self
Source§impl<R> From<SdkError<GetBotChannelAssociationsError, R>> for Error
impl<R> From<SdkError<GetBotChannelAssociationsError, R>> for Error
Source§fn from(err: SdkError<GetBotChannelAssociationsError, R>) -> Self
fn from(err: SdkError<GetBotChannelAssociationsError, R>) -> Self
Source§impl<R> From<SdkError<GetBotError, R>> for Error
impl<R> From<SdkError<GetBotError, R>> for Error
Source§fn from(err: SdkError<GetBotError, R>) -> Self
fn from(err: SdkError<GetBotError, R>) -> Self
Source§impl<R> From<SdkError<GetBotVersionsError, R>> for Error
impl<R> From<SdkError<GetBotVersionsError, R>> for Error
Source§fn from(err: SdkError<GetBotVersionsError, R>) -> Self
fn from(err: SdkError<GetBotVersionsError, R>) -> Self
Source§impl<R> From<SdkError<GetBotsError, R>> for Error
impl<R> From<SdkError<GetBotsError, R>> for Error
Source§fn from(err: SdkError<GetBotsError, R>) -> Self
fn from(err: SdkError<GetBotsError, R>) -> Self
Source§impl<R> From<SdkError<GetBuiltinIntentError, R>> for Error
impl<R> From<SdkError<GetBuiltinIntentError, R>> for Error
Source§fn from(err: SdkError<GetBuiltinIntentError, R>) -> Self
fn from(err: SdkError<GetBuiltinIntentError, R>) -> Self
Source§impl<R> From<SdkError<GetBuiltinIntentsError, R>> for Error
impl<R> From<SdkError<GetBuiltinIntentsError, R>> for Error
Source§fn from(err: SdkError<GetBuiltinIntentsError, R>) -> Self
fn from(err: SdkError<GetBuiltinIntentsError, R>) -> Self
Source§impl<R> From<SdkError<GetBuiltinSlotTypesError, R>> for Error
impl<R> From<SdkError<GetBuiltinSlotTypesError, R>> for Error
Source§fn from(err: SdkError<GetBuiltinSlotTypesError, R>) -> Self
fn from(err: SdkError<GetBuiltinSlotTypesError, R>) -> Self
Source§impl<R> From<SdkError<GetExportError, R>> for Error
impl<R> From<SdkError<GetExportError, R>> for Error
Source§fn from(err: SdkError<GetExportError, R>) -> Self
fn from(err: SdkError<GetExportError, R>) -> Self
Source§impl<R> From<SdkError<GetImportError, R>> for Error
impl<R> From<SdkError<GetImportError, R>> for Error
Source§fn from(err: SdkError<GetImportError, R>) -> Self
fn from(err: SdkError<GetImportError, R>) -> Self
Source§impl<R> From<SdkError<GetIntentError, R>> for Error
impl<R> From<SdkError<GetIntentError, R>> for Error
Source§fn from(err: SdkError<GetIntentError, R>) -> Self
fn from(err: SdkError<GetIntentError, R>) -> Self
Source§impl<R> From<SdkError<GetIntentVersionsError, R>> for Error
impl<R> From<SdkError<GetIntentVersionsError, R>> for Error
Source§fn from(err: SdkError<GetIntentVersionsError, R>) -> Self
fn from(err: SdkError<GetIntentVersionsError, R>) -> Self
Source§impl<R> From<SdkError<GetIntentsError, R>> for Error
impl<R> From<SdkError<GetIntentsError, R>> for Error
Source§fn from(err: SdkError<GetIntentsError, R>) -> Self
fn from(err: SdkError<GetIntentsError, R>) -> Self
Source§impl<R> From<SdkError<GetMigrationError, R>> for Error
impl<R> From<SdkError<GetMigrationError, R>> for Error
Source§fn from(err: SdkError<GetMigrationError, R>) -> Self
fn from(err: SdkError<GetMigrationError, R>) -> Self
Source§impl<R> From<SdkError<GetMigrationsError, R>> for Error
impl<R> From<SdkError<GetMigrationsError, R>> for Error
Source§fn from(err: SdkError<GetMigrationsError, R>) -> Self
fn from(err: SdkError<GetMigrationsError, R>) -> Self
Source§impl<R> From<SdkError<GetSlotTypeError, R>> for Error
impl<R> From<SdkError<GetSlotTypeError, R>> for Error
Source§fn from(err: SdkError<GetSlotTypeError, R>) -> Self
fn from(err: SdkError<GetSlotTypeError, R>) -> Self
Source§impl<R> From<SdkError<GetSlotTypeVersionsError, R>> for Error
impl<R> From<SdkError<GetSlotTypeVersionsError, R>> for Error
Source§fn from(err: SdkError<GetSlotTypeVersionsError, R>) -> Self
fn from(err: SdkError<GetSlotTypeVersionsError, R>) -> Self
Source§impl<R> From<SdkError<GetSlotTypesError, R>> for Error
impl<R> From<SdkError<GetSlotTypesError, R>> for Error
Source§fn from(err: SdkError<GetSlotTypesError, R>) -> Self
fn from(err: SdkError<GetSlotTypesError, R>) -> Self
Source§impl<R> From<SdkError<GetUtterancesViewError, R>> for Error
impl<R> From<SdkError<GetUtterancesViewError, R>> for Error
Source§fn from(err: SdkError<GetUtterancesViewError, R>) -> Self
fn from(err: SdkError<GetUtterancesViewError, R>) -> Self
Source§impl<R> From<SdkError<ListTagsForResourceError, R>> for Error
impl<R> From<SdkError<ListTagsForResourceError, R>> for Error
Source§fn from(err: SdkError<ListTagsForResourceError, R>) -> Self
fn from(err: SdkError<ListTagsForResourceError, R>) -> Self
Source§impl<R> From<SdkError<PutBotAliasError, R>> for Error
impl<R> From<SdkError<PutBotAliasError, R>> for Error
Source§fn from(err: SdkError<PutBotAliasError, R>) -> Self
fn from(err: SdkError<PutBotAliasError, R>) -> Self
Source§impl<R> From<SdkError<PutBotError, R>> for Error
impl<R> From<SdkError<PutBotError, R>> for Error
Source§fn from(err: SdkError<PutBotError, R>) -> Self
fn from(err: SdkError<PutBotError, R>) -> Self
Source§impl<R> From<SdkError<PutIntentError, R>> for Error
impl<R> From<SdkError<PutIntentError, R>> for Error
Source§fn from(err: SdkError<PutIntentError, R>) -> Self
fn from(err: SdkError<PutIntentError, R>) -> Self
Source§impl<R> From<SdkError<PutSlotTypeError, R>> for Error
impl<R> From<SdkError<PutSlotTypeError, R>> for Error
Source§fn from(err: SdkError<PutSlotTypeError, R>) -> Self
fn from(err: SdkError<PutSlotTypeError, R>) -> Self
Source§impl<R> From<SdkError<StartImportError, R>> for Error
impl<R> From<SdkError<StartImportError, R>> for Error
Source§fn from(err: SdkError<StartImportError, R>) -> Self
fn from(err: SdkError<StartImportError, R>) -> Self
Source§impl<R> From<SdkError<StartMigrationError, R>> for Error
impl<R> From<SdkError<StartMigrationError, R>> for Error
Source§fn from(err: SdkError<StartMigrationError, R>) -> Self
fn from(err: SdkError<StartMigrationError, R>) -> Self
Source§impl<R> From<SdkError<TagResourceError, R>> for Error
impl<R> From<SdkError<TagResourceError, R>> for Error
Source§fn from(err: SdkError<TagResourceError, R>) -> Self
fn from(err: SdkError<TagResourceError, R>) -> Self
Source§impl<R> From<SdkError<UntagResourceError, R>> for Error
impl<R> From<SdkError<UntagResourceError, R>> for Error
Source§fn from(err: SdkError<UntagResourceError, R>) -> Self
fn from(err: SdkError<UntagResourceError, R>) -> Self
Source§impl From<StartImportError> for Error
impl From<StartImportError> for Error
Source§fn from(err: StartImportError) -> Self
fn from(err: StartImportError) -> Self
Source§impl From<StartMigrationError> for Error
impl From<StartMigrationError> for Error
Source§fn from(err: StartMigrationError) -> Self
fn from(err: StartMigrationError) -> Self
Source§impl From<TagResourceError> for Error
impl From<TagResourceError> for Error
Source§fn from(err: TagResourceError) -> Self
fn from(err: TagResourceError) -> Self
Source§impl From<UntagResourceError> for Error
impl From<UntagResourceError> for Error
Source§fn from(err: UntagResourceError) -> Self
fn from(err: UntagResourceError) -> Self
Source§impl ProvideErrorMetadata for Error
impl ProvideErrorMetadata for Error
Source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);