#[non_exhaustive]pub enum Error {
BadRequestException(BadRequestException),
ConflictException(ConflictException),
ForbiddenException(ForbiddenException),
InternalServerErrorException(InternalServerErrorException),
LimitExceededException(LimitExceededException),
NotFoundException(NotFoundException),
ResourceInUseException(ResourceInUseException),
ServiceUnavailableException(ServiceUnavailableException),
TooManyRequestsException(TooManyRequestsException),
TooManyTagsException(TooManyTagsException),
Unhandled(Unhandled),
}Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BadRequestException(BadRequestException)
The request syntax was malformed. Check your request syntax and try again.
ConflictException(ConflictException)
The request contains a client token that was used for a previous update resource call with different specifications. Try the request again with a new client token.
ForbiddenException(ForbiddenException)
You don't have permissions to perform this action.
InternalServerErrorException(InternalServerErrorException)
The request processing has failed because of an unknown error, exception, or failure.
LimitExceededException(LimitExceededException)
You have exceeded a service limit for your account. For more information, see Service Limits in the App Mesh User Guide.
NotFoundException(NotFoundException)
The specified resource doesn't exist. Check your request syntax and try again.
ResourceInUseException(ResourceInUseException)
You can't delete the specified resource because it's in use or required by another resource.
The request has failed due to a temporary failure of the service.
TooManyRequestsException(TooManyRequestsException)
The maximum request rate permitted by the App Mesh APIs has been exceeded for your account. For best results, use an increasing or variable sleep interval between requests.
TooManyTagsException(TooManyTagsException)
The request exceeds the maximum allowed number of tags allowed per resource. The current limit is 50 user tags per resource. You must reduce the number of tags in the request. None of the tags in this request were applied.
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.81.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<CreateGatewayRouteError> for Error
impl From<CreateGatewayRouteError> for Error
source§fn from(err: CreateGatewayRouteError) -> Self
fn from(err: CreateGatewayRouteError) -> Self
source§impl From<CreateMeshError> for Error
impl From<CreateMeshError> for Error
source§fn from(err: CreateMeshError) -> Self
fn from(err: CreateMeshError) -> Self
source§impl From<CreateRouteError> for Error
impl From<CreateRouteError> for Error
source§fn from(err: CreateRouteError) -> Self
fn from(err: CreateRouteError) -> Self
source§impl From<CreateVirtualGatewayError> for Error
impl From<CreateVirtualGatewayError> for Error
source§fn from(err: CreateVirtualGatewayError) -> Self
fn from(err: CreateVirtualGatewayError) -> Self
source§impl From<CreateVirtualNodeError> for Error
impl From<CreateVirtualNodeError> for Error
source§fn from(err: CreateVirtualNodeError) -> Self
fn from(err: CreateVirtualNodeError) -> Self
source§impl From<CreateVirtualRouterError> for Error
impl From<CreateVirtualRouterError> for Error
source§fn from(err: CreateVirtualRouterError) -> Self
fn from(err: CreateVirtualRouterError) -> Self
source§impl From<CreateVirtualServiceError> for Error
impl From<CreateVirtualServiceError> for Error
source§fn from(err: CreateVirtualServiceError) -> Self
fn from(err: CreateVirtualServiceError) -> Self
source§impl From<DeleteGatewayRouteError> for Error
impl From<DeleteGatewayRouteError> for Error
source§fn from(err: DeleteGatewayRouteError) -> Self
fn from(err: DeleteGatewayRouteError) -> Self
source§impl From<DeleteMeshError> for Error
impl From<DeleteMeshError> for Error
source§fn from(err: DeleteMeshError) -> Self
fn from(err: DeleteMeshError) -> Self
source§impl From<DeleteRouteError> for Error
impl From<DeleteRouteError> for Error
source§fn from(err: DeleteRouteError) -> Self
fn from(err: DeleteRouteError) -> Self
source§impl From<DeleteVirtualGatewayError> for Error
impl From<DeleteVirtualGatewayError> for Error
source§fn from(err: DeleteVirtualGatewayError) -> Self
fn from(err: DeleteVirtualGatewayError) -> Self
source§impl From<DeleteVirtualNodeError> for Error
impl From<DeleteVirtualNodeError> for Error
source§fn from(err: DeleteVirtualNodeError) -> Self
fn from(err: DeleteVirtualNodeError) -> Self
source§impl From<DeleteVirtualRouterError> for Error
impl From<DeleteVirtualRouterError> for Error
source§fn from(err: DeleteVirtualRouterError) -> Self
fn from(err: DeleteVirtualRouterError) -> Self
source§impl From<DeleteVirtualServiceError> for Error
impl From<DeleteVirtualServiceError> for Error
source§fn from(err: DeleteVirtualServiceError) -> Self
fn from(err: DeleteVirtualServiceError) -> Self
source§impl From<DescribeGatewayRouteError> for Error
impl From<DescribeGatewayRouteError> for Error
source§fn from(err: DescribeGatewayRouteError) -> Self
fn from(err: DescribeGatewayRouteError) -> Self
source§impl From<DescribeMeshError> for Error
impl From<DescribeMeshError> for Error
source§fn from(err: DescribeMeshError) -> Self
fn from(err: DescribeMeshError) -> Self
source§impl From<DescribeRouteError> for Error
impl From<DescribeRouteError> for Error
source§fn from(err: DescribeRouteError) -> Self
fn from(err: DescribeRouteError) -> Self
source§impl From<DescribeVirtualGatewayError> for Error
impl From<DescribeVirtualGatewayError> for Error
source§fn from(err: DescribeVirtualGatewayError) -> Self
fn from(err: DescribeVirtualGatewayError) -> Self
source§impl From<DescribeVirtualNodeError> for Error
impl From<DescribeVirtualNodeError> for Error
source§fn from(err: DescribeVirtualNodeError) -> Self
fn from(err: DescribeVirtualNodeError) -> Self
source§impl From<DescribeVirtualRouterError> for Error
impl From<DescribeVirtualRouterError> for Error
source§fn from(err: DescribeVirtualRouterError) -> Self
fn from(err: DescribeVirtualRouterError) -> Self
source§impl From<DescribeVirtualServiceError> for Error
impl From<DescribeVirtualServiceError> for Error
source§fn from(err: DescribeVirtualServiceError) -> Self
fn from(err: DescribeVirtualServiceError) -> Self
source§impl From<ListGatewayRoutesError> for Error
impl From<ListGatewayRoutesError> for Error
source§fn from(err: ListGatewayRoutesError) -> Self
fn from(err: ListGatewayRoutesError) -> Self
source§impl From<ListMeshesError> for Error
impl From<ListMeshesError> for Error
source§fn from(err: ListMeshesError) -> Self
fn from(err: ListMeshesError) -> Self
source§impl From<ListRoutesError> for Error
impl From<ListRoutesError> for Error
source§fn from(err: ListRoutesError) -> Self
fn from(err: ListRoutesError) -> 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<ListVirtualGatewaysError> for Error
impl From<ListVirtualGatewaysError> for Error
source§fn from(err: ListVirtualGatewaysError) -> Self
fn from(err: ListVirtualGatewaysError) -> Self
source§impl From<ListVirtualNodesError> for Error
impl From<ListVirtualNodesError> for Error
source§fn from(err: ListVirtualNodesError) -> Self
fn from(err: ListVirtualNodesError) -> Self
source§impl From<ListVirtualRoutersError> for Error
impl From<ListVirtualRoutersError> for Error
source§fn from(err: ListVirtualRoutersError) -> Self
fn from(err: ListVirtualRoutersError) -> Self
source§impl From<ListVirtualServicesError> for Error
impl From<ListVirtualServicesError> for Error
source§fn from(err: ListVirtualServicesError) -> Self
fn from(err: ListVirtualServicesError) -> Self
source§impl<R> From<SdkError<CreateGatewayRouteError, R>> for Error
impl<R> From<SdkError<CreateGatewayRouteError, R>> for Error
source§fn from(err: SdkError<CreateGatewayRouteError, R>) -> Self
fn from(err: SdkError<CreateGatewayRouteError, R>) -> Self
source§impl<R> From<SdkError<CreateMeshError, R>> for Error
impl<R> From<SdkError<CreateMeshError, R>> for Error
source§fn from(err: SdkError<CreateMeshError, R>) -> Self
fn from(err: SdkError<CreateMeshError, R>) -> Self
source§impl<R> From<SdkError<CreateRouteError, R>> for Error
impl<R> From<SdkError<CreateRouteError, R>> for Error
source§fn from(err: SdkError<CreateRouteError, R>) -> Self
fn from(err: SdkError<CreateRouteError, R>) -> Self
source§impl<R> From<SdkError<CreateVirtualGatewayError, R>> for Error
impl<R> From<SdkError<CreateVirtualGatewayError, R>> for Error
source§fn from(err: SdkError<CreateVirtualGatewayError, R>) -> Self
fn from(err: SdkError<CreateVirtualGatewayError, R>) -> Self
source§impl<R> From<SdkError<CreateVirtualNodeError, R>> for Error
impl<R> From<SdkError<CreateVirtualNodeError, R>> for Error
source§fn from(err: SdkError<CreateVirtualNodeError, R>) -> Self
fn from(err: SdkError<CreateVirtualNodeError, R>) -> Self
source§impl<R> From<SdkError<CreateVirtualRouterError, R>> for Error
impl<R> From<SdkError<CreateVirtualRouterError, R>> for Error
source§fn from(err: SdkError<CreateVirtualRouterError, R>) -> Self
fn from(err: SdkError<CreateVirtualRouterError, R>) -> Self
source§impl<R> From<SdkError<CreateVirtualServiceError, R>> for Error
impl<R> From<SdkError<CreateVirtualServiceError, R>> for Error
source§fn from(err: SdkError<CreateVirtualServiceError, R>) -> Self
fn from(err: SdkError<CreateVirtualServiceError, R>) -> Self
source§impl<R> From<SdkError<DeleteGatewayRouteError, R>> for Error
impl<R> From<SdkError<DeleteGatewayRouteError, R>> for Error
source§fn from(err: SdkError<DeleteGatewayRouteError, R>) -> Self
fn from(err: SdkError<DeleteGatewayRouteError, R>) -> Self
source§impl<R> From<SdkError<DeleteMeshError, R>> for Error
impl<R> From<SdkError<DeleteMeshError, R>> for Error
source§fn from(err: SdkError<DeleteMeshError, R>) -> Self
fn from(err: SdkError<DeleteMeshError, R>) -> Self
source§impl<R> From<SdkError<DeleteRouteError, R>> for Error
impl<R> From<SdkError<DeleteRouteError, R>> for Error
source§fn from(err: SdkError<DeleteRouteError, R>) -> Self
fn from(err: SdkError<DeleteRouteError, R>) -> Self
source§impl<R> From<SdkError<DeleteVirtualGatewayError, R>> for Error
impl<R> From<SdkError<DeleteVirtualGatewayError, R>> for Error
source§fn from(err: SdkError<DeleteVirtualGatewayError, R>) -> Self
fn from(err: SdkError<DeleteVirtualGatewayError, R>) -> Self
source§impl<R> From<SdkError<DeleteVirtualNodeError, R>> for Error
impl<R> From<SdkError<DeleteVirtualNodeError, R>> for Error
source§fn from(err: SdkError<DeleteVirtualNodeError, R>) -> Self
fn from(err: SdkError<DeleteVirtualNodeError, R>) -> Self
source§impl<R> From<SdkError<DeleteVirtualRouterError, R>> for Error
impl<R> From<SdkError<DeleteVirtualRouterError, R>> for Error
source§fn from(err: SdkError<DeleteVirtualRouterError, R>) -> Self
fn from(err: SdkError<DeleteVirtualRouterError, R>) -> Self
source§impl<R> From<SdkError<DeleteVirtualServiceError, R>> for Error
impl<R> From<SdkError<DeleteVirtualServiceError, R>> for Error
source§fn from(err: SdkError<DeleteVirtualServiceError, R>) -> Self
fn from(err: SdkError<DeleteVirtualServiceError, R>) -> Self
source§impl<R> From<SdkError<DescribeGatewayRouteError, R>> for Error
impl<R> From<SdkError<DescribeGatewayRouteError, R>> for Error
source§fn from(err: SdkError<DescribeGatewayRouteError, R>) -> Self
fn from(err: SdkError<DescribeGatewayRouteError, R>) -> Self
source§impl<R> From<SdkError<DescribeMeshError, R>> for Error
impl<R> From<SdkError<DescribeMeshError, R>> for Error
source§fn from(err: SdkError<DescribeMeshError, R>) -> Self
fn from(err: SdkError<DescribeMeshError, R>) -> Self
source§impl<R> From<SdkError<DescribeRouteError, R>> for Error
impl<R> From<SdkError<DescribeRouteError, R>> for Error
source§fn from(err: SdkError<DescribeRouteError, R>) -> Self
fn from(err: SdkError<DescribeRouteError, R>) -> Self
source§impl<R> From<SdkError<DescribeVirtualGatewayError, R>> for Error
impl<R> From<SdkError<DescribeVirtualGatewayError, R>> for Error
source§fn from(err: SdkError<DescribeVirtualGatewayError, R>) -> Self
fn from(err: SdkError<DescribeVirtualGatewayError, R>) -> Self
source§impl<R> From<SdkError<DescribeVirtualNodeError, R>> for Error
impl<R> From<SdkError<DescribeVirtualNodeError, R>> for Error
source§fn from(err: SdkError<DescribeVirtualNodeError, R>) -> Self
fn from(err: SdkError<DescribeVirtualNodeError, R>) -> Self
source§impl<R> From<SdkError<DescribeVirtualRouterError, R>> for Error
impl<R> From<SdkError<DescribeVirtualRouterError, R>> for Error
source§fn from(err: SdkError<DescribeVirtualRouterError, R>) -> Self
fn from(err: SdkError<DescribeVirtualRouterError, R>) -> Self
source§impl<R> From<SdkError<DescribeVirtualServiceError, R>> for Error
impl<R> From<SdkError<DescribeVirtualServiceError, R>> for Error
source§fn from(err: SdkError<DescribeVirtualServiceError, R>) -> Self
fn from(err: SdkError<DescribeVirtualServiceError, R>) -> Self
source§impl<R> From<SdkError<ListGatewayRoutesError, R>> for Error
impl<R> From<SdkError<ListGatewayRoutesError, R>> for Error
source§fn from(err: SdkError<ListGatewayRoutesError, R>) -> Self
fn from(err: SdkError<ListGatewayRoutesError, R>) -> Self
source§impl<R> From<SdkError<ListMeshesError, R>> for Error
impl<R> From<SdkError<ListMeshesError, R>> for Error
source§fn from(err: SdkError<ListMeshesError, R>) -> Self
fn from(err: SdkError<ListMeshesError, R>) -> Self
source§impl<R> From<SdkError<ListRoutesError, R>> for Error
impl<R> From<SdkError<ListRoutesError, R>> for Error
source§fn from(err: SdkError<ListRoutesError, R>) -> Self
fn from(err: SdkError<ListRoutesError, 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<ListVirtualGatewaysError, R>> for Error
impl<R> From<SdkError<ListVirtualGatewaysError, R>> for Error
source§fn from(err: SdkError<ListVirtualGatewaysError, R>) -> Self
fn from(err: SdkError<ListVirtualGatewaysError, R>) -> Self
source§impl<R> From<SdkError<ListVirtualNodesError, R>> for Error
impl<R> From<SdkError<ListVirtualNodesError, R>> for Error
source§fn from(err: SdkError<ListVirtualNodesError, R>) -> Self
fn from(err: SdkError<ListVirtualNodesError, R>) -> Self
source§impl<R> From<SdkError<ListVirtualRoutersError, R>> for Error
impl<R> From<SdkError<ListVirtualRoutersError, R>> for Error
source§fn from(err: SdkError<ListVirtualRoutersError, R>) -> Self
fn from(err: SdkError<ListVirtualRoutersError, R>) -> Self
source§impl<R> From<SdkError<ListVirtualServicesError, R>> for Error
impl<R> From<SdkError<ListVirtualServicesError, R>> for Error
source§fn from(err: SdkError<ListVirtualServicesError, R>) -> Self
fn from(err: SdkError<ListVirtualServicesError, R>) -> Self
source§impl<R> From<SdkError<TagResourceError, R>> for Error
impl<R> From<SdkError<TagResourceError, R>> for Error
source§fn from(err: SdkError<TagResourceError, R>) -> Self
fn from(err: SdkError<TagResourceError, R>) -> Self
source§impl<R> From<SdkError<UntagResourceError, R>> for Error
impl<R> From<SdkError<UntagResourceError, R>> for Error
source§fn from(err: SdkError<UntagResourceError, R>) -> Self
fn from(err: SdkError<UntagResourceError, R>) -> Self
source§impl<R> From<SdkError<UpdateGatewayRouteError, R>> for Error
impl<R> From<SdkError<UpdateGatewayRouteError, R>> for Error
source§fn from(err: SdkError<UpdateGatewayRouteError, R>) -> Self
fn from(err: SdkError<UpdateGatewayRouteError, R>) -> Self
source§impl<R> From<SdkError<UpdateMeshError, R>> for Error
impl<R> From<SdkError<UpdateMeshError, R>> for Error
source§fn from(err: SdkError<UpdateMeshError, R>) -> Self
fn from(err: SdkError<UpdateMeshError, R>) -> Self
source§impl<R> From<SdkError<UpdateRouteError, R>> for Error
impl<R> From<SdkError<UpdateRouteError, R>> for Error
source§fn from(err: SdkError<UpdateRouteError, R>) -> Self
fn from(err: SdkError<UpdateRouteError, R>) -> Self
source§impl<R> From<SdkError<UpdateVirtualGatewayError, R>> for Error
impl<R> From<SdkError<UpdateVirtualGatewayError, R>> for Error
source§fn from(err: SdkError<UpdateVirtualGatewayError, R>) -> Self
fn from(err: SdkError<UpdateVirtualGatewayError, R>) -> Self
source§impl<R> From<SdkError<UpdateVirtualNodeError, R>> for Error
impl<R> From<SdkError<UpdateVirtualNodeError, R>> for Error
source§fn from(err: SdkError<UpdateVirtualNodeError, R>) -> Self
fn from(err: SdkError<UpdateVirtualNodeError, R>) -> Self
source§impl<R> From<SdkError<UpdateVirtualRouterError, R>> for Error
impl<R> From<SdkError<UpdateVirtualRouterError, R>> for Error
source§fn from(err: SdkError<UpdateVirtualRouterError, R>) -> Self
fn from(err: SdkError<UpdateVirtualRouterError, R>) -> Self
source§impl<R> From<SdkError<UpdateVirtualServiceError, R>> for Error
impl<R> From<SdkError<UpdateVirtualServiceError, R>> for Error
source§fn from(err: SdkError<UpdateVirtualServiceError, R>) -> Self
fn from(err: SdkError<UpdateVirtualServiceError, R>) -> Self
source§impl From<TagResourceError> for Error
impl From<TagResourceError> for Error
source§fn from(err: TagResourceError) -> Self
fn from(err: TagResourceError) -> Self
source§impl From<UntagResourceError> for Error
impl From<UntagResourceError> for Error
source§fn from(err: UntagResourceError) -> Self
fn from(err: UntagResourceError) -> Self
source§impl From<UpdateGatewayRouteError> for Error
impl From<UpdateGatewayRouteError> for Error
source§fn from(err: UpdateGatewayRouteError) -> Self
fn from(err: UpdateGatewayRouteError) -> Self
source§impl From<UpdateMeshError> for Error
impl From<UpdateMeshError> for Error
source§fn from(err: UpdateMeshError) -> Self
fn from(err: UpdateMeshError) -> Self
source§impl From<UpdateRouteError> for Error
impl From<UpdateRouteError> for Error
source§fn from(err: UpdateRouteError) -> Self
fn from(err: UpdateRouteError) -> Self
source§impl From<UpdateVirtualGatewayError> for Error
impl From<UpdateVirtualGatewayError> for Error
source§fn from(err: UpdateVirtualGatewayError) -> Self
fn from(err: UpdateVirtualGatewayError) -> Self
source§impl From<UpdateVirtualNodeError> for Error
impl From<UpdateVirtualNodeError> for Error
source§fn from(err: UpdateVirtualNodeError) -> Self
fn from(err: UpdateVirtualNodeError) -> Self
source§impl From<UpdateVirtualRouterError> for Error
impl From<UpdateVirtualRouterError> for Error
source§fn from(err: UpdateVirtualRouterError) -> Self
fn from(err: UpdateVirtualRouterError) -> Self
source§impl From<UpdateVirtualServiceError> for Error
impl From<UpdateVirtualServiceError> for Error
source§fn from(err: UpdateVirtualServiceError) -> Self
fn from(err: UpdateVirtualServiceError) -> 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>
Returns self with the
fg()
set to
Color::BrightBlack.
§Example
println!("{}", value.bright_black());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>
Returns self with the
fg()
set to
Color::BrightGreen.
§Example
println!("{}", value.bright_green());source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightYellow.
§Example
println!("{}", value.bright_yellow());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>
Returns self with the
fg()
set to
Color::BrightMagenta.
§Example
println!("{}", value.bright_magenta());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>
Returns self with the
fg()
set to
Color::BrightWhite.
§Example
println!("{}", value.bright_white());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>
Returns self with the
bg()
set to
Color::BrightBlack.
§Example
println!("{}", value.on_bright_black());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>
Returns self with the
bg()
set to
Color::BrightGreen.
§Example
println!("{}", value.on_bright_green());source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightYellow.
§Example
println!("{}", value.on_bright_yellow());source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightBlue.
§Example
println!("{}", value.on_bright_blue());source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightMagenta.
§Example
println!("{}", value.on_bright_magenta());source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightCyan.
§Example
println!("{}", value.on_bright_cyan());source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightWhite.
§Example
println!("{}", value.on_bright_white());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 underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::Underline.
§Example
println!("{}", value.underline());source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::RapidBlink.
§Example
println!("{}", value.rapid_blink());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);