#[non_exhaustive]pub struct InstancePatchStateBuilder { /* private fields */ }
Expand description
A builder for InstancePatchState
.
Implementations§
Source§impl InstancePatchStateBuilder
impl InstancePatchStateBuilder
Sourcepub fn instance_id(self, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The ID of the managed node the high-level patch compliance information was collected for.
This field is required.Sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The ID of the managed node the high-level patch compliance information was collected for.
Sourcepub fn get_instance_id(&self) -> &Option<String>
pub fn get_instance_id(&self) -> &Option<String>
The ID of the managed node the high-level patch compliance information was collected for.
Sourcepub fn patch_group(self, input: impl Into<String>) -> Self
pub fn patch_group(self, input: impl Into<String>) -> Self
The name of the patch group the managed node belongs to.
This field is required.Sourcepub fn set_patch_group(self, input: Option<String>) -> Self
pub fn set_patch_group(self, input: Option<String>) -> Self
The name of the patch group the managed node belongs to.
Sourcepub fn get_patch_group(&self) -> &Option<String>
pub fn get_patch_group(&self) -> &Option<String>
The name of the patch group the managed node belongs to.
Sourcepub fn baseline_id(self, input: impl Into<String>) -> Self
pub fn baseline_id(self, input: impl Into<String>) -> Self
The ID of the patch baseline used to patch the managed node.
This field is required.Sourcepub fn set_baseline_id(self, input: Option<String>) -> Self
pub fn set_baseline_id(self, input: Option<String>) -> Self
The ID of the patch baseline used to patch the managed node.
Sourcepub fn get_baseline_id(&self) -> &Option<String>
pub fn get_baseline_id(&self) -> &Option<String>
The ID of the patch baseline used to patch the managed node.
Sourcepub fn snapshot_id(self, input: impl Into<String>) -> Self
pub fn snapshot_id(self, input: impl Into<String>) -> Self
The ID of the patch baseline snapshot used during the patching operation when this compliance data was collected.
Sourcepub fn set_snapshot_id(self, input: Option<String>) -> Self
pub fn set_snapshot_id(self, input: Option<String>) -> Self
The ID of the patch baseline snapshot used during the patching operation when this compliance data was collected.
Sourcepub fn get_snapshot_id(&self) -> &Option<String>
pub fn get_snapshot_id(&self) -> &Option<String>
The ID of the patch baseline snapshot used during the patching operation when this compliance data was collected.
Sourcepub fn install_override_list(self, input: impl Into<String>) -> Self
pub fn install_override_list(self, input: impl Into<String>) -> Self
An https URL or an Amazon Simple Storage Service (Amazon S3) path-style URL to a list of patches to be installed. This patch installation list, which you maintain in an S3 bucket in YAML format and specify in the SSM document AWS-RunPatchBaseline
, overrides the patches specified by the default patch baseline.
For more information about the InstallOverrideList
parameter, see SSM Command document for patching: AWS-RunPatchBaseline
in the Amazon Web Services Systems Manager User Guide.
Sourcepub fn set_install_override_list(self, input: Option<String>) -> Self
pub fn set_install_override_list(self, input: Option<String>) -> Self
An https URL or an Amazon Simple Storage Service (Amazon S3) path-style URL to a list of patches to be installed. This patch installation list, which you maintain in an S3 bucket in YAML format and specify in the SSM document AWS-RunPatchBaseline
, overrides the patches specified by the default patch baseline.
For more information about the InstallOverrideList
parameter, see SSM Command document for patching: AWS-RunPatchBaseline
in the Amazon Web Services Systems Manager User Guide.
Sourcepub fn get_install_override_list(&self) -> &Option<String>
pub fn get_install_override_list(&self) -> &Option<String>
An https URL or an Amazon Simple Storage Service (Amazon S3) path-style URL to a list of patches to be installed. This patch installation list, which you maintain in an S3 bucket in YAML format and specify in the SSM document AWS-RunPatchBaseline
, overrides the patches specified by the default patch baseline.
For more information about the InstallOverrideList
parameter, see SSM Command document for patching: AWS-RunPatchBaseline
in the Amazon Web Services Systems Manager User Guide.
Sourcepub fn owner_information(self, input: impl Into<String>) -> Self
pub fn owner_information(self, input: impl Into<String>) -> Self
Placeholder information. This field will always be empty in the current release of the service.
Sourcepub fn set_owner_information(self, input: Option<String>) -> Self
pub fn set_owner_information(self, input: Option<String>) -> Self
Placeholder information. This field will always be empty in the current release of the service.
Sourcepub fn get_owner_information(&self) -> &Option<String>
pub fn get_owner_information(&self) -> &Option<String>
Placeholder information. This field will always be empty in the current release of the service.
Sourcepub fn installed_count(self, input: i32) -> Self
pub fn installed_count(self, input: i32) -> Self
The number of patches from the patch baseline that are installed on the managed node.
Sourcepub fn set_installed_count(self, input: Option<i32>) -> Self
pub fn set_installed_count(self, input: Option<i32>) -> Self
The number of patches from the patch baseline that are installed on the managed node.
Sourcepub fn get_installed_count(&self) -> &Option<i32>
pub fn get_installed_count(&self) -> &Option<i32>
The number of patches from the patch baseline that are installed on the managed node.
Sourcepub fn installed_other_count(self, input: i32) -> Self
pub fn installed_other_count(self, input: i32) -> Self
The number of patches not specified in the patch baseline that are installed on the managed node.
Sourcepub fn set_installed_other_count(self, input: Option<i32>) -> Self
pub fn set_installed_other_count(self, input: Option<i32>) -> Self
The number of patches not specified in the patch baseline that are installed on the managed node.
Sourcepub fn get_installed_other_count(&self) -> &Option<i32>
pub fn get_installed_other_count(&self) -> &Option<i32>
The number of patches not specified in the patch baseline that are installed on the managed node.
Sourcepub fn installed_pending_reboot_count(self, input: i32) -> Self
pub fn installed_pending_reboot_count(self, input: i32) -> Self
The number of patches installed by Patch Manager since the last time the managed node was rebooted.
Sourcepub fn set_installed_pending_reboot_count(self, input: Option<i32>) -> Self
pub fn set_installed_pending_reboot_count(self, input: Option<i32>) -> Self
The number of patches installed by Patch Manager since the last time the managed node was rebooted.
Sourcepub fn get_installed_pending_reboot_count(&self) -> &Option<i32>
pub fn get_installed_pending_reboot_count(&self) -> &Option<i32>
The number of patches installed by Patch Manager since the last time the managed node was rebooted.
Sourcepub fn installed_rejected_count(self, input: i32) -> Self
pub fn installed_rejected_count(self, input: i32) -> Self
The number of patches installed on a managed node that are specified in a RejectedPatches
list. Patches with a status of InstalledRejected
were typically installed before they were added to a RejectedPatches
list.
If ALLOW_AS_DEPENDENCY
is the specified option for RejectedPatchesAction
, the value of InstalledRejectedCount
will always be 0
(zero).
Sourcepub fn set_installed_rejected_count(self, input: Option<i32>) -> Self
pub fn set_installed_rejected_count(self, input: Option<i32>) -> Self
The number of patches installed on a managed node that are specified in a RejectedPatches
list. Patches with a status of InstalledRejected
were typically installed before they were added to a RejectedPatches
list.
If ALLOW_AS_DEPENDENCY
is the specified option for RejectedPatchesAction
, the value of InstalledRejectedCount
will always be 0
(zero).
Sourcepub fn get_installed_rejected_count(&self) -> &Option<i32>
pub fn get_installed_rejected_count(&self) -> &Option<i32>
The number of patches installed on a managed node that are specified in a RejectedPatches
list. Patches with a status of InstalledRejected
were typically installed before they were added to a RejectedPatches
list.
If ALLOW_AS_DEPENDENCY
is the specified option for RejectedPatchesAction
, the value of InstalledRejectedCount
will always be 0
(zero).
Sourcepub fn missing_count(self, input: i32) -> Self
pub fn missing_count(self, input: i32) -> Self
The number of patches from the patch baseline that are applicable for the managed node but aren't currently installed.
Sourcepub fn set_missing_count(self, input: Option<i32>) -> Self
pub fn set_missing_count(self, input: Option<i32>) -> Self
The number of patches from the patch baseline that are applicable for the managed node but aren't currently installed.
Sourcepub fn get_missing_count(&self) -> &Option<i32>
pub fn get_missing_count(&self) -> &Option<i32>
The number of patches from the patch baseline that are applicable for the managed node but aren't currently installed.
Sourcepub fn failed_count(self, input: i32) -> Self
pub fn failed_count(self, input: i32) -> Self
The number of patches from the patch baseline that were attempted to be installed during the last patching operation, but failed to install.
Sourcepub fn set_failed_count(self, input: Option<i32>) -> Self
pub fn set_failed_count(self, input: Option<i32>) -> Self
The number of patches from the patch baseline that were attempted to be installed during the last patching operation, but failed to install.
Sourcepub fn get_failed_count(&self) -> &Option<i32>
pub fn get_failed_count(&self) -> &Option<i32>
The number of patches from the patch baseline that were attempted to be installed during the last patching operation, but failed to install.
Sourcepub fn unreported_not_applicable_count(self, input: i32) -> Self
pub fn unreported_not_applicable_count(self, input: i32) -> Self
The number of patches beyond the supported limit of NotApplicableCount
that aren't reported by name to Inventory. Inventory is a tool in Amazon Web Services Systems Manager.
Sourcepub fn set_unreported_not_applicable_count(self, input: Option<i32>) -> Self
pub fn set_unreported_not_applicable_count(self, input: Option<i32>) -> Self
The number of patches beyond the supported limit of NotApplicableCount
that aren't reported by name to Inventory. Inventory is a tool in Amazon Web Services Systems Manager.
Sourcepub fn get_unreported_not_applicable_count(&self) -> &Option<i32>
pub fn get_unreported_not_applicable_count(&self) -> &Option<i32>
The number of patches beyond the supported limit of NotApplicableCount
that aren't reported by name to Inventory. Inventory is a tool in Amazon Web Services Systems Manager.
Sourcepub fn not_applicable_count(self, input: i32) -> Self
pub fn not_applicable_count(self, input: i32) -> Self
The number of patches from the patch baseline that aren't applicable for the managed node and therefore aren't installed on the node. This number may be truncated if the list of patch names is very large. The number of patches beyond this limit are reported in UnreportedNotApplicableCount
.
Sourcepub fn set_not_applicable_count(self, input: Option<i32>) -> Self
pub fn set_not_applicable_count(self, input: Option<i32>) -> Self
The number of patches from the patch baseline that aren't applicable for the managed node and therefore aren't installed on the node. This number may be truncated if the list of patch names is very large. The number of patches beyond this limit are reported in UnreportedNotApplicableCount
.
Sourcepub fn get_not_applicable_count(&self) -> &Option<i32>
pub fn get_not_applicable_count(&self) -> &Option<i32>
The number of patches from the patch baseline that aren't applicable for the managed node and therefore aren't installed on the node. This number may be truncated if the list of patch names is very large. The number of patches beyond this limit are reported in UnreportedNotApplicableCount
.
Sourcepub fn available_security_update_count(self, input: i32) -> Self
pub fn available_security_update_count(self, input: i32) -> Self
The number of security-related patches that are available but not approved because they didn't meet the patch baseline requirements. For example, an updated version of a patch might have been released before the specified auto-approval period was over.
Applies to Windows Server managed nodes only.
Sourcepub fn set_available_security_update_count(self, input: Option<i32>) -> Self
pub fn set_available_security_update_count(self, input: Option<i32>) -> Self
The number of security-related patches that are available but not approved because they didn't meet the patch baseline requirements. For example, an updated version of a patch might have been released before the specified auto-approval period was over.
Applies to Windows Server managed nodes only.
Sourcepub fn get_available_security_update_count(&self) -> &Option<i32>
pub fn get_available_security_update_count(&self) -> &Option<i32>
The number of security-related patches that are available but not approved because they didn't meet the patch baseline requirements. For example, an updated version of a patch might have been released before the specified auto-approval period was over.
Applies to Windows Server managed nodes only.
Sourcepub fn operation_start_time(self, input: DateTime) -> Self
pub fn operation_start_time(self, input: DateTime) -> Self
The time the most recent patching operation was started on the managed node.
This field is required.Sourcepub fn set_operation_start_time(self, input: Option<DateTime>) -> Self
pub fn set_operation_start_time(self, input: Option<DateTime>) -> Self
The time the most recent patching operation was started on the managed node.
Sourcepub fn get_operation_start_time(&self) -> &Option<DateTime>
pub fn get_operation_start_time(&self) -> &Option<DateTime>
The time the most recent patching operation was started on the managed node.
Sourcepub fn operation_end_time(self, input: DateTime) -> Self
pub fn operation_end_time(self, input: DateTime) -> Self
The time the most recent patching operation completed on the managed node.
This field is required.Sourcepub fn set_operation_end_time(self, input: Option<DateTime>) -> Self
pub fn set_operation_end_time(self, input: Option<DateTime>) -> Self
The time the most recent patching operation completed on the managed node.
Sourcepub fn get_operation_end_time(&self) -> &Option<DateTime>
pub fn get_operation_end_time(&self) -> &Option<DateTime>
The time the most recent patching operation completed on the managed node.
Sourcepub fn operation(self, input: PatchOperationType) -> Self
pub fn operation(self, input: PatchOperationType) -> Self
The type of patching operation that was performed: or
-
SCAN
assesses the patch compliance state. -
INSTALL
installs missing patches.
Sourcepub fn set_operation(self, input: Option<PatchOperationType>) -> Self
pub fn set_operation(self, input: Option<PatchOperationType>) -> Self
The type of patching operation that was performed: or
-
SCAN
assesses the patch compliance state. -
INSTALL
installs missing patches.
Sourcepub fn get_operation(&self) -> &Option<PatchOperationType>
pub fn get_operation(&self) -> &Option<PatchOperationType>
The type of patching operation that was performed: or
-
SCAN
assesses the patch compliance state. -
INSTALL
installs missing patches.
Sourcepub fn last_no_reboot_install_operation_time(self, input: DateTime) -> Self
pub fn last_no_reboot_install_operation_time(self, input: DateTime) -> Self
The time of the last attempt to patch the managed node with NoReboot
specified as the reboot option.
Sourcepub fn set_last_no_reboot_install_operation_time(
self,
input: Option<DateTime>,
) -> Self
pub fn set_last_no_reboot_install_operation_time( self, input: Option<DateTime>, ) -> Self
The time of the last attempt to patch the managed node with NoReboot
specified as the reboot option.
Sourcepub fn get_last_no_reboot_install_operation_time(&self) -> &Option<DateTime>
pub fn get_last_no_reboot_install_operation_time(&self) -> &Option<DateTime>
The time of the last attempt to patch the managed node with NoReboot
specified as the reboot option.
Sourcepub fn reboot_option(self, input: RebootOption) -> Self
pub fn reboot_option(self, input: RebootOption) -> Self
Indicates the reboot option specified in the patch baseline.
Reboot options apply to Install
operations only. Reboots aren't attempted for Patch Manager Scan
operations.
-
RebootIfNeeded
: Patch Manager tries to reboot the managed node if it installed any patches, or if any patches are detected with a status ofInstalledPendingReboot
. -
NoReboot
: Patch Manager attempts to install missing packages without trying to reboot the system. Patches installed with this option are assigned a status ofInstalledPendingReboot
. These patches might not be in effect until a reboot is performed.
Sourcepub fn set_reboot_option(self, input: Option<RebootOption>) -> Self
pub fn set_reboot_option(self, input: Option<RebootOption>) -> Self
Indicates the reboot option specified in the patch baseline.
Reboot options apply to Install
operations only. Reboots aren't attempted for Patch Manager Scan
operations.
-
RebootIfNeeded
: Patch Manager tries to reboot the managed node if it installed any patches, or if any patches are detected with a status ofInstalledPendingReboot
. -
NoReboot
: Patch Manager attempts to install missing packages without trying to reboot the system. Patches installed with this option are assigned a status ofInstalledPendingReboot
. These patches might not be in effect until a reboot is performed.
Sourcepub fn get_reboot_option(&self) -> &Option<RebootOption>
pub fn get_reboot_option(&self) -> &Option<RebootOption>
Indicates the reboot option specified in the patch baseline.
Reboot options apply to Install
operations only. Reboots aren't attempted for Patch Manager Scan
operations.
-
RebootIfNeeded
: Patch Manager tries to reboot the managed node if it installed any patches, or if any patches are detected with a status ofInstalledPendingReboot
. -
NoReboot
: Patch Manager attempts to install missing packages without trying to reboot the system. Patches installed with this option are assigned a status ofInstalledPendingReboot
. These patches might not be in effect until a reboot is performed.
Sourcepub fn critical_non_compliant_count(self, input: i32) -> Self
pub fn critical_non_compliant_count(self, input: i32) -> Self
The number of patches per node that are specified as Critical
for compliance reporting in the patch baseline aren't installed. These patches might be missing, have failed installation, were rejected, or were installed but awaiting a required managed node reboot. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn set_critical_non_compliant_count(self, input: Option<i32>) -> Self
pub fn set_critical_non_compliant_count(self, input: Option<i32>) -> Self
The number of patches per node that are specified as Critical
for compliance reporting in the patch baseline aren't installed. These patches might be missing, have failed installation, were rejected, or were installed but awaiting a required managed node reboot. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn get_critical_non_compliant_count(&self) -> &Option<i32>
pub fn get_critical_non_compliant_count(&self) -> &Option<i32>
The number of patches per node that are specified as Critical
for compliance reporting in the patch baseline aren't installed. These patches might be missing, have failed installation, were rejected, or were installed but awaiting a required managed node reboot. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn security_non_compliant_count(self, input: i32) -> Self
pub fn security_non_compliant_count(self, input: i32) -> Self
The number of patches per node that are specified as Security
in a patch advisory aren't installed. These patches might be missing, have failed installation, were rejected, or were installed but awaiting a required managed node reboot. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn set_security_non_compliant_count(self, input: Option<i32>) -> Self
pub fn set_security_non_compliant_count(self, input: Option<i32>) -> Self
The number of patches per node that are specified as Security
in a patch advisory aren't installed. These patches might be missing, have failed installation, were rejected, or were installed but awaiting a required managed node reboot. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn get_security_non_compliant_count(&self) -> &Option<i32>
pub fn get_security_non_compliant_count(&self) -> &Option<i32>
The number of patches per node that are specified as Security
in a patch advisory aren't installed. These patches might be missing, have failed installation, were rejected, or were installed but awaiting a required managed node reboot. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn other_non_compliant_count(self, input: i32) -> Self
pub fn other_non_compliant_count(self, input: i32) -> Self
The number of patches per node that are specified as other than Critical
or Security
but aren't compliant with the patch baseline. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn set_other_non_compliant_count(self, input: Option<i32>) -> Self
pub fn set_other_non_compliant_count(self, input: Option<i32>) -> Self
The number of patches per node that are specified as other than Critical
or Security
but aren't compliant with the patch baseline. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn get_other_non_compliant_count(&self) -> &Option<i32>
pub fn get_other_non_compliant_count(&self) -> &Option<i32>
The number of patches per node that are specified as other than Critical
or Security
but aren't compliant with the patch baseline. The status of these managed nodes is NON_COMPLIANT
.
Sourcepub fn build(self) -> Result<InstancePatchState, BuildError>
pub fn build(self) -> Result<InstancePatchState, BuildError>
Consumes the builder and constructs a InstancePatchState
.
This method will fail if any of the following fields are not set:
Trait Implementations§
Source§impl Clone for InstancePatchStateBuilder
impl Clone for InstancePatchStateBuilder
Source§fn clone(&self) -> InstancePatchStateBuilder
fn clone(&self) -> InstancePatchStateBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for InstancePatchStateBuilder
impl Debug for InstancePatchStateBuilder
Source§impl Default for InstancePatchStateBuilder
impl Default for InstancePatchStateBuilder
Source§fn default() -> InstancePatchStateBuilder
fn default() -> InstancePatchStateBuilder
impl StructuralPartialEq for InstancePatchStateBuilder
Auto Trait Implementations§
impl Freeze for InstancePatchStateBuilder
impl RefUnwindSafe for InstancePatchStateBuilder
impl Send for InstancePatchStateBuilder
impl Sync for InstancePatchStateBuilder
impl Unpin for InstancePatchStateBuilder
impl UnwindSafe for InstancePatchStateBuilder
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);