#[non_exhaustive]pub struct MemberDetailBuilder { /* private fields */ }
Expand description
A builder for MemberDetail
.
Implementations§
Source§impl MemberDetailBuilder
impl MemberDetailBuilder
Sourcepub fn account_id(self, input: impl Into<String>) -> Self
pub fn account_id(self, input: impl Into<String>) -> Self
The Amazon Web Services account identifier for the member account.
Sourcepub fn set_account_id(self, input: Option<String>) -> Self
pub fn set_account_id(self, input: Option<String>) -> Self
The Amazon Web Services account identifier for the member account.
Sourcepub fn get_account_id(&self) -> &Option<String>
pub fn get_account_id(&self) -> &Option<String>
The Amazon Web Services account identifier for the member account.
Sourcepub fn email_address(self, input: impl Into<String>) -> Self
pub fn email_address(self, input: impl Into<String>) -> Self
The Amazon Web Services account root user email address for the member account.
Sourcepub fn set_email_address(self, input: Option<String>) -> Self
pub fn set_email_address(self, input: Option<String>) -> Self
The Amazon Web Services account root user email address for the member account.
Sourcepub fn get_email_address(&self) -> &Option<String>
pub fn get_email_address(&self) -> &Option<String>
The Amazon Web Services account root user email address for the member account.
Sourcepub fn set_graph_arn(self, input: Option<String>) -> Self
pub fn set_graph_arn(self, input: Option<String>) -> Self
The ARN of the behavior graph.
Sourcepub fn get_graph_arn(&self) -> &Option<String>
pub fn get_graph_arn(&self) -> &Option<String>
The ARN of the behavior graph.
Sourcepub fn master_id(self, input: impl Into<String>) -> Self
👎Deprecated: This property is deprecated. Use AdministratorId instead.
pub fn master_id(self, input: impl Into<String>) -> Self
The Amazon Web Services account identifier of the administrator account for the behavior graph.
Sourcepub fn set_master_id(self, input: Option<String>) -> Self
👎Deprecated: This property is deprecated. Use AdministratorId instead.
pub fn set_master_id(self, input: Option<String>) -> Self
The Amazon Web Services account identifier of the administrator account for the behavior graph.
Sourcepub fn get_master_id(&self) -> &Option<String>
👎Deprecated: This property is deprecated. Use AdministratorId instead.
pub fn get_master_id(&self) -> &Option<String>
The Amazon Web Services account identifier of the administrator account for the behavior graph.
Sourcepub fn administrator_id(self, input: impl Into<String>) -> Self
pub fn administrator_id(self, input: impl Into<String>) -> Self
The Amazon Web Services account identifier of the administrator account for the behavior graph.
Sourcepub fn set_administrator_id(self, input: Option<String>) -> Self
pub fn set_administrator_id(self, input: Option<String>) -> Self
The Amazon Web Services account identifier of the administrator account for the behavior graph.
Sourcepub fn get_administrator_id(&self) -> &Option<String>
pub fn get_administrator_id(&self) -> &Option<String>
The Amazon Web Services account identifier of the administrator account for the behavior graph.
Sourcepub fn status(self, input: MemberStatus) -> Self
pub fn status(self, input: MemberStatus) -> Self
The current membership status of the member account. The status can have one of the following values:
-
INVITED
- For invited accounts only. Indicates that the member was sent an invitation but has not yet responded. -
VERIFICATION_IN_PROGRESS
- For invited accounts only, indicates that Detective is verifying that the account identifier and email address provided for the member account match. If they do match, then Detective sends the invitation. If the email address and account identifier don't match, then the member cannot be added to the behavior graph.For organization accounts in the organization behavior graph, indicates that Detective is verifying that the account belongs to the organization.
-
VERIFICATION_FAILED
- For invited accounts only. Indicates that the account and email address provided for the member account do not match, and Detective did not send an invitation to the account. -
ENABLED
- Indicates that the member account currently contributes data to the behavior graph. For invited accounts, the member account accepted the invitation. For organization accounts in the organization behavior graph, the Detective administrator account enabled the organization account as a member account. -
ACCEPTED_BUT_DISABLED
- The account accepted the invitation, or was enabled by the Detective administrator account, but is prevented from contributing data to the behavior graph.DisabledReason
provides the reason why the member account is not enabled.
Invited accounts that declined an invitation or that were removed from the behavior graph are not included. In the organization behavior graph, organization accounts that the Detective administrator account did not enable are not included.
Sourcepub fn set_status(self, input: Option<MemberStatus>) -> Self
pub fn set_status(self, input: Option<MemberStatus>) -> Self
The current membership status of the member account. The status can have one of the following values:
-
INVITED
- For invited accounts only. Indicates that the member was sent an invitation but has not yet responded. -
VERIFICATION_IN_PROGRESS
- For invited accounts only, indicates that Detective is verifying that the account identifier and email address provided for the member account match. If they do match, then Detective sends the invitation. If the email address and account identifier don't match, then the member cannot be added to the behavior graph.For organization accounts in the organization behavior graph, indicates that Detective is verifying that the account belongs to the organization.
-
VERIFICATION_FAILED
- For invited accounts only. Indicates that the account and email address provided for the member account do not match, and Detective did not send an invitation to the account. -
ENABLED
- Indicates that the member account currently contributes data to the behavior graph. For invited accounts, the member account accepted the invitation. For organization accounts in the organization behavior graph, the Detective administrator account enabled the organization account as a member account. -
ACCEPTED_BUT_DISABLED
- The account accepted the invitation, or was enabled by the Detective administrator account, but is prevented from contributing data to the behavior graph.DisabledReason
provides the reason why the member account is not enabled.
Invited accounts that declined an invitation or that were removed from the behavior graph are not included. In the organization behavior graph, organization accounts that the Detective administrator account did not enable are not included.
Sourcepub fn get_status(&self) -> &Option<MemberStatus>
pub fn get_status(&self) -> &Option<MemberStatus>
The current membership status of the member account. The status can have one of the following values:
-
INVITED
- For invited accounts only. Indicates that the member was sent an invitation but has not yet responded. -
VERIFICATION_IN_PROGRESS
- For invited accounts only, indicates that Detective is verifying that the account identifier and email address provided for the member account match. If they do match, then Detective sends the invitation. If the email address and account identifier don't match, then the member cannot be added to the behavior graph.For organization accounts in the organization behavior graph, indicates that Detective is verifying that the account belongs to the organization.
-
VERIFICATION_FAILED
- For invited accounts only. Indicates that the account and email address provided for the member account do not match, and Detective did not send an invitation to the account. -
ENABLED
- Indicates that the member account currently contributes data to the behavior graph. For invited accounts, the member account accepted the invitation. For organization accounts in the organization behavior graph, the Detective administrator account enabled the organization account as a member account. -
ACCEPTED_BUT_DISABLED
- The account accepted the invitation, or was enabled by the Detective administrator account, but is prevented from contributing data to the behavior graph.DisabledReason
provides the reason why the member account is not enabled.
Invited accounts that declined an invitation or that were removed from the behavior graph are not included. In the organization behavior graph, organization accounts that the Detective administrator account did not enable are not included.
Sourcepub fn disabled_reason(self, input: MemberDisabledReason) -> Self
pub fn disabled_reason(self, input: MemberDisabledReason) -> Self
For member accounts with a status of ACCEPTED_BUT_DISABLED
, the reason that the member account is not enabled.
The reason can have one of the following values:
-
VOLUME_TOO_HIGH
- Indicates that adding the member account would cause the data volume for the behavior graph to be too high. -
VOLUME_UNKNOWN
- Indicates that Detective is unable to verify the data volume for the member account. This is usually because the member account is not enrolled in Amazon GuardDuty.
Sourcepub fn set_disabled_reason(self, input: Option<MemberDisabledReason>) -> Self
pub fn set_disabled_reason(self, input: Option<MemberDisabledReason>) -> Self
For member accounts with a status of ACCEPTED_BUT_DISABLED
, the reason that the member account is not enabled.
The reason can have one of the following values:
-
VOLUME_TOO_HIGH
- Indicates that adding the member account would cause the data volume for the behavior graph to be too high. -
VOLUME_UNKNOWN
- Indicates that Detective is unable to verify the data volume for the member account. This is usually because the member account is not enrolled in Amazon GuardDuty.
Sourcepub fn get_disabled_reason(&self) -> &Option<MemberDisabledReason>
pub fn get_disabled_reason(&self) -> &Option<MemberDisabledReason>
For member accounts with a status of ACCEPTED_BUT_DISABLED
, the reason that the member account is not enabled.
The reason can have one of the following values:
-
VOLUME_TOO_HIGH
- Indicates that adding the member account would cause the data volume for the behavior graph to be too high. -
VOLUME_UNKNOWN
- Indicates that Detective is unable to verify the data volume for the member account. This is usually because the member account is not enrolled in Amazon GuardDuty.
Sourcepub fn invited_time(self, input: DateTime) -> Self
pub fn invited_time(self, input: DateTime) -> Self
For invited accounts, the date and time that Detective sent the invitation to the account. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn set_invited_time(self, input: Option<DateTime>) -> Self
pub fn set_invited_time(self, input: Option<DateTime>) -> Self
For invited accounts, the date and time that Detective sent the invitation to the account. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn get_invited_time(&self) -> &Option<DateTime>
pub fn get_invited_time(&self) -> &Option<DateTime>
For invited accounts, the date and time that Detective sent the invitation to the account. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn updated_time(self, input: DateTime) -> Self
pub fn updated_time(self, input: DateTime) -> Self
The date and time that the member account was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn set_updated_time(self, input: Option<DateTime>) -> Self
pub fn set_updated_time(self, input: Option<DateTime>) -> Self
The date and time that the member account was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn get_updated_time(&self) -> &Option<DateTime>
pub fn get_updated_time(&self) -> &Option<DateTime>
The date and time that the member account was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn volume_usage_in_bytes(self, input: i64) -> Self
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn volume_usage_in_bytes(self, input: i64) -> Self
The data volume in bytes per day for the member account.
Sourcepub fn set_volume_usage_in_bytes(self, input: Option<i64>) -> Self
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn set_volume_usage_in_bytes(self, input: Option<i64>) -> Self
The data volume in bytes per day for the member account.
Sourcepub fn get_volume_usage_in_bytes(&self) -> &Option<i64>
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn get_volume_usage_in_bytes(&self) -> &Option<i64>
The data volume in bytes per day for the member account.
Sourcepub fn volume_usage_updated_time(self, input: DateTime) -> Self
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn volume_usage_updated_time(self, input: DateTime) -> Self
The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn set_volume_usage_updated_time(self, input: Option<DateTime>) -> Self
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn set_volume_usage_updated_time(self, input: Option<DateTime>) -> Self
The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn get_volume_usage_updated_time(&self) -> &Option<DateTime>
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn get_volume_usage_updated_time(&self) -> &Option<DateTime>
The data and time when the member account data volume was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn percent_of_graph_utilization(self, input: f64) -> Self
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn percent_of_graph_utilization(self, input: f64) -> Self
The member account data volume as a percentage of the maximum allowed data volume. 0 indicates 0 percent, and 100 indicates 100 percent.
Note that this is not the percentage of the behavior graph data volume.
For example, the data volume for the behavior graph is 80 GB per day. The maximum data volume is 160 GB per day. If the data volume for the member account is 40 GB per day, then PercentOfGraphUtilization
is 25. It represents 25% of the maximum allowed data volume.
Sourcepub fn set_percent_of_graph_utilization(self, input: Option<f64>) -> Self
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn set_percent_of_graph_utilization(self, input: Option<f64>) -> Self
The member account data volume as a percentage of the maximum allowed data volume. 0 indicates 0 percent, and 100 indicates 100 percent.
Note that this is not the percentage of the behavior graph data volume.
For example, the data volume for the behavior graph is 80 GB per day. The maximum data volume is 160 GB per day. If the data volume for the member account is 40 GB per day, then PercentOfGraphUtilization
is 25. It represents 25% of the maximum allowed data volume.
Sourcepub fn get_percent_of_graph_utilization(&self) -> &Option<f64>
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn get_percent_of_graph_utilization(&self) -> &Option<f64>
The member account data volume as a percentage of the maximum allowed data volume. 0 indicates 0 percent, and 100 indicates 100 percent.
Note that this is not the percentage of the behavior graph data volume.
For example, the data volume for the behavior graph is 80 GB per day. The maximum data volume is 160 GB per day. If the data volume for the member account is 40 GB per day, then PercentOfGraphUtilization
is 25. It represents 25% of the maximum allowed data volume.
Sourcepub fn percent_of_graph_utilization_updated_time(self, input: DateTime) -> Self
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn percent_of_graph_utilization_updated_time(self, input: DateTime) -> Self
The date and time when the graph utilization percentage was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn set_percent_of_graph_utilization_updated_time(
self,
input: Option<DateTime>,
) -> Self
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn set_percent_of_graph_utilization_updated_time( self, input: Option<DateTime>, ) -> Self
The date and time when the graph utilization percentage was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn get_percent_of_graph_utilization_updated_time(&self) -> &Option<DateTime>
👎Deprecated: This property is deprecated. Use VolumeUsageByDatasourcePackage instead.
pub fn get_percent_of_graph_utilization_updated_time(&self) -> &Option<DateTime>
The date and time when the graph utilization percentage was last updated. The value is an ISO8601 formatted string. For example, 2021-08-18T16:35:56.284Z
.
Sourcepub fn invitation_type(self, input: InvitationType) -> Self
pub fn invitation_type(self, input: InvitationType) -> Self
The type of behavior graph membership.
For an organization account in the organization behavior graph, the type is ORGANIZATION
.
For an account that was invited to a behavior graph, the type is INVITATION
.
Sourcepub fn set_invitation_type(self, input: Option<InvitationType>) -> Self
pub fn set_invitation_type(self, input: Option<InvitationType>) -> Self
The type of behavior graph membership.
For an organization account in the organization behavior graph, the type is ORGANIZATION
.
For an account that was invited to a behavior graph, the type is INVITATION
.
Sourcepub fn get_invitation_type(&self) -> &Option<InvitationType>
pub fn get_invitation_type(&self) -> &Option<InvitationType>
The type of behavior graph membership.
For an organization account in the organization behavior graph, the type is ORGANIZATION
.
For an account that was invited to a behavior graph, the type is INVITATION
.
Sourcepub fn volume_usage_by_datasource_package(
self,
k: DatasourcePackage,
v: DatasourcePackageUsageInfo,
) -> Self
pub fn volume_usage_by_datasource_package( self, k: DatasourcePackage, v: DatasourcePackageUsageInfo, ) -> Self
Adds a key-value pair to volume_usage_by_datasource_package
.
To override the contents of this collection use set_volume_usage_by_datasource_package
.
Details on the volume of usage for each data source package in a behavior graph.
Sourcepub fn set_volume_usage_by_datasource_package(
self,
input: Option<HashMap<DatasourcePackage, DatasourcePackageUsageInfo>>,
) -> Self
pub fn set_volume_usage_by_datasource_package( self, input: Option<HashMap<DatasourcePackage, DatasourcePackageUsageInfo>>, ) -> Self
Details on the volume of usage for each data source package in a behavior graph.
Sourcepub fn get_volume_usage_by_datasource_package(
&self,
) -> &Option<HashMap<DatasourcePackage, DatasourcePackageUsageInfo>>
pub fn get_volume_usage_by_datasource_package( &self, ) -> &Option<HashMap<DatasourcePackage, DatasourcePackageUsageInfo>>
Details on the volume of usage for each data source package in a behavior graph.
Sourcepub fn datasource_package_ingest_states(
self,
k: DatasourcePackage,
v: DatasourcePackageIngestState,
) -> Self
pub fn datasource_package_ingest_states( self, k: DatasourcePackage, v: DatasourcePackageIngestState, ) -> Self
Adds a key-value pair to datasource_package_ingest_states
.
To override the contents of this collection use set_datasource_package_ingest_states
.
The state of a data source package for the behavior graph.
Sourcepub fn set_datasource_package_ingest_states(
self,
input: Option<HashMap<DatasourcePackage, DatasourcePackageIngestState>>,
) -> Self
pub fn set_datasource_package_ingest_states( self, input: Option<HashMap<DatasourcePackage, DatasourcePackageIngestState>>, ) -> Self
The state of a data source package for the behavior graph.
Sourcepub fn get_datasource_package_ingest_states(
&self,
) -> &Option<HashMap<DatasourcePackage, DatasourcePackageIngestState>>
pub fn get_datasource_package_ingest_states( &self, ) -> &Option<HashMap<DatasourcePackage, DatasourcePackageIngestState>>
The state of a data source package for the behavior graph.
Sourcepub fn build(self) -> MemberDetail
pub fn build(self) -> MemberDetail
Consumes the builder and constructs a MemberDetail
.
Trait Implementations§
Source§impl Clone for MemberDetailBuilder
impl Clone for MemberDetailBuilder
Source§fn clone(&self) -> MemberDetailBuilder
fn clone(&self) -> MemberDetailBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MemberDetailBuilder
impl Debug for MemberDetailBuilder
Source§impl Default for MemberDetailBuilder
impl Default for MemberDetailBuilder
Source§fn default() -> MemberDetailBuilder
fn default() -> MemberDetailBuilder
Source§impl PartialEq for MemberDetailBuilder
impl PartialEq for MemberDetailBuilder
impl StructuralPartialEq for MemberDetailBuilder
Auto Trait Implementations§
impl Freeze for MemberDetailBuilder
impl RefUnwindSafe for MemberDetailBuilder
impl Send for MemberDetailBuilder
impl Sync for MemberDetailBuilder
impl Unpin for MemberDetailBuilder
impl UnwindSafe for MemberDetailBuilder
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);