#[non_exhaustive]pub enum Error {
AccessDeniedException(AccessDeniedException),
BadRequestException(BadRequestException),
ConflictException(ConflictException),
InternalServerException(InternalServerException),
ResourceNotFoundException(ResourceNotFoundException),
ThrottlingException(ThrottlingException),
Unhandled(Unhandled),
}
Expand description
All possible error types for this service.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AccessDeniedException(AccessDeniedException)
You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific Amazon Web Services action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement.
BadRequestException(BadRequestException)
The request is malformed or contains an error such as an invalid parameter value or a missing required parameter.
ConflictException(ConflictException)
Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.
InternalServerException(InternalServerException)
Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again.
ResourceNotFoundException(ResourceNotFoundException)
The resource could not be found.
ThrottlingException(ThrottlingException)
The limit on the number of requests per second was exceeded.
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<CreateAwsLogSourceError> for Error
impl From<CreateAwsLogSourceError> for Error
Source§fn from(err: CreateAwsLogSourceError) -> Self
fn from(err: CreateAwsLogSourceError) -> Self
Source§impl From<CreateCustomLogSourceError> for Error
impl From<CreateCustomLogSourceError> for Error
Source§fn from(err: CreateCustomLogSourceError) -> Self
fn from(err: CreateCustomLogSourceError) -> Self
Source§impl From<CreateDataLakeError> for Error
impl From<CreateDataLakeError> for Error
Source§fn from(err: CreateDataLakeError) -> Self
fn from(err: CreateDataLakeError) -> Self
Source§impl From<CreateDataLakeExceptionSubscriptionError> for Error
impl From<CreateDataLakeExceptionSubscriptionError> for Error
Source§fn from(err: CreateDataLakeExceptionSubscriptionError) -> Self
fn from(err: CreateDataLakeExceptionSubscriptionError) -> Self
Source§impl From<CreateDataLakeOrganizationConfigurationError> for Error
impl From<CreateDataLakeOrganizationConfigurationError> for Error
Source§fn from(err: CreateDataLakeOrganizationConfigurationError) -> Self
fn from(err: CreateDataLakeOrganizationConfigurationError) -> Self
Source§impl From<CreateSubscriberError> for Error
impl From<CreateSubscriberError> for Error
Source§fn from(err: CreateSubscriberError) -> Self
fn from(err: CreateSubscriberError) -> Self
Source§impl From<CreateSubscriberNotificationError> for Error
impl From<CreateSubscriberNotificationError> for Error
Source§fn from(err: CreateSubscriberNotificationError) -> Self
fn from(err: CreateSubscriberNotificationError) -> Self
Source§impl From<DeleteAwsLogSourceError> for Error
impl From<DeleteAwsLogSourceError> for Error
Source§fn from(err: DeleteAwsLogSourceError) -> Self
fn from(err: DeleteAwsLogSourceError) -> Self
Source§impl From<DeleteCustomLogSourceError> for Error
impl From<DeleteCustomLogSourceError> for Error
Source§fn from(err: DeleteCustomLogSourceError) -> Self
fn from(err: DeleteCustomLogSourceError) -> Self
Source§impl From<DeleteDataLakeError> for Error
impl From<DeleteDataLakeError> for Error
Source§fn from(err: DeleteDataLakeError) -> Self
fn from(err: DeleteDataLakeError) -> Self
Source§impl From<DeleteDataLakeExceptionSubscriptionError> for Error
impl From<DeleteDataLakeExceptionSubscriptionError> for Error
Source§fn from(err: DeleteDataLakeExceptionSubscriptionError) -> Self
fn from(err: DeleteDataLakeExceptionSubscriptionError) -> Self
Source§impl From<DeleteDataLakeOrganizationConfigurationError> for Error
impl From<DeleteDataLakeOrganizationConfigurationError> for Error
Source§fn from(err: DeleteDataLakeOrganizationConfigurationError) -> Self
fn from(err: DeleteDataLakeOrganizationConfigurationError) -> Self
Source§impl From<DeleteSubscriberError> for Error
impl From<DeleteSubscriberError> for Error
Source§fn from(err: DeleteSubscriberError) -> Self
fn from(err: DeleteSubscriberError) -> Self
Source§impl From<DeleteSubscriberNotificationError> for Error
impl From<DeleteSubscriberNotificationError> for Error
Source§fn from(err: DeleteSubscriberNotificationError) -> Self
fn from(err: DeleteSubscriberNotificationError) -> Self
Source§impl From<DeregisterDataLakeDelegatedAdministratorError> for Error
impl From<DeregisterDataLakeDelegatedAdministratorError> for Error
Source§fn from(err: DeregisterDataLakeDelegatedAdministratorError) -> Self
fn from(err: DeregisterDataLakeDelegatedAdministratorError) -> Self
Source§impl From<GetDataLakeExceptionSubscriptionError> for Error
impl From<GetDataLakeExceptionSubscriptionError> for Error
Source§fn from(err: GetDataLakeExceptionSubscriptionError) -> Self
fn from(err: GetDataLakeExceptionSubscriptionError) -> Self
Source§impl From<GetDataLakeOrganizationConfigurationError> for Error
impl From<GetDataLakeOrganizationConfigurationError> for Error
Source§fn from(err: GetDataLakeOrganizationConfigurationError) -> Self
fn from(err: GetDataLakeOrganizationConfigurationError) -> Self
Source§impl From<GetDataLakeSourcesError> for Error
impl From<GetDataLakeSourcesError> for Error
Source§fn from(err: GetDataLakeSourcesError) -> Self
fn from(err: GetDataLakeSourcesError) -> Self
Source§impl From<GetSubscriberError> for Error
impl From<GetSubscriberError> for Error
Source§fn from(err: GetSubscriberError) -> Self
fn from(err: GetSubscriberError) -> Self
Source§impl From<ListDataLakeExceptionsError> for Error
impl From<ListDataLakeExceptionsError> for Error
Source§fn from(err: ListDataLakeExceptionsError) -> Self
fn from(err: ListDataLakeExceptionsError) -> Self
Source§impl From<ListDataLakesError> for Error
impl From<ListDataLakesError> for Error
Source§fn from(err: ListDataLakesError) -> Self
fn from(err: ListDataLakesError) -> Self
Source§impl From<ListLogSourcesError> for Error
impl From<ListLogSourcesError> for Error
Source§fn from(err: ListLogSourcesError) -> Self
fn from(err: ListLogSourcesError) -> Self
Source§impl From<ListSubscribersError> for Error
impl From<ListSubscribersError> for Error
Source§fn from(err: ListSubscribersError) -> Self
fn from(err: ListSubscribersError) -> 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<RegisterDataLakeDelegatedAdministratorError> for Error
impl From<RegisterDataLakeDelegatedAdministratorError> for Error
Source§fn from(err: RegisterDataLakeDelegatedAdministratorError) -> Self
fn from(err: RegisterDataLakeDelegatedAdministratorError) -> Self
Source§impl<R> From<SdkError<CreateAwsLogSourceError, R>> for Error
impl<R> From<SdkError<CreateAwsLogSourceError, R>> for Error
Source§fn from(err: SdkError<CreateAwsLogSourceError, R>) -> Self
fn from(err: SdkError<CreateAwsLogSourceError, R>) -> Self
Source§impl<R> From<SdkError<CreateCustomLogSourceError, R>> for Error
impl<R> From<SdkError<CreateCustomLogSourceError, R>> for Error
Source§fn from(err: SdkError<CreateCustomLogSourceError, R>) -> Self
fn from(err: SdkError<CreateCustomLogSourceError, R>) -> Self
Source§impl<R> From<SdkError<CreateDataLakeError, R>> for Error
impl<R> From<SdkError<CreateDataLakeError, R>> for Error
Source§fn from(err: SdkError<CreateDataLakeError, R>) -> Self
fn from(err: SdkError<CreateDataLakeError, R>) -> Self
Source§impl<R> From<SdkError<CreateDataLakeExceptionSubscriptionError, R>> for Error
impl<R> From<SdkError<CreateDataLakeExceptionSubscriptionError, R>> for Error
Source§fn from(err: SdkError<CreateDataLakeExceptionSubscriptionError, R>) -> Self
fn from(err: SdkError<CreateDataLakeExceptionSubscriptionError, R>) -> Self
Source§impl<R> From<SdkError<CreateDataLakeOrganizationConfigurationError, R>> for Error
impl<R> From<SdkError<CreateDataLakeOrganizationConfigurationError, R>> for Error
Source§fn from(err: SdkError<CreateDataLakeOrganizationConfigurationError, R>) -> Self
fn from(err: SdkError<CreateDataLakeOrganizationConfigurationError, R>) -> Self
Source§impl<R> From<SdkError<CreateSubscriberError, R>> for Error
impl<R> From<SdkError<CreateSubscriberError, R>> for Error
Source§fn from(err: SdkError<CreateSubscriberError, R>) -> Self
fn from(err: SdkError<CreateSubscriberError, R>) -> Self
Source§impl<R> From<SdkError<CreateSubscriberNotificationError, R>> for Error
impl<R> From<SdkError<CreateSubscriberNotificationError, R>> for Error
Source§fn from(err: SdkError<CreateSubscriberNotificationError, R>) -> Self
fn from(err: SdkError<CreateSubscriberNotificationError, R>) -> Self
Source§impl<R> From<SdkError<DeleteAwsLogSourceError, R>> for Error
impl<R> From<SdkError<DeleteAwsLogSourceError, R>> for Error
Source§fn from(err: SdkError<DeleteAwsLogSourceError, R>) -> Self
fn from(err: SdkError<DeleteAwsLogSourceError, R>) -> Self
Source§impl<R> From<SdkError<DeleteCustomLogSourceError, R>> for Error
impl<R> From<SdkError<DeleteCustomLogSourceError, R>> for Error
Source§fn from(err: SdkError<DeleteCustomLogSourceError, R>) -> Self
fn from(err: SdkError<DeleteCustomLogSourceError, R>) -> Self
Source§impl<R> From<SdkError<DeleteDataLakeError, R>> for Error
impl<R> From<SdkError<DeleteDataLakeError, R>> for Error
Source§fn from(err: SdkError<DeleteDataLakeError, R>) -> Self
fn from(err: SdkError<DeleteDataLakeError, R>) -> Self
Source§impl<R> From<SdkError<DeleteDataLakeExceptionSubscriptionError, R>> for Error
impl<R> From<SdkError<DeleteDataLakeExceptionSubscriptionError, R>> for Error
Source§fn from(err: SdkError<DeleteDataLakeExceptionSubscriptionError, R>) -> Self
fn from(err: SdkError<DeleteDataLakeExceptionSubscriptionError, R>) -> Self
Source§impl<R> From<SdkError<DeleteDataLakeOrganizationConfigurationError, R>> for Error
impl<R> From<SdkError<DeleteDataLakeOrganizationConfigurationError, R>> for Error
Source§fn from(err: SdkError<DeleteDataLakeOrganizationConfigurationError, R>) -> Self
fn from(err: SdkError<DeleteDataLakeOrganizationConfigurationError, R>) -> Self
Source§impl<R> From<SdkError<DeleteSubscriberError, R>> for Error
impl<R> From<SdkError<DeleteSubscriberError, R>> for Error
Source§fn from(err: SdkError<DeleteSubscriberError, R>) -> Self
fn from(err: SdkError<DeleteSubscriberError, R>) -> Self
Source§impl<R> From<SdkError<DeleteSubscriberNotificationError, R>> for Error
impl<R> From<SdkError<DeleteSubscriberNotificationError, R>> for Error
Source§fn from(err: SdkError<DeleteSubscriberNotificationError, R>) -> Self
fn from(err: SdkError<DeleteSubscriberNotificationError, R>) -> Self
Source§impl<R> From<SdkError<DeregisterDataLakeDelegatedAdministratorError, R>> for Error
impl<R> From<SdkError<DeregisterDataLakeDelegatedAdministratorError, R>> for Error
Source§fn from(err: SdkError<DeregisterDataLakeDelegatedAdministratorError, R>) -> Self
fn from(err: SdkError<DeregisterDataLakeDelegatedAdministratorError, R>) -> Self
Source§impl<R> From<SdkError<GetDataLakeExceptionSubscriptionError, R>> for Error
impl<R> From<SdkError<GetDataLakeExceptionSubscriptionError, R>> for Error
Source§fn from(err: SdkError<GetDataLakeExceptionSubscriptionError, R>) -> Self
fn from(err: SdkError<GetDataLakeExceptionSubscriptionError, R>) -> Self
Source§impl<R> From<SdkError<GetDataLakeOrganizationConfigurationError, R>> for Error
impl<R> From<SdkError<GetDataLakeOrganizationConfigurationError, R>> for Error
Source§fn from(err: SdkError<GetDataLakeOrganizationConfigurationError, R>) -> Self
fn from(err: SdkError<GetDataLakeOrganizationConfigurationError, R>) -> Self
Source§impl<R> From<SdkError<GetDataLakeSourcesError, R>> for Error
impl<R> From<SdkError<GetDataLakeSourcesError, R>> for Error
Source§fn from(err: SdkError<GetDataLakeSourcesError, R>) -> Self
fn from(err: SdkError<GetDataLakeSourcesError, R>) -> Self
Source§impl<R> From<SdkError<GetSubscriberError, R>> for Error
impl<R> From<SdkError<GetSubscriberError, R>> for Error
Source§fn from(err: SdkError<GetSubscriberError, R>) -> Self
fn from(err: SdkError<GetSubscriberError, R>) -> Self
Source§impl<R> From<SdkError<ListDataLakeExceptionsError, R>> for Error
impl<R> From<SdkError<ListDataLakeExceptionsError, R>> for Error
Source§fn from(err: SdkError<ListDataLakeExceptionsError, R>) -> Self
fn from(err: SdkError<ListDataLakeExceptionsError, R>) -> Self
Source§impl<R> From<SdkError<ListDataLakesError, R>> for Error
impl<R> From<SdkError<ListDataLakesError, R>> for Error
Source§fn from(err: SdkError<ListDataLakesError, R>) -> Self
fn from(err: SdkError<ListDataLakesError, R>) -> Self
Source§impl<R> From<SdkError<ListLogSourcesError, R>> for Error
impl<R> From<SdkError<ListLogSourcesError, R>> for Error
Source§fn from(err: SdkError<ListLogSourcesError, R>) -> Self
fn from(err: SdkError<ListLogSourcesError, R>) -> Self
Source§impl<R> From<SdkError<ListSubscribersError, R>> for Error
impl<R> From<SdkError<ListSubscribersError, R>> for Error
Source§fn from(err: SdkError<ListSubscribersError, R>) -> Self
fn from(err: SdkError<ListSubscribersError, 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<RegisterDataLakeDelegatedAdministratorError, R>> for Error
impl<R> From<SdkError<RegisterDataLakeDelegatedAdministratorError, R>> for Error
Source§fn from(err: SdkError<RegisterDataLakeDelegatedAdministratorError, R>) -> Self
fn from(err: SdkError<RegisterDataLakeDelegatedAdministratorError, 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<UpdateDataLakeError, R>> for Error
impl<R> From<SdkError<UpdateDataLakeError, R>> for Error
Source§fn from(err: SdkError<UpdateDataLakeError, R>) -> Self
fn from(err: SdkError<UpdateDataLakeError, R>) -> Self
Source§impl<R> From<SdkError<UpdateDataLakeExceptionSubscriptionError, R>> for Error
impl<R> From<SdkError<UpdateDataLakeExceptionSubscriptionError, R>> for Error
Source§fn from(err: SdkError<UpdateDataLakeExceptionSubscriptionError, R>) -> Self
fn from(err: SdkError<UpdateDataLakeExceptionSubscriptionError, R>) -> Self
Source§impl<R> From<SdkError<UpdateSubscriberError, R>> for Error
impl<R> From<SdkError<UpdateSubscriberError, R>> for Error
Source§fn from(err: SdkError<UpdateSubscriberError, R>) -> Self
fn from(err: SdkError<UpdateSubscriberError, R>) -> Self
Source§impl<R> From<SdkError<UpdateSubscriberNotificationError, R>> for Error
impl<R> From<SdkError<UpdateSubscriberNotificationError, R>> for Error
Source§fn from(err: SdkError<UpdateSubscriberNotificationError, R>) -> Self
fn from(err: SdkError<UpdateSubscriberNotificationError, 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<UpdateDataLakeError> for Error
impl From<UpdateDataLakeError> for Error
Source§fn from(err: UpdateDataLakeError) -> Self
fn from(err: UpdateDataLakeError) -> Self
Source§impl From<UpdateDataLakeExceptionSubscriptionError> for Error
impl From<UpdateDataLakeExceptionSubscriptionError> for Error
Source§fn from(err: UpdateDataLakeExceptionSubscriptionError) -> Self
fn from(err: UpdateDataLakeExceptionSubscriptionError) -> Self
Source§impl From<UpdateSubscriberError> for Error
impl From<UpdateSubscriberError> for Error
Source§fn from(err: UpdateSubscriberError) -> Self
fn from(err: UpdateSubscriberError) -> Self
Source§impl From<UpdateSubscriberNotificationError> for Error
impl From<UpdateSubscriberNotificationError> for Error
Source§fn from(err: UpdateSubscriberNotificationError) -> Self
fn from(err: UpdateSubscriberNotificationError) -> 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);