#[non_exhaustive]pub struct MicrosoftSqlServerSettingsBuilder { /* private fields */ }
Expand description
A builder for MicrosoftSqlServerSettings
.
Implementations§
Source§impl MicrosoftSqlServerSettingsBuilder
impl MicrosoftSqlServerSettingsBuilder
Sourcepub fn bcp_packet_size(self, input: i32) -> Self
pub fn bcp_packet_size(self, input: i32) -> Self
The maximum size of the packets (in bytes) used to transfer data using BCP.
Sourcepub fn set_bcp_packet_size(self, input: Option<i32>) -> Self
pub fn set_bcp_packet_size(self, input: Option<i32>) -> Self
The maximum size of the packets (in bytes) used to transfer data using BCP.
Sourcepub fn get_bcp_packet_size(&self) -> &Option<i32>
pub fn get_bcp_packet_size(&self) -> &Option<i32>
The maximum size of the packets (in bytes) used to transfer data using BCP.
Sourcepub fn database_name(self, input: impl Into<String>) -> Self
pub fn database_name(self, input: impl Into<String>) -> Self
Database name for the endpoint.
Sourcepub fn set_database_name(self, input: Option<String>) -> Self
pub fn set_database_name(self, input: Option<String>) -> Self
Database name for the endpoint.
Sourcepub fn get_database_name(&self) -> &Option<String>
pub fn get_database_name(&self) -> &Option<String>
Database name for the endpoint.
Sourcepub fn control_tables_file_group(self, input: impl Into<String>) -> Self
pub fn control_tables_file_group(self, input: impl Into<String>) -> Self
Specifies a file group for the DMS internal tables. When the replication task starts, all the internal DMS control tables (awsdms_ apply_exception, awsdms_apply, awsdms_changes) are created for the specified file group.
Sourcepub fn set_control_tables_file_group(self, input: Option<String>) -> Self
pub fn set_control_tables_file_group(self, input: Option<String>) -> Self
Specifies a file group for the DMS internal tables. When the replication task starts, all the internal DMS control tables (awsdms_ apply_exception, awsdms_apply, awsdms_changes) are created for the specified file group.
Sourcepub fn get_control_tables_file_group(&self) -> &Option<String>
pub fn get_control_tables_file_group(&self) -> &Option<String>
Specifies a file group for the DMS internal tables. When the replication task starts, all the internal DMS control tables (awsdms_ apply_exception, awsdms_apply, awsdms_changes) are created for the specified file group.
Sourcepub fn set_password(self, input: Option<String>) -> Self
pub fn set_password(self, input: Option<String>) -> Self
Endpoint connection password.
Sourcepub fn get_password(&self) -> &Option<String>
pub fn get_password(&self) -> &Option<String>
Endpoint connection password.
Sourcepub fn query_single_always_on_node(self, input: bool) -> Self
pub fn query_single_always_on_node(self, input: bool) -> Self
Cleans and recreates table metadata information on the replication instance when a mismatch occurs. An example is a situation where running an alter DDL statement on a table might result in different information about the table cached in the replication instance.
Sourcepub fn set_query_single_always_on_node(self, input: Option<bool>) -> Self
pub fn set_query_single_always_on_node(self, input: Option<bool>) -> Self
Cleans and recreates table metadata information on the replication instance when a mismatch occurs. An example is a situation where running an alter DDL statement on a table might result in different information about the table cached in the replication instance.
Sourcepub fn get_query_single_always_on_node(&self) -> &Option<bool>
pub fn get_query_single_always_on_node(&self) -> &Option<bool>
Cleans and recreates table metadata information on the replication instance when a mismatch occurs. An example is a situation where running an alter DDL statement on a table might result in different information about the table cached in the replication instance.
Sourcepub fn read_backup_only(self, input: bool) -> Self
pub fn read_backup_only(self, input: bool) -> Self
When this attribute is set to Y
, DMS only reads changes from transaction log backups and doesn't read from the active transaction log file during ongoing replication. Setting this parameter to Y
enables you to control active transaction log file growth during full load and ongoing replication tasks. However, it can add some source latency to ongoing replication.
Sourcepub fn set_read_backup_only(self, input: Option<bool>) -> Self
pub fn set_read_backup_only(self, input: Option<bool>) -> Self
When this attribute is set to Y
, DMS only reads changes from transaction log backups and doesn't read from the active transaction log file during ongoing replication. Setting this parameter to Y
enables you to control active transaction log file growth during full load and ongoing replication tasks. However, it can add some source latency to ongoing replication.
Sourcepub fn get_read_backup_only(&self) -> &Option<bool>
pub fn get_read_backup_only(&self) -> &Option<bool>
When this attribute is set to Y
, DMS only reads changes from transaction log backups and doesn't read from the active transaction log file during ongoing replication. Setting this parameter to Y
enables you to control active transaction log file growth during full load and ongoing replication tasks. However, it can add some source latency to ongoing replication.
Sourcepub fn safeguard_policy(self, input: SafeguardPolicy) -> Self
pub fn safeguard_policy(self, input: SafeguardPolicy) -> Self
Use this attribute to minimize the need to access the backup log and enable DMS to prevent truncation using one of the following two methods.
Start transactions in the database: This is the default method. When this method is used, DMS prevents TLOG truncation by mimicking a transaction in the database. As long as such a transaction is open, changes that appear after the transaction started aren't truncated. If you need Microsoft Replication to be enabled in your database, then you must choose this method.
Exclusively use sp_repldone within a single task: When this method is used, DMS reads the changes and then uses sp_repldone to mark the TLOG transactions as ready for truncation. Although this method doesn't involve any transactional activities, it can only be used when Microsoft Replication isn't running. Also, when using this method, only one DMS task can access the database at any given time. Therefore, if you need to run parallel DMS tasks against the same database, use the default method.
Sourcepub fn set_safeguard_policy(self, input: Option<SafeguardPolicy>) -> Self
pub fn set_safeguard_policy(self, input: Option<SafeguardPolicy>) -> Self
Use this attribute to minimize the need to access the backup log and enable DMS to prevent truncation using one of the following two methods.
Start transactions in the database: This is the default method. When this method is used, DMS prevents TLOG truncation by mimicking a transaction in the database. As long as such a transaction is open, changes that appear after the transaction started aren't truncated. If you need Microsoft Replication to be enabled in your database, then you must choose this method.
Exclusively use sp_repldone within a single task: When this method is used, DMS reads the changes and then uses sp_repldone to mark the TLOG transactions as ready for truncation. Although this method doesn't involve any transactional activities, it can only be used when Microsoft Replication isn't running. Also, when using this method, only one DMS task can access the database at any given time. Therefore, if you need to run parallel DMS tasks against the same database, use the default method.
Sourcepub fn get_safeguard_policy(&self) -> &Option<SafeguardPolicy>
pub fn get_safeguard_policy(&self) -> &Option<SafeguardPolicy>
Use this attribute to minimize the need to access the backup log and enable DMS to prevent truncation using one of the following two methods.
Start transactions in the database: This is the default method. When this method is used, DMS prevents TLOG truncation by mimicking a transaction in the database. As long as such a transaction is open, changes that appear after the transaction started aren't truncated. If you need Microsoft Replication to be enabled in your database, then you must choose this method.
Exclusively use sp_repldone within a single task: When this method is used, DMS reads the changes and then uses sp_repldone to mark the TLOG transactions as ready for truncation. Although this method doesn't involve any transactional activities, it can only be used when Microsoft Replication isn't running. Also, when using this method, only one DMS task can access the database at any given time. Therefore, if you need to run parallel DMS tasks against the same database, use the default method.
Sourcepub fn server_name(self, input: impl Into<String>) -> Self
pub fn server_name(self, input: impl Into<String>) -> Self
Fully qualified domain name of the endpoint. For an Amazon RDS SQL Server instance, this is the output of DescribeDBInstances, in the Endpoint.Address
field.
Sourcepub fn set_server_name(self, input: Option<String>) -> Self
pub fn set_server_name(self, input: Option<String>) -> Self
Fully qualified domain name of the endpoint. For an Amazon RDS SQL Server instance, this is the output of DescribeDBInstances, in the Endpoint.Address
field.
Sourcepub fn get_server_name(&self) -> &Option<String>
pub fn get_server_name(&self) -> &Option<String>
Fully qualified domain name of the endpoint. For an Amazon RDS SQL Server instance, this is the output of DescribeDBInstances, in the Endpoint.Address
field.
Sourcepub fn set_username(self, input: Option<String>) -> Self
pub fn set_username(self, input: Option<String>) -> Self
Endpoint connection user name.
Sourcepub fn get_username(&self) -> &Option<String>
pub fn get_username(&self) -> &Option<String>
Endpoint connection user name.
Sourcepub fn use_bcp_full_load(self, input: bool) -> Self
pub fn use_bcp_full_load(self, input: bool) -> Self
Use this to attribute to transfer data for full-load operations using BCP. When the target table contains an identity column that does not exist in the source table, you must disable the use BCP for loading table option.
Sourcepub fn set_use_bcp_full_load(self, input: Option<bool>) -> Self
pub fn set_use_bcp_full_load(self, input: Option<bool>) -> Self
Use this to attribute to transfer data for full-load operations using BCP. When the target table contains an identity column that does not exist in the source table, you must disable the use BCP for loading table option.
Sourcepub fn get_use_bcp_full_load(&self) -> &Option<bool>
pub fn get_use_bcp_full_load(&self) -> &Option<bool>
Use this to attribute to transfer data for full-load operations using BCP. When the target table contains an identity column that does not exist in the source table, you must disable the use BCP for loading table option.
Sourcepub fn use_third_party_backup_device(self, input: bool) -> Self
pub fn use_third_party_backup_device(self, input: bool) -> Self
When this attribute is set to Y
, DMS processes third-party transaction log backups if they are created in native format.
Sourcepub fn set_use_third_party_backup_device(self, input: Option<bool>) -> Self
pub fn set_use_third_party_backup_device(self, input: Option<bool>) -> Self
When this attribute is set to Y
, DMS processes third-party transaction log backups if they are created in native format.
Sourcepub fn get_use_third_party_backup_device(&self) -> &Option<bool>
pub fn get_use_third_party_backup_device(&self) -> &Option<bool>
When this attribute is set to Y
, DMS processes third-party transaction log backups if they are created in native format.
Sourcepub fn secrets_manager_access_role_arn(self, input: impl Into<String>) -> Self
pub fn secrets_manager_access_role_arn(self, input: impl Into<String>) -> Self
The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret
. The role must allow the iam:PassRole
action. SecretsManagerSecret
has the value of the Amazon Web Services Secrets Manager secret that allows access to the SQL Server endpoint.
You can specify one of two sets of values for these permissions. You can specify the values for this setting and SecretsManagerSecretId
. Or you can specify clear-text values for UserName
, Password
, ServerName
, and Port
. You can't specify both. For more information on creating this SecretsManagerSecret
and the SecretsManagerAccessRoleArn
and SecretsManagerSecretId
required to access it, see Using secrets to access Database Migration Service resources in the Database Migration Service User Guide.
Sourcepub fn set_secrets_manager_access_role_arn(self, input: Option<String>) -> Self
pub fn set_secrets_manager_access_role_arn(self, input: Option<String>) -> Self
The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret
. The role must allow the iam:PassRole
action. SecretsManagerSecret
has the value of the Amazon Web Services Secrets Manager secret that allows access to the SQL Server endpoint.
You can specify one of two sets of values for these permissions. You can specify the values for this setting and SecretsManagerSecretId
. Or you can specify clear-text values for UserName
, Password
, ServerName
, and Port
. You can't specify both. For more information on creating this SecretsManagerSecret
and the SecretsManagerAccessRoleArn
and SecretsManagerSecretId
required to access it, see Using secrets to access Database Migration Service resources in the Database Migration Service User Guide.
Sourcepub fn get_secrets_manager_access_role_arn(&self) -> &Option<String>
pub fn get_secrets_manager_access_role_arn(&self) -> &Option<String>
The full Amazon Resource Name (ARN) of the IAM role that specifies DMS as the trusted entity and grants the required permissions to access the value in SecretsManagerSecret
. The role must allow the iam:PassRole
action. SecretsManagerSecret
has the value of the Amazon Web Services Secrets Manager secret that allows access to the SQL Server endpoint.
You can specify one of two sets of values for these permissions. You can specify the values for this setting and SecretsManagerSecretId
. Or you can specify clear-text values for UserName
, Password
, ServerName
, and Port
. You can't specify both. For more information on creating this SecretsManagerSecret
and the SecretsManagerAccessRoleArn
and SecretsManagerSecretId
required to access it, see Using secrets to access Database Migration Service resources in the Database Migration Service User Guide.
Sourcepub fn secrets_manager_secret_id(self, input: impl Into<String>) -> Self
pub fn secrets_manager_secret_id(self, input: impl Into<String>) -> Self
The full ARN, partial ARN, or friendly name of the SecretsManagerSecret
that contains the SQL Server endpoint connection details.
Sourcepub fn set_secrets_manager_secret_id(self, input: Option<String>) -> Self
pub fn set_secrets_manager_secret_id(self, input: Option<String>) -> Self
The full ARN, partial ARN, or friendly name of the SecretsManagerSecret
that contains the SQL Server endpoint connection details.
Sourcepub fn get_secrets_manager_secret_id(&self) -> &Option<String>
pub fn get_secrets_manager_secret_id(&self) -> &Option<String>
The full ARN, partial ARN, or friendly name of the SecretsManagerSecret
that contains the SQL Server endpoint connection details.
Sourcepub fn trim_space_in_char(self, input: bool) -> Self
pub fn trim_space_in_char(self, input: bool) -> Self
Use the TrimSpaceInChar
source endpoint setting to right-trim data on CHAR and NCHAR data types during migration. Setting TrimSpaceInChar
does not left-trim data. The default value is true
.
Sourcepub fn set_trim_space_in_char(self, input: Option<bool>) -> Self
pub fn set_trim_space_in_char(self, input: Option<bool>) -> Self
Use the TrimSpaceInChar
source endpoint setting to right-trim data on CHAR and NCHAR data types during migration. Setting TrimSpaceInChar
does not left-trim data. The default value is true
.
Sourcepub fn get_trim_space_in_char(&self) -> &Option<bool>
pub fn get_trim_space_in_char(&self) -> &Option<bool>
Use the TrimSpaceInChar
source endpoint setting to right-trim data on CHAR and NCHAR data types during migration. Setting TrimSpaceInChar
does not left-trim data. The default value is true
.
Sourcepub fn tlog_access_mode(self, input: TlogAccessMode) -> Self
pub fn tlog_access_mode(self, input: TlogAccessMode) -> Self
Indicates the mode used to fetch CDC data.
Sourcepub fn set_tlog_access_mode(self, input: Option<TlogAccessMode>) -> Self
pub fn set_tlog_access_mode(self, input: Option<TlogAccessMode>) -> Self
Indicates the mode used to fetch CDC data.
Sourcepub fn get_tlog_access_mode(&self) -> &Option<TlogAccessMode>
pub fn get_tlog_access_mode(&self) -> &Option<TlogAccessMode>
Indicates the mode used to fetch CDC data.
Sourcepub fn force_lob_lookup(self, input: bool) -> Self
pub fn force_lob_lookup(self, input: bool) -> Self
Forces LOB lookup on inline LOB.
Sourcepub fn set_force_lob_lookup(self, input: Option<bool>) -> Self
pub fn set_force_lob_lookup(self, input: Option<bool>) -> Self
Forces LOB lookup on inline LOB.
Sourcepub fn get_force_lob_lookup(&self) -> &Option<bool>
pub fn get_force_lob_lookup(&self) -> &Option<bool>
Forces LOB lookup on inline LOB.
Sourcepub fn authentication_method(self, input: SqlServerAuthenticationMethod) -> Self
pub fn authentication_method(self, input: SqlServerAuthenticationMethod) -> Self
Specifies using Kerberos authentication with Microsoft SQL Server.
Sourcepub fn set_authentication_method(
self,
input: Option<SqlServerAuthenticationMethod>,
) -> Self
pub fn set_authentication_method( self, input: Option<SqlServerAuthenticationMethod>, ) -> Self
Specifies using Kerberos authentication with Microsoft SQL Server.
Sourcepub fn get_authentication_method(
&self,
) -> &Option<SqlServerAuthenticationMethod>
pub fn get_authentication_method( &self, ) -> &Option<SqlServerAuthenticationMethod>
Specifies using Kerberos authentication with Microsoft SQL Server.
Sourcepub fn build(self) -> MicrosoftSqlServerSettings
pub fn build(self) -> MicrosoftSqlServerSettings
Consumes the builder and constructs a MicrosoftSqlServerSettings
.
Trait Implementations§
Source§impl Clone for MicrosoftSqlServerSettingsBuilder
impl Clone for MicrosoftSqlServerSettingsBuilder
Source§fn clone(&self) -> MicrosoftSqlServerSettingsBuilder
fn clone(&self) -> MicrosoftSqlServerSettingsBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for MicrosoftSqlServerSettingsBuilder
impl Default for MicrosoftSqlServerSettingsBuilder
Source§fn default() -> MicrosoftSqlServerSettingsBuilder
fn default() -> MicrosoftSqlServerSettingsBuilder
Source§impl PartialEq for MicrosoftSqlServerSettingsBuilder
impl PartialEq for MicrosoftSqlServerSettingsBuilder
Source§fn eq(&self, other: &MicrosoftSqlServerSettingsBuilder) -> bool
fn eq(&self, other: &MicrosoftSqlServerSettingsBuilder) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for MicrosoftSqlServerSettingsBuilder
Auto Trait Implementations§
impl Freeze for MicrosoftSqlServerSettingsBuilder
impl RefUnwindSafe for MicrosoftSqlServerSettingsBuilder
impl Send for MicrosoftSqlServerSettingsBuilder
impl Sync for MicrosoftSqlServerSettingsBuilder
impl Unpin for MicrosoftSqlServerSettingsBuilder
impl UnwindSafe for MicrosoftSqlServerSettingsBuilder
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>
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);