#[non_exhaustive]pub struct UserPoolType {Show 34 fields
pub id: Option<String>,
pub name: Option<String>,
pub policies: Option<UserPoolPolicyType>,
pub deletion_protection: Option<DeletionProtectionType>,
pub lambda_config: Option<LambdaConfigType>,
pub status: Option<StatusType>,
pub last_modified_date: Option<DateTime>,
pub creation_date: Option<DateTime>,
pub schema_attributes: Option<Vec<SchemaAttributeType>>,
pub auto_verified_attributes: Option<Vec<VerifiedAttributeType>>,
pub alias_attributes: Option<Vec<AliasAttributeType>>,
pub username_attributes: Option<Vec<UsernameAttributeType>>,
pub sms_verification_message: Option<String>,
pub email_verification_message: Option<String>,
pub email_verification_subject: Option<String>,
pub verification_message_template: Option<VerificationMessageTemplateType>,
pub sms_authentication_message: Option<String>,
pub user_attribute_update_settings: Option<UserAttributeUpdateSettingsType>,
pub mfa_configuration: Option<UserPoolMfaType>,
pub device_configuration: Option<DeviceConfigurationType>,
pub estimated_number_of_users: i32,
pub email_configuration: Option<EmailConfigurationType>,
pub sms_configuration: Option<SmsConfigurationType>,
pub user_pool_tags: Option<HashMap<String, String>>,
pub sms_configuration_failure: Option<String>,
pub email_configuration_failure: Option<String>,
pub domain: Option<String>,
pub custom_domain: Option<String>,
pub admin_create_user_config: Option<AdminCreateUserConfigType>,
pub user_pool_add_ons: Option<UserPoolAddOnsType>,
pub username_configuration: Option<UsernameConfigurationType>,
pub arn: Option<String>,
pub account_recovery_setting: Option<AccountRecoverySettingType>,
pub user_pool_tier: Option<UserPoolTierType>,
}
Expand description
The configuration of a user pool.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: Option<String>
The ID of the user pool.
name: Option<String>
The name of the user pool.
policies: Option<UserPoolPolicyType>
A list of user pool policies. Contains the policy that sets password-complexity requirements.
deletion_protection: Option<DeletionProtectionType>
When active, DeletionProtection
prevents accidental deletion of your user pool. Before you can delete a user pool that you have protected against deletion, you must deactivate this feature.
When you try to delete a protected user pool in a DeleteUserPool
API request, Amazon Cognito returns an InvalidParameterException
error. To delete a protected user pool, send a new DeleteUserPool
request after you deactivate deletion protection in an UpdateUserPool
API request.
lambda_config: Option<LambdaConfigType>
A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible stages of user pool operations. Triggers can modify the outcome of the operations that invoked them.
status: Option<StatusType>
This parameter is no longer used.
last_modified_date: Option<DateTime>
The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date
object.
creation_date: Option<DateTime>
The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date
object.
schema_attributes: Option<Vec<SchemaAttributeType>>
A list of the user attributes and their properties in your user pool. The attribute schema contains standard attributes, custom attributes with a custom:
prefix, and developer attributes with a dev:
prefix. For more information, see User pool attributes.
Developer-only attributes are a legacy feature of user pools, and are read-only to all app clients. You can create and update developer-only attributes only with IAM-authenticated API operations. Use app client read/write permissions instead.
auto_verified_attributes: Option<Vec<VerifiedAttributeType>>
The attributes that are auto-verified in a user pool.
alias_attributes: Option<Vec<AliasAttributeType>>
Attributes supported as an alias for this user pool. An alias is an attribute that users can enter as an alternative username. Possible values: phone_number, email, or preferred_username.
username_attributes: Option<Vec<UsernameAttributeType>>
Specifies whether a user can use an email address or phone number as a username when they sign up.
sms_verification_message: Option<String>
This parameter is no longer used.
email_verification_message: Option<String>
This parameter is no longer used.
email_verification_subject: Option<String>
This parameter is no longer used.
verification_message_template: Option<VerificationMessageTemplateType>
The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.
sms_authentication_message: Option<String>
The contents of the SMS authentication message.
user_attribute_update_settings: Option<UserAttributeUpdateSettingsType>
The settings for updates to user attributes. These settings include the property AttributesRequireVerificationBeforeUpdate
, a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For more information, see Verifying updates to email addresses and phone numbers.
mfa_configuration: Option<UserPoolMfaType>
Can be one of the following values:
-
OFF
- MFA tokens aren't required and can't be specified during user registration. -
ON
- MFA tokens are required for all user registrations. You can only specify required when you're initially creating a user pool. -
OPTIONAL
- Users have the option when registering to create an MFA token.
device_configuration: Option<DeviceConfigurationType>
The device-remembering configuration for a user pool. A null value indicates that you have deactivated device remembering in your user pool.
When you provide a value for any DeviceConfiguration
field, you activate the Amazon Cognito device-remembering feature.
estimated_number_of_users: i32
A number estimating the size of the user pool.
email_configuration: Option<EmailConfigurationType>
The email configuration of your user pool. The email configuration type sets your preferred sending method, Amazon Web Services Region, and sender for messages from your user pool.
sms_configuration: Option<SmsConfigurationType>
User pool configuration for delivery of SMS messages with Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an Identity and Access Management (IAM) role in your Amazon Web Services account.
The tags that are assigned to the user pool. A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.
sms_configuration_failure: Option<String>
The reason why the SMS configuration can't send the messages to your users.
This message might include comma-separated values to describe why your SMS configuration can't send messages to user pool end users.
- InvalidSmsRoleAccessPolicyException
-
The Identity and Access Management role that Amazon Cognito uses to send SMS messages isn't properly configured. For more information, see SmsConfigurationType.
- SNSSandbox
-
The Amazon Web Services account is in the SNS SMS Sandbox and messages will only reach verified end users. This parameter won’t get populated with SNSSandbox if the user creating the user pool doesn’t have SNS permissions. To learn how to move your Amazon Web Services account out of the sandbox, see Moving out of the SMS sandbox.
email_configuration_failure: Option<String>
Deprecated. Review error codes from API requests with EventSource:cognito-idp.amazonaws.com
in CloudTrail for information about problems with user pool email configuration.
domain: Option<String>
The domain prefix, if the user pool has a domain associated with it.
custom_domain: Option<String>
A custom domain name that you provide to Amazon Cognito. This parameter applies only if you use a custom domain to host the sign-up and sign-in pages for your application. An example of a custom domain name might be auth.example.com
.
For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.
admin_create_user_config: Option<AdminCreateUserConfigType>
The configuration for AdminCreateUser
requests.
user_pool_add_ons: Option<UserPoolAddOnsType>
Contains settings for activation of threat protection, including the operating mode and additional authentication types. To log user security information but take no action, set to AUDIT
. To configure automatic security responses to potentially unwanted traffic to your user pool, set to ENFORCED
.
For more information, see Adding advanced security to a user pool. To activate this setting, your user pool must be on the Plus tier.
username_configuration: Option<UsernameConfigurationType>
Case sensitivity of the username input for the selected sign-in option. When case sensitivity is set to False
(case insensitive), users can sign in with any combination of capital and lowercase letters. For example, username
, USERNAME
, or UserName
, or for email, email@example.com
or EMaiL@eXamplE.Com
. For most use cases, set case sensitivity to False
(case insensitive) as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.
arn: Option<String>
The Amazon Resource Name (ARN) of the user pool.
account_recovery_setting: Option<AccountRecoverySettingType>
The available verified method a user can use to recover their password when they call ForgotPassword
. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.
user_pool_tier: Option<UserPoolTierType>
The user pool feature plan, or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to ESSENTIALS
.
Implementations§
Source§impl UserPoolType
impl UserPoolType
Sourcepub fn policies(&self) -> Option<&UserPoolPolicyType>
pub fn policies(&self) -> Option<&UserPoolPolicyType>
A list of user pool policies. Contains the policy that sets password-complexity requirements.
Sourcepub fn deletion_protection(&self) -> Option<&DeletionProtectionType>
pub fn deletion_protection(&self) -> Option<&DeletionProtectionType>
When active, DeletionProtection
prevents accidental deletion of your user pool. Before you can delete a user pool that you have protected against deletion, you must deactivate this feature.
When you try to delete a protected user pool in a DeleteUserPool
API request, Amazon Cognito returns an InvalidParameterException
error. To delete a protected user pool, send a new DeleteUserPool
request after you deactivate deletion protection in an UpdateUserPool
API request.
Sourcepub fn lambda_config(&self) -> Option<&LambdaConfigType>
pub fn lambda_config(&self) -> Option<&LambdaConfigType>
A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible stages of user pool operations. Triggers can modify the outcome of the operations that invoked them.
Sourcepub fn status(&self) -> Option<&StatusType>
👎Deprecated: This property is no longer available.
pub fn status(&self) -> Option<&StatusType>
This parameter is no longer used.
Sourcepub fn last_modified_date(&self) -> Option<&DateTime>
pub fn last_modified_date(&self) -> Option<&DateTime>
The date and time when the item was modified. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date
object.
Sourcepub fn creation_date(&self) -> Option<&DateTime>
pub fn creation_date(&self) -> Option<&DateTime>
The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java Date
object.
Sourcepub fn schema_attributes(&self) -> &[SchemaAttributeType]
pub fn schema_attributes(&self) -> &[SchemaAttributeType]
A list of the user attributes and their properties in your user pool. The attribute schema contains standard attributes, custom attributes with a custom:
prefix, and developer attributes with a dev:
prefix. For more information, see User pool attributes.
Developer-only attributes are a legacy feature of user pools, and are read-only to all app clients. You can create and update developer-only attributes only with IAM-authenticated API operations. Use app client read/write permissions instead.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .schema_attributes.is_none()
.
Sourcepub fn auto_verified_attributes(&self) -> &[VerifiedAttributeType]
pub fn auto_verified_attributes(&self) -> &[VerifiedAttributeType]
The attributes that are auto-verified in a user pool.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .auto_verified_attributes.is_none()
.
Sourcepub fn alias_attributes(&self) -> &[AliasAttributeType]
pub fn alias_attributes(&self) -> &[AliasAttributeType]
Attributes supported as an alias for this user pool. An alias is an attribute that users can enter as an alternative username. Possible values: phone_number, email, or preferred_username.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .alias_attributes.is_none()
.
Sourcepub fn username_attributes(&self) -> &[UsernameAttributeType]
pub fn username_attributes(&self) -> &[UsernameAttributeType]
Specifies whether a user can use an email address or phone number as a username when they sign up.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .username_attributes.is_none()
.
Sourcepub fn sms_verification_message(&self) -> Option<&str>
pub fn sms_verification_message(&self) -> Option<&str>
This parameter is no longer used.
Sourcepub fn email_verification_message(&self) -> Option<&str>
pub fn email_verification_message(&self) -> Option<&str>
This parameter is no longer used.
Sourcepub fn email_verification_subject(&self) -> Option<&str>
pub fn email_verification_subject(&self) -> Option<&str>
This parameter is no longer used.
Sourcepub fn verification_message_template(
&self,
) -> Option<&VerificationMessageTemplateType>
pub fn verification_message_template( &self, ) -> Option<&VerificationMessageTemplateType>
The template for the verification message that your user pool delivers to users who set an email address or phone number attribute.
Sourcepub fn sms_authentication_message(&self) -> Option<&str>
pub fn sms_authentication_message(&self) -> Option<&str>
The contents of the SMS authentication message.
Sourcepub fn user_attribute_update_settings(
&self,
) -> Option<&UserAttributeUpdateSettingsType>
pub fn user_attribute_update_settings( &self, ) -> Option<&UserAttributeUpdateSettingsType>
The settings for updates to user attributes. These settings include the property AttributesRequireVerificationBeforeUpdate
, a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For more information, see Verifying updates to email addresses and phone numbers.
Sourcepub fn mfa_configuration(&self) -> Option<&UserPoolMfaType>
pub fn mfa_configuration(&self) -> Option<&UserPoolMfaType>
Can be one of the following values:
-
OFF
- MFA tokens aren't required and can't be specified during user registration. -
ON
- MFA tokens are required for all user registrations. You can only specify required when you're initially creating a user pool. -
OPTIONAL
- Users have the option when registering to create an MFA token.
Sourcepub fn device_configuration(&self) -> Option<&DeviceConfigurationType>
pub fn device_configuration(&self) -> Option<&DeviceConfigurationType>
The device-remembering configuration for a user pool. A null value indicates that you have deactivated device remembering in your user pool.
When you provide a value for any DeviceConfiguration
field, you activate the Amazon Cognito device-remembering feature.
Sourcepub fn estimated_number_of_users(&self) -> i32
pub fn estimated_number_of_users(&self) -> i32
A number estimating the size of the user pool.
Sourcepub fn email_configuration(&self) -> Option<&EmailConfigurationType>
pub fn email_configuration(&self) -> Option<&EmailConfigurationType>
The email configuration of your user pool. The email configuration type sets your preferred sending method, Amazon Web Services Region, and sender for messages from your user pool.
Sourcepub fn sms_configuration(&self) -> Option<&SmsConfigurationType>
pub fn sms_configuration(&self) -> Option<&SmsConfigurationType>
User pool configuration for delivery of SMS messages with Amazon Simple Notification Service. To send SMS messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an Identity and Access Management (IAM) role in your Amazon Web Services account.
The tags that are assigned to the user pool. A tag is a label that you can apply to user pools to categorize and manage them in different ways, such as by purpose, owner, environment, or other criteria.
Sourcepub fn sms_configuration_failure(&self) -> Option<&str>
pub fn sms_configuration_failure(&self) -> Option<&str>
The reason why the SMS configuration can't send the messages to your users.
This message might include comma-separated values to describe why your SMS configuration can't send messages to user pool end users.
- InvalidSmsRoleAccessPolicyException
-
The Identity and Access Management role that Amazon Cognito uses to send SMS messages isn't properly configured. For more information, see SmsConfigurationType.
- SNSSandbox
-
The Amazon Web Services account is in the SNS SMS Sandbox and messages will only reach verified end users. This parameter won’t get populated with SNSSandbox if the user creating the user pool doesn’t have SNS permissions. To learn how to move your Amazon Web Services account out of the sandbox, see Moving out of the SMS sandbox.
Sourcepub fn email_configuration_failure(&self) -> Option<&str>
pub fn email_configuration_failure(&self) -> Option<&str>
Deprecated. Review error codes from API requests with EventSource:cognito-idp.amazonaws.com
in CloudTrail for information about problems with user pool email configuration.
Sourcepub fn domain(&self) -> Option<&str>
pub fn domain(&self) -> Option<&str>
The domain prefix, if the user pool has a domain associated with it.
Sourcepub fn custom_domain(&self) -> Option<&str>
pub fn custom_domain(&self) -> Option<&str>
A custom domain name that you provide to Amazon Cognito. This parameter applies only if you use a custom domain to host the sign-up and sign-in pages for your application. An example of a custom domain name might be auth.example.com
.
For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.
Sourcepub fn admin_create_user_config(&self) -> Option<&AdminCreateUserConfigType>
pub fn admin_create_user_config(&self) -> Option<&AdminCreateUserConfigType>
The configuration for AdminCreateUser
requests.
Sourcepub fn user_pool_add_ons(&self) -> Option<&UserPoolAddOnsType>
pub fn user_pool_add_ons(&self) -> Option<&UserPoolAddOnsType>
Contains settings for activation of threat protection, including the operating mode and additional authentication types. To log user security information but take no action, set to AUDIT
. To configure automatic security responses to potentially unwanted traffic to your user pool, set to ENFORCED
.
For more information, see Adding advanced security to a user pool. To activate this setting, your user pool must be on the Plus tier.
Sourcepub fn username_configuration(&self) -> Option<&UsernameConfigurationType>
pub fn username_configuration(&self) -> Option<&UsernameConfigurationType>
Case sensitivity of the username input for the selected sign-in option. When case sensitivity is set to False
(case insensitive), users can sign in with any combination of capital and lowercase letters. For example, username
, USERNAME
, or UserName
, or for email, email@example.com
or EMaiL@eXamplE.Com
. For most use cases, set case sensitivity to False
(case insensitive) as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.
Sourcepub fn account_recovery_setting(&self) -> Option<&AccountRecoverySettingType>
pub fn account_recovery_setting(&self) -> Option<&AccountRecoverySettingType>
The available verified method a user can use to recover their password when they call ForgotPassword
. You can use this setting to define a preferred method when a user has more than one method available. With this setting, SMS doesn't qualify for a valid password recovery mechanism if the user also has SMS multi-factor authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy behavior to determine the recovery method where SMS is preferred through email.
Sourcepub fn user_pool_tier(&self) -> Option<&UserPoolTierType>
pub fn user_pool_tier(&self) -> Option<&UserPoolTierType>
The user pool feature plan, or tier. This parameter determines the eligibility of the user pool for features like managed login, access-token customization, and threat protection. Defaults to ESSENTIALS
.
Source§impl UserPoolType
impl UserPoolType
Sourcepub fn builder() -> UserPoolTypeBuilder
pub fn builder() -> UserPoolTypeBuilder
Creates a new builder-style object to manufacture UserPoolType
.
Trait Implementations§
Source§impl Clone for UserPoolType
impl Clone for UserPoolType
Source§fn clone(&self) -> UserPoolType
fn clone(&self) -> UserPoolType
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for UserPoolType
impl Debug for UserPoolType
Source§impl PartialEq for UserPoolType
impl PartialEq for UserPoolType
impl StructuralPartialEq for UserPoolType
Auto Trait Implementations§
impl Freeze for UserPoolType
impl RefUnwindSafe for UserPoolType
impl Send for UserPoolType
impl Sync for UserPoolType
impl Unpin for UserPoolType
impl UnwindSafe for UserPoolType
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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);