#[non_exhaustive]pub enum Error {
Show 23 variants
AccessPointNotFoundException(AccessPointNotFoundException),
CertificateNotFoundException(CertificateNotFoundException),
DependencyThrottleException(DependencyThrottleException),
DuplicateAccessPointNameException(DuplicateAccessPointNameException),
DuplicateListenerException(DuplicateListenerException),
DuplicatePolicyNameException(DuplicatePolicyNameException),
DuplicateTagKeysException(DuplicateTagKeysException),
InvalidConfigurationRequestException(InvalidConfigurationRequestException),
InvalidEndPointException(InvalidEndPointException),
InvalidSchemeException(InvalidSchemeException),
InvalidSecurityGroupException(InvalidSecurityGroupException),
InvalidSubnetException(InvalidSubnetException),
ListenerNotFoundException(ListenerNotFoundException),
LoadBalancerAttributeNotFoundException(LoadBalancerAttributeNotFoundException),
OperationNotPermittedException(OperationNotPermittedException),
PolicyNotFoundException(PolicyNotFoundException),
PolicyTypeNotFoundException(PolicyTypeNotFoundException),
SubnetNotFoundException(SubnetNotFoundException),
TooManyAccessPointsException(TooManyAccessPointsException),
TooManyPoliciesException(TooManyPoliciesException),
TooManyTagsException(TooManyTagsException),
UnsupportedProtocolException(UnsupportedProtocolException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessPointNotFoundException(AccessPointNotFoundException)
The specified load balancer does not exist.
CertificateNotFoundException(CertificateNotFoundException)
The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.
DependencyThrottleException(DependencyThrottleException)
A request made by Elastic Load Balancing to another service exceeds the maximum request rate permitted for your account.
DuplicateAccessPointNameException(DuplicateAccessPointNameException)
The specified load balancer name already exists for this account.
DuplicateListenerException(DuplicateListenerException)
A listener already exists for the specified load balancer name and port, but with a different instance port, protocol, or SSL certificate.
DuplicatePolicyNameException(DuplicatePolicyNameException)
A policy with the specified name already exists for this load balancer.
DuplicateTagKeysException(DuplicateTagKeysException)
A tag key was specified more than once.
InvalidConfigurationRequestException(InvalidConfigurationRequestException)
The requested configuration change is not valid.
InvalidEndPointException(InvalidEndPointException)
The specified endpoint is not valid.
InvalidSchemeException(InvalidSchemeException)
The specified value for the schema is not valid. You can only specify a scheme for load balancers in a VPC.
InvalidSecurityGroupException(InvalidSecurityGroupException)
One or more of the specified security groups do not exist.
InvalidSubnetException(InvalidSubnetException)
The specified VPC has no associated Internet gateway.
ListenerNotFoundException(ListenerNotFoundException)
The load balancer does not have a listener configured at the specified port.
LoadBalancerAttributeNotFoundException(LoadBalancerAttributeNotFoundException)
The specified load balancer attribute does not exist.
OperationNotPermittedException(OperationNotPermittedException)
This operation is not allowed.
PolicyNotFoundException(PolicyNotFoundException)
One or more of the specified policies do not exist.
PolicyTypeNotFoundException(PolicyTypeNotFoundException)
One or more of the specified policy types do not exist.
SubnetNotFoundException(SubnetNotFoundException)
One or more of the specified subnets do not exist.
TooManyAccessPointsException(TooManyAccessPointsException)
The quota for the number of load balancers has been reached.
TooManyPoliciesException(TooManyPoliciesException)
The quota for the number of policies for this load balancer has been reached.
TooManyTagsException(TooManyTagsException)
The quota for the number of tags that can be assigned to a load balancer has been reached.
UnsupportedProtocolException(UnsupportedProtocolException)
The specified protocol or signature version is not supported.
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<AddTagsError> for Error
impl From<AddTagsError> for Error
Source§fn from(err: AddTagsError) -> Self
fn from(err: AddTagsError) -> Self
Source§impl From<ApplySecurityGroupsToLoadBalancerError> for Error
impl From<ApplySecurityGroupsToLoadBalancerError> for Error
Source§fn from(err: ApplySecurityGroupsToLoadBalancerError) -> Self
fn from(err: ApplySecurityGroupsToLoadBalancerError) -> Self
Source§impl From<AttachLoadBalancerToSubnetsError> for Error
impl From<AttachLoadBalancerToSubnetsError> for Error
Source§fn from(err: AttachLoadBalancerToSubnetsError) -> Self
fn from(err: AttachLoadBalancerToSubnetsError) -> Self
Source§impl From<BuildError> for Error
impl From<BuildError> for Error
Source§fn from(value: BuildError) -> Self
fn from(value: BuildError) -> Self
Source§impl From<ConfigureHealthCheckError> for Error
impl From<ConfigureHealthCheckError> for Error
Source§fn from(err: ConfigureHealthCheckError) -> Self
fn from(err: ConfigureHealthCheckError) -> Self
Source§impl From<CreateAppCookieStickinessPolicyError> for Error
impl From<CreateAppCookieStickinessPolicyError> for Error
Source§fn from(err: CreateAppCookieStickinessPolicyError) -> Self
fn from(err: CreateAppCookieStickinessPolicyError) -> Self
Source§impl From<CreateLBCookieStickinessPolicyError> for Error
impl From<CreateLBCookieStickinessPolicyError> for Error
Source§fn from(err: CreateLBCookieStickinessPolicyError) -> Self
fn from(err: CreateLBCookieStickinessPolicyError) -> Self
Source§impl From<CreateLoadBalancerError> for Error
impl From<CreateLoadBalancerError> for Error
Source§fn from(err: CreateLoadBalancerError) -> Self
fn from(err: CreateLoadBalancerError) -> Self
Source§impl From<CreateLoadBalancerListenersError> for Error
impl From<CreateLoadBalancerListenersError> for Error
Source§fn from(err: CreateLoadBalancerListenersError) -> Self
fn from(err: CreateLoadBalancerListenersError) -> Self
Source§impl From<CreateLoadBalancerPolicyError> for Error
impl From<CreateLoadBalancerPolicyError> for Error
Source§fn from(err: CreateLoadBalancerPolicyError) -> Self
fn from(err: CreateLoadBalancerPolicyError) -> Self
Source§impl From<DeleteLoadBalancerError> for Error
impl From<DeleteLoadBalancerError> for Error
Source§fn from(err: DeleteLoadBalancerError) -> Self
fn from(err: DeleteLoadBalancerError) -> Self
Source§impl From<DeleteLoadBalancerListenersError> for Error
impl From<DeleteLoadBalancerListenersError> for Error
Source§fn from(err: DeleteLoadBalancerListenersError) -> Self
fn from(err: DeleteLoadBalancerListenersError) -> Self
Source§impl From<DeleteLoadBalancerPolicyError> for Error
impl From<DeleteLoadBalancerPolicyError> for Error
Source§fn from(err: DeleteLoadBalancerPolicyError) -> Self
fn from(err: DeleteLoadBalancerPolicyError) -> Self
Source§impl From<DeregisterInstancesFromLoadBalancerError> for Error
impl From<DeregisterInstancesFromLoadBalancerError> for Error
Source§fn from(err: DeregisterInstancesFromLoadBalancerError) -> Self
fn from(err: DeregisterInstancesFromLoadBalancerError) -> Self
Source§impl From<DescribeAccountLimitsError> for Error
impl From<DescribeAccountLimitsError> for Error
Source§fn from(err: DescribeAccountLimitsError) -> Self
fn from(err: DescribeAccountLimitsError) -> Self
Source§impl From<DescribeInstanceHealthError> for Error
impl From<DescribeInstanceHealthError> for Error
Source§fn from(err: DescribeInstanceHealthError) -> Self
fn from(err: DescribeInstanceHealthError) -> Self
Source§impl From<DescribeLoadBalancerAttributesError> for Error
impl From<DescribeLoadBalancerAttributesError> for Error
Source§fn from(err: DescribeLoadBalancerAttributesError) -> Self
fn from(err: DescribeLoadBalancerAttributesError) -> Self
Source§impl From<DescribeLoadBalancerPoliciesError> for Error
impl From<DescribeLoadBalancerPoliciesError> for Error
Source§fn from(err: DescribeLoadBalancerPoliciesError) -> Self
fn from(err: DescribeLoadBalancerPoliciesError) -> Self
Source§impl From<DescribeLoadBalancerPolicyTypesError> for Error
impl From<DescribeLoadBalancerPolicyTypesError> for Error
Source§fn from(err: DescribeLoadBalancerPolicyTypesError) -> Self
fn from(err: DescribeLoadBalancerPolicyTypesError) -> Self
Source§impl From<DescribeLoadBalancersError> for Error
impl From<DescribeLoadBalancersError> for Error
Source§fn from(err: DescribeLoadBalancersError) -> Self
fn from(err: DescribeLoadBalancersError) -> Self
Source§impl From<DescribeTagsError> for Error
impl From<DescribeTagsError> for Error
Source§fn from(err: DescribeTagsError) -> Self
fn from(err: DescribeTagsError) -> Self
Source§impl From<DetachLoadBalancerFromSubnetsError> for Error
impl From<DetachLoadBalancerFromSubnetsError> for Error
Source§fn from(err: DetachLoadBalancerFromSubnetsError) -> Self
fn from(err: DetachLoadBalancerFromSubnetsError) -> Self
Source§impl From<DisableAvailabilityZonesForLoadBalancerError> for Error
impl From<DisableAvailabilityZonesForLoadBalancerError> for Error
Source§fn from(err: DisableAvailabilityZonesForLoadBalancerError) -> Self
fn from(err: DisableAvailabilityZonesForLoadBalancerError) -> Self
Source§impl From<EnableAvailabilityZonesForLoadBalancerError> for Error
impl From<EnableAvailabilityZonesForLoadBalancerError> for Error
Source§fn from(err: EnableAvailabilityZonesForLoadBalancerError) -> Self
fn from(err: EnableAvailabilityZonesForLoadBalancerError) -> Self
Source§impl From<ModifyLoadBalancerAttributesError> for Error
impl From<ModifyLoadBalancerAttributesError> for Error
Source§fn from(err: ModifyLoadBalancerAttributesError) -> Self
fn from(err: ModifyLoadBalancerAttributesError) -> Self
Source§impl From<RegisterInstancesWithLoadBalancerError> for Error
impl From<RegisterInstancesWithLoadBalancerError> for Error
Source§fn from(err: RegisterInstancesWithLoadBalancerError) -> Self
fn from(err: RegisterInstancesWithLoadBalancerError) -> Self
Source§impl From<RemoveTagsError> for Error
impl From<RemoveTagsError> for Error
Source§fn from(err: RemoveTagsError) -> Self
fn from(err: RemoveTagsError) -> Self
Source§impl<R> From<SdkError<AddTagsError, R>> for Error
impl<R> From<SdkError<AddTagsError, R>> for Error
Source§fn from(err: SdkError<AddTagsError, R>) -> Self
fn from(err: SdkError<AddTagsError, R>) -> Self
Source§impl<R> From<SdkError<ApplySecurityGroupsToLoadBalancerError, R>> for Error
impl<R> From<SdkError<ApplySecurityGroupsToLoadBalancerError, R>> for Error
Source§fn from(err: SdkError<ApplySecurityGroupsToLoadBalancerError, R>) -> Self
fn from(err: SdkError<ApplySecurityGroupsToLoadBalancerError, R>) -> Self
Source§impl<R> From<SdkError<AttachLoadBalancerToSubnetsError, R>> for Error
impl<R> From<SdkError<AttachLoadBalancerToSubnetsError, R>> for Error
Source§fn from(err: SdkError<AttachLoadBalancerToSubnetsError, R>) -> Self
fn from(err: SdkError<AttachLoadBalancerToSubnetsError, R>) -> Self
Source§impl<R> From<SdkError<ConfigureHealthCheckError, R>> for Error
impl<R> From<SdkError<ConfigureHealthCheckError, R>> for Error
Source§fn from(err: SdkError<ConfigureHealthCheckError, R>) -> Self
fn from(err: SdkError<ConfigureHealthCheckError, R>) -> Self
Source§impl<R> From<SdkError<CreateAppCookieStickinessPolicyError, R>> for Error
impl<R> From<SdkError<CreateAppCookieStickinessPolicyError, R>> for Error
Source§fn from(err: SdkError<CreateAppCookieStickinessPolicyError, R>) -> Self
fn from(err: SdkError<CreateAppCookieStickinessPolicyError, R>) -> Self
Source§impl<R> From<SdkError<CreateLBCookieStickinessPolicyError, R>> for Error
impl<R> From<SdkError<CreateLBCookieStickinessPolicyError, R>> for Error
Source§fn from(err: SdkError<CreateLBCookieStickinessPolicyError, R>) -> Self
fn from(err: SdkError<CreateLBCookieStickinessPolicyError, R>) -> Self
Source§impl<R> From<SdkError<CreateLoadBalancerError, R>> for Error
impl<R> From<SdkError<CreateLoadBalancerError, R>> for Error
Source§fn from(err: SdkError<CreateLoadBalancerError, R>) -> Self
fn from(err: SdkError<CreateLoadBalancerError, R>) -> Self
Source§impl<R> From<SdkError<CreateLoadBalancerListenersError, R>> for Error
impl<R> From<SdkError<CreateLoadBalancerListenersError, R>> for Error
Source§fn from(err: SdkError<CreateLoadBalancerListenersError, R>) -> Self
fn from(err: SdkError<CreateLoadBalancerListenersError, R>) -> Self
Source§impl<R> From<SdkError<CreateLoadBalancerPolicyError, R>> for Error
impl<R> From<SdkError<CreateLoadBalancerPolicyError, R>> for Error
Source§fn from(err: SdkError<CreateLoadBalancerPolicyError, R>) -> Self
fn from(err: SdkError<CreateLoadBalancerPolicyError, R>) -> Self
Source§impl<R> From<SdkError<DeleteLoadBalancerError, R>> for Error
impl<R> From<SdkError<DeleteLoadBalancerError, R>> for Error
Source§fn from(err: SdkError<DeleteLoadBalancerError, R>) -> Self
fn from(err: SdkError<DeleteLoadBalancerError, R>) -> Self
Source§impl<R> From<SdkError<DeleteLoadBalancerListenersError, R>> for Error
impl<R> From<SdkError<DeleteLoadBalancerListenersError, R>> for Error
Source§fn from(err: SdkError<DeleteLoadBalancerListenersError, R>) -> Self
fn from(err: SdkError<DeleteLoadBalancerListenersError, R>) -> Self
Source§impl<R> From<SdkError<DeleteLoadBalancerPolicyError, R>> for Error
impl<R> From<SdkError<DeleteLoadBalancerPolicyError, R>> for Error
Source§fn from(err: SdkError<DeleteLoadBalancerPolicyError, R>) -> Self
fn from(err: SdkError<DeleteLoadBalancerPolicyError, R>) -> Self
Source§impl<R> From<SdkError<DeregisterInstancesFromLoadBalancerError, R>> for Error
impl<R> From<SdkError<DeregisterInstancesFromLoadBalancerError, R>> for Error
Source§fn from(err: SdkError<DeregisterInstancesFromLoadBalancerError, R>) -> Self
fn from(err: SdkError<DeregisterInstancesFromLoadBalancerError, R>) -> Self
Source§impl<R> From<SdkError<DescribeAccountLimitsError, R>> for Error
impl<R> From<SdkError<DescribeAccountLimitsError, R>> for Error
Source§fn from(err: SdkError<DescribeAccountLimitsError, R>) -> Self
fn from(err: SdkError<DescribeAccountLimitsError, R>) -> Self
Source§impl<R> From<SdkError<DescribeInstanceHealthError, R>> for Error
impl<R> From<SdkError<DescribeInstanceHealthError, R>> for Error
Source§fn from(err: SdkError<DescribeInstanceHealthError, R>) -> Self
fn from(err: SdkError<DescribeInstanceHealthError, R>) -> Self
Source§impl<R> From<SdkError<DescribeLoadBalancerAttributesError, R>> for Error
impl<R> From<SdkError<DescribeLoadBalancerAttributesError, R>> for Error
Source§fn from(err: SdkError<DescribeLoadBalancerAttributesError, R>) -> Self
fn from(err: SdkError<DescribeLoadBalancerAttributesError, R>) -> Self
Source§impl<R> From<SdkError<DescribeLoadBalancerPoliciesError, R>> for Error
impl<R> From<SdkError<DescribeLoadBalancerPoliciesError, R>> for Error
Source§fn from(err: SdkError<DescribeLoadBalancerPoliciesError, R>) -> Self
fn from(err: SdkError<DescribeLoadBalancerPoliciesError, R>) -> Self
Source§impl<R> From<SdkError<DescribeLoadBalancerPolicyTypesError, R>> for Error
impl<R> From<SdkError<DescribeLoadBalancerPolicyTypesError, R>> for Error
Source§fn from(err: SdkError<DescribeLoadBalancerPolicyTypesError, R>) -> Self
fn from(err: SdkError<DescribeLoadBalancerPolicyTypesError, R>) -> Self
Source§impl<R> From<SdkError<DescribeLoadBalancersError, R>> for Error
impl<R> From<SdkError<DescribeLoadBalancersError, R>> for Error
Source§fn from(err: SdkError<DescribeLoadBalancersError, R>) -> Self
fn from(err: SdkError<DescribeLoadBalancersError, R>) -> Self
Source§impl<R> From<SdkError<DescribeTagsError, R>> for Error
impl<R> From<SdkError<DescribeTagsError, R>> for Error
Source§fn from(err: SdkError<DescribeTagsError, R>) -> Self
fn from(err: SdkError<DescribeTagsError, R>) -> Self
Source§impl<R> From<SdkError<DetachLoadBalancerFromSubnetsError, R>> for Error
impl<R> From<SdkError<DetachLoadBalancerFromSubnetsError, R>> for Error
Source§fn from(err: SdkError<DetachLoadBalancerFromSubnetsError, R>) -> Self
fn from(err: SdkError<DetachLoadBalancerFromSubnetsError, R>) -> Self
Source§impl<R> From<SdkError<DisableAvailabilityZonesForLoadBalancerError, R>> for Error
impl<R> From<SdkError<DisableAvailabilityZonesForLoadBalancerError, R>> for Error
Source§fn from(err: SdkError<DisableAvailabilityZonesForLoadBalancerError, R>) -> Self
fn from(err: SdkError<DisableAvailabilityZonesForLoadBalancerError, R>) -> Self
Source§impl<R> From<SdkError<EnableAvailabilityZonesForLoadBalancerError, R>> for Error
impl<R> From<SdkError<EnableAvailabilityZonesForLoadBalancerError, R>> for Error
Source§fn from(err: SdkError<EnableAvailabilityZonesForLoadBalancerError, R>) -> Self
fn from(err: SdkError<EnableAvailabilityZonesForLoadBalancerError, R>) -> Self
Source§impl<R> From<SdkError<ModifyLoadBalancerAttributesError, R>> for Error
impl<R> From<SdkError<ModifyLoadBalancerAttributesError, R>> for Error
Source§fn from(err: SdkError<ModifyLoadBalancerAttributesError, R>) -> Self
fn from(err: SdkError<ModifyLoadBalancerAttributesError, R>) -> Self
Source§impl<R> From<SdkError<RegisterInstancesWithLoadBalancerError, R>> for Error
impl<R> From<SdkError<RegisterInstancesWithLoadBalancerError, R>> for Error
Source§fn from(err: SdkError<RegisterInstancesWithLoadBalancerError, R>) -> Self
fn from(err: SdkError<RegisterInstancesWithLoadBalancerError, R>) -> Self
Source§impl<R> From<SdkError<RemoveTagsError, R>> for Error
impl<R> From<SdkError<RemoveTagsError, R>> for Error
Source§fn from(err: SdkError<RemoveTagsError, R>) -> Self
fn from(err: SdkError<RemoveTagsError, R>) -> Self
Source§impl<R> From<SdkError<SetLoadBalancerListenerSSLCertificateError, R>> for Error
impl<R> From<SdkError<SetLoadBalancerListenerSSLCertificateError, R>> for Error
Source§fn from(err: SdkError<SetLoadBalancerListenerSSLCertificateError, R>) -> Self
fn from(err: SdkError<SetLoadBalancerListenerSSLCertificateError, R>) -> Self
Source§impl<R> From<SdkError<SetLoadBalancerPoliciesForBackendServerError, R>> for Error
impl<R> From<SdkError<SetLoadBalancerPoliciesForBackendServerError, R>> for Error
Source§fn from(err: SdkError<SetLoadBalancerPoliciesForBackendServerError, R>) -> Self
fn from(err: SdkError<SetLoadBalancerPoliciesForBackendServerError, R>) -> Self
Source§impl<R> From<SdkError<SetLoadBalancerPoliciesOfListenerError, R>> for Error
impl<R> From<SdkError<SetLoadBalancerPoliciesOfListenerError, R>> for Error
Source§fn from(err: SdkError<SetLoadBalancerPoliciesOfListenerError, R>) -> Self
fn from(err: SdkError<SetLoadBalancerPoliciesOfListenerError, R>) -> Self
Source§impl From<SetLoadBalancerListenerSSLCertificateError> for Error
impl From<SetLoadBalancerListenerSSLCertificateError> for Error
Source§fn from(err: SetLoadBalancerListenerSSLCertificateError) -> Self
fn from(err: SetLoadBalancerListenerSSLCertificateError) -> Self
Source§impl From<SetLoadBalancerPoliciesForBackendServerError> for Error
impl From<SetLoadBalancerPoliciesForBackendServerError> for Error
Source§fn from(err: SetLoadBalancerPoliciesForBackendServerError) -> Self
fn from(err: SetLoadBalancerPoliciesForBackendServerError) -> Self
Source§impl From<SetLoadBalancerPoliciesOfListenerError> for Error
impl From<SetLoadBalancerPoliciesOfListenerError> for Error
Source§fn from(err: SetLoadBalancerPoliciesOfListenerError) -> Self
fn from(err: SetLoadBalancerPoliciesOfListenerError) -> Self
Source§impl<O, E> From<WaiterError<O, E>> for Error
impl<O, E> From<WaiterError<O, E>> for Error
Source§fn from(err: WaiterError<O, E>) -> Self
fn from(err: WaiterError<O, E>) -> Self
Source§impl ProvideErrorMetadata for Error
impl ProvideErrorMetadata for Error
Source§fn meta(&self) -> &ErrorMetadata
fn meta(&self) -> &ErrorMetadata
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
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);