#[non_exhaustive]pub struct AutomationExecutionBuilder { /* private fields */ }
Expand description
A builder for AutomationExecution
.
Implementations§
Source§impl AutomationExecutionBuilder
impl AutomationExecutionBuilder
Sourcepub fn automation_execution_id(self, input: impl Into<String>) -> Self
pub fn automation_execution_id(self, input: impl Into<String>) -> Self
The execution ID.
Sourcepub fn set_automation_execution_id(self, input: Option<String>) -> Self
pub fn set_automation_execution_id(self, input: Option<String>) -> Self
The execution ID.
Sourcepub fn get_automation_execution_id(&self) -> &Option<String>
pub fn get_automation_execution_id(&self) -> &Option<String>
The execution ID.
Sourcepub fn document_name(self, input: impl Into<String>) -> Self
pub fn document_name(self, input: impl Into<String>) -> Self
The name of the Automation runbook used during the execution.
Sourcepub fn set_document_name(self, input: Option<String>) -> Self
pub fn set_document_name(self, input: Option<String>) -> Self
The name of the Automation runbook used during the execution.
Sourcepub fn get_document_name(&self) -> &Option<String>
pub fn get_document_name(&self) -> &Option<String>
The name of the Automation runbook used during the execution.
Sourcepub fn document_version(self, input: impl Into<String>) -> Self
pub fn document_version(self, input: impl Into<String>) -> Self
The version of the document to use during execution.
Sourcepub fn set_document_version(self, input: Option<String>) -> Self
pub fn set_document_version(self, input: Option<String>) -> Self
The version of the document to use during execution.
Sourcepub fn get_document_version(&self) -> &Option<String>
pub fn get_document_version(&self) -> &Option<String>
The version of the document to use during execution.
Sourcepub fn execution_start_time(self, input: DateTime) -> Self
pub fn execution_start_time(self, input: DateTime) -> Self
The time the execution started.
Sourcepub fn set_execution_start_time(self, input: Option<DateTime>) -> Self
pub fn set_execution_start_time(self, input: Option<DateTime>) -> Self
The time the execution started.
Sourcepub fn get_execution_start_time(&self) -> &Option<DateTime>
pub fn get_execution_start_time(&self) -> &Option<DateTime>
The time the execution started.
Sourcepub fn execution_end_time(self, input: DateTime) -> Self
pub fn execution_end_time(self, input: DateTime) -> Self
The time the execution finished.
Sourcepub fn set_execution_end_time(self, input: Option<DateTime>) -> Self
pub fn set_execution_end_time(self, input: Option<DateTime>) -> Self
The time the execution finished.
Sourcepub fn get_execution_end_time(&self) -> &Option<DateTime>
pub fn get_execution_end_time(&self) -> &Option<DateTime>
The time the execution finished.
Sourcepub fn automation_execution_status(
self,
input: AutomationExecutionStatus,
) -> Self
pub fn automation_execution_status( self, input: AutomationExecutionStatus, ) -> Self
The execution status of the Automation.
Sourcepub fn set_automation_execution_status(
self,
input: Option<AutomationExecutionStatus>,
) -> Self
pub fn set_automation_execution_status( self, input: Option<AutomationExecutionStatus>, ) -> Self
The execution status of the Automation.
Sourcepub fn get_automation_execution_status(
&self,
) -> &Option<AutomationExecutionStatus>
pub fn get_automation_execution_status( &self, ) -> &Option<AutomationExecutionStatus>
The execution status of the Automation.
Sourcepub fn step_executions(self, input: StepExecution) -> Self
pub fn step_executions(self, input: StepExecution) -> Self
Appends an item to step_executions
.
To override the contents of this collection use set_step_executions
.
A list of details about the current state of all steps that comprise an execution. An Automation runbook contains a list of steps that are run in order.
Sourcepub fn set_step_executions(self, input: Option<Vec<StepExecution>>) -> Self
pub fn set_step_executions(self, input: Option<Vec<StepExecution>>) -> Self
A list of details about the current state of all steps that comprise an execution. An Automation runbook contains a list of steps that are run in order.
Sourcepub fn get_step_executions(&self) -> &Option<Vec<StepExecution>>
pub fn get_step_executions(&self) -> &Option<Vec<StepExecution>>
A list of details about the current state of all steps that comprise an execution. An Automation runbook contains a list of steps that are run in order.
Sourcepub fn step_executions_truncated(self, input: bool) -> Self
pub fn step_executions_truncated(self, input: bool) -> Self
A boolean value that indicates if the response contains the full list of the Automation step executions. If true, use the DescribeAutomationStepExecutions API operation to get the full list of step executions.
Sourcepub fn set_step_executions_truncated(self, input: Option<bool>) -> Self
pub fn set_step_executions_truncated(self, input: Option<bool>) -> Self
A boolean value that indicates if the response contains the full list of the Automation step executions. If true, use the DescribeAutomationStepExecutions API operation to get the full list of step executions.
Sourcepub fn get_step_executions_truncated(&self) -> &Option<bool>
pub fn get_step_executions_truncated(&self) -> &Option<bool>
A boolean value that indicates if the response contains the full list of the Automation step executions. If true, use the DescribeAutomationStepExecutions API operation to get the full list of step executions.
Sourcepub fn parameters(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn parameters(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to parameters
.
To override the contents of this collection use set_parameters
.
The key-value map of execution parameters, which were supplied when calling StartAutomationExecution
.
Sourcepub fn set_parameters(self, input: Option<HashMap<String, Vec<String>>>) -> Self
pub fn set_parameters(self, input: Option<HashMap<String, Vec<String>>>) -> Self
The key-value map of execution parameters, which were supplied when calling StartAutomationExecution
.
Sourcepub fn get_parameters(&self) -> &Option<HashMap<String, Vec<String>>>
pub fn get_parameters(&self) -> &Option<HashMap<String, Vec<String>>>
The key-value map of execution parameters, which were supplied when calling StartAutomationExecution
.
Sourcepub fn outputs(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn outputs(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to outputs
.
To override the contents of this collection use set_outputs
.
The list of execution outputs as defined in the Automation runbook.
Sourcepub fn set_outputs(self, input: Option<HashMap<String, Vec<String>>>) -> Self
pub fn set_outputs(self, input: Option<HashMap<String, Vec<String>>>) -> Self
The list of execution outputs as defined in the Automation runbook.
Sourcepub fn get_outputs(&self) -> &Option<HashMap<String, Vec<String>>>
pub fn get_outputs(&self) -> &Option<HashMap<String, Vec<String>>>
The list of execution outputs as defined in the Automation runbook.
Sourcepub fn failure_message(self, input: impl Into<String>) -> Self
pub fn failure_message(self, input: impl Into<String>) -> Self
A message describing why an execution has failed, if the status is set to Failed.
Sourcepub fn set_failure_message(self, input: Option<String>) -> Self
pub fn set_failure_message(self, input: Option<String>) -> Self
A message describing why an execution has failed, if the status is set to Failed.
Sourcepub fn get_failure_message(&self) -> &Option<String>
pub fn get_failure_message(&self) -> &Option<String>
A message describing why an execution has failed, if the status is set to Failed.
Sourcepub fn mode(self, input: ExecutionMode) -> Self
pub fn mode(self, input: ExecutionMode) -> Self
The automation execution mode.
Sourcepub fn set_mode(self, input: Option<ExecutionMode>) -> Self
pub fn set_mode(self, input: Option<ExecutionMode>) -> Self
The automation execution mode.
Sourcepub fn get_mode(&self) -> &Option<ExecutionMode>
pub fn get_mode(&self) -> &Option<ExecutionMode>
The automation execution mode.
Sourcepub fn parent_automation_execution_id(self, input: impl Into<String>) -> Self
pub fn parent_automation_execution_id(self, input: impl Into<String>) -> Self
The AutomationExecutionId of the parent automation.
Sourcepub fn set_parent_automation_execution_id(self, input: Option<String>) -> Self
pub fn set_parent_automation_execution_id(self, input: Option<String>) -> Self
The AutomationExecutionId of the parent automation.
Sourcepub fn get_parent_automation_execution_id(&self) -> &Option<String>
pub fn get_parent_automation_execution_id(&self) -> &Option<String>
The AutomationExecutionId of the parent automation.
Sourcepub fn executed_by(self, input: impl Into<String>) -> Self
pub fn executed_by(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the user who ran the automation.
Sourcepub fn set_executed_by(self, input: Option<String>) -> Self
pub fn set_executed_by(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the user who ran the automation.
Sourcepub fn get_executed_by(&self) -> &Option<String>
pub fn get_executed_by(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the user who ran the automation.
Sourcepub fn current_step_name(self, input: impl Into<String>) -> Self
pub fn current_step_name(self, input: impl Into<String>) -> Self
The name of the step that is currently running.
Sourcepub fn set_current_step_name(self, input: Option<String>) -> Self
pub fn set_current_step_name(self, input: Option<String>) -> Self
The name of the step that is currently running.
Sourcepub fn get_current_step_name(&self) -> &Option<String>
pub fn get_current_step_name(&self) -> &Option<String>
The name of the step that is currently running.
Sourcepub fn current_action(self, input: impl Into<String>) -> Self
pub fn current_action(self, input: impl Into<String>) -> Self
The action of the step that is currently running.
Sourcepub fn set_current_action(self, input: Option<String>) -> Self
pub fn set_current_action(self, input: Option<String>) -> Self
The action of the step that is currently running.
Sourcepub fn get_current_action(&self) -> &Option<String>
pub fn get_current_action(&self) -> &Option<String>
The action of the step that is currently running.
Sourcepub fn target_parameter_name(self, input: impl Into<String>) -> Self
pub fn target_parameter_name(self, input: impl Into<String>) -> Self
The parameter name.
Sourcepub fn set_target_parameter_name(self, input: Option<String>) -> Self
pub fn set_target_parameter_name(self, input: Option<String>) -> Self
The parameter name.
Sourcepub fn get_target_parameter_name(&self) -> &Option<String>
pub fn get_target_parameter_name(&self) -> &Option<String>
The parameter name.
Sourcepub fn targets(self, input: Target) -> Self
pub fn targets(self, input: Target) -> Self
Appends an item to targets
.
To override the contents of this collection use set_targets
.
The specified targets.
Sourcepub fn set_targets(self, input: Option<Vec<Target>>) -> Self
pub fn set_targets(self, input: Option<Vec<Target>>) -> Self
The specified targets.
Sourcepub fn get_targets(&self) -> &Option<Vec<Target>>
pub fn get_targets(&self) -> &Option<Vec<Target>>
The specified targets.
Sourcepub fn target_maps(self, input: HashMap<String, Vec<String>>) -> Self
pub fn target_maps(self, input: HashMap<String, Vec<String>>) -> Self
Appends an item to target_maps
.
To override the contents of this collection use set_target_maps
.
The specified key-value mapping of document parameters to target resources.
Sourcepub fn set_target_maps(
self,
input: Option<Vec<HashMap<String, Vec<String>>>>,
) -> Self
pub fn set_target_maps( self, input: Option<Vec<HashMap<String, Vec<String>>>>, ) -> Self
The specified key-value mapping of document parameters to target resources.
Sourcepub fn get_target_maps(&self) -> &Option<Vec<HashMap<String, Vec<String>>>>
pub fn get_target_maps(&self) -> &Option<Vec<HashMap<String, Vec<String>>>>
The specified key-value mapping of document parameters to target resources.
Sourcepub fn resolved_targets(self, input: ResolvedTargets) -> Self
pub fn resolved_targets(self, input: ResolvedTargets) -> Self
A list of resolved targets in the rate control execution.
Sourcepub fn set_resolved_targets(self, input: Option<ResolvedTargets>) -> Self
pub fn set_resolved_targets(self, input: Option<ResolvedTargets>) -> Self
A list of resolved targets in the rate control execution.
Sourcepub fn get_resolved_targets(&self) -> &Option<ResolvedTargets>
pub fn get_resolved_targets(&self) -> &Option<ResolvedTargets>
A list of resolved targets in the rate control execution.
Sourcepub fn max_concurrency(self, input: impl Into<String>) -> Self
pub fn max_concurrency(self, input: impl Into<String>) -> Self
The MaxConcurrency
value specified by the user when the execution started.
Sourcepub fn set_max_concurrency(self, input: Option<String>) -> Self
pub fn set_max_concurrency(self, input: Option<String>) -> Self
The MaxConcurrency
value specified by the user when the execution started.
Sourcepub fn get_max_concurrency(&self) -> &Option<String>
pub fn get_max_concurrency(&self) -> &Option<String>
The MaxConcurrency
value specified by the user when the execution started.
Sourcepub fn max_errors(self, input: impl Into<String>) -> Self
pub fn max_errors(self, input: impl Into<String>) -> Self
The MaxErrors value specified by the user when the execution started.
Sourcepub fn set_max_errors(self, input: Option<String>) -> Self
pub fn set_max_errors(self, input: Option<String>) -> Self
The MaxErrors value specified by the user when the execution started.
Sourcepub fn get_max_errors(&self) -> &Option<String>
pub fn get_max_errors(&self) -> &Option<String>
The MaxErrors value specified by the user when the execution started.
Sourcepub fn set_target(self, input: Option<String>) -> Self
pub fn set_target(self, input: Option<String>) -> Self
The target of the execution.
Sourcepub fn get_target(&self) -> &Option<String>
pub fn get_target(&self) -> &Option<String>
The target of the execution.
Sourcepub fn target_locations(self, input: TargetLocation) -> Self
pub fn target_locations(self, input: TargetLocation) -> Self
Appends an item to target_locations
.
To override the contents of this collection use set_target_locations
.
The combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the Automation.
Sourcepub fn set_target_locations(self, input: Option<Vec<TargetLocation>>) -> Self
pub fn set_target_locations(self, input: Option<Vec<TargetLocation>>) -> Self
The combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the Automation.
Sourcepub fn get_target_locations(&self) -> &Option<Vec<TargetLocation>>
pub fn get_target_locations(&self) -> &Option<Vec<TargetLocation>>
The combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the Automation.
Sourcepub fn progress_counters(self, input: ProgressCounters) -> Self
pub fn progress_counters(self, input: ProgressCounters) -> Self
An aggregate of step execution statuses displayed in the Amazon Web Services Systems Manager console for a multi-Region and multi-account Automation execution.
Sourcepub fn set_progress_counters(self, input: Option<ProgressCounters>) -> Self
pub fn set_progress_counters(self, input: Option<ProgressCounters>) -> Self
An aggregate of step execution statuses displayed in the Amazon Web Services Systems Manager console for a multi-Region and multi-account Automation execution.
Sourcepub fn get_progress_counters(&self) -> &Option<ProgressCounters>
pub fn get_progress_counters(&self) -> &Option<ProgressCounters>
An aggregate of step execution statuses displayed in the Amazon Web Services Systems Manager console for a multi-Region and multi-account Automation execution.
Sourcepub fn alarm_configuration(self, input: AlarmConfiguration) -> Self
pub fn alarm_configuration(self, input: AlarmConfiguration) -> Self
The details for the CloudWatch alarm applied to your automation.
Sourcepub fn set_alarm_configuration(self, input: Option<AlarmConfiguration>) -> Self
pub fn set_alarm_configuration(self, input: Option<AlarmConfiguration>) -> Self
The details for the CloudWatch alarm applied to your automation.
Sourcepub fn get_alarm_configuration(&self) -> &Option<AlarmConfiguration>
pub fn get_alarm_configuration(&self) -> &Option<AlarmConfiguration>
The details for the CloudWatch alarm applied to your automation.
Sourcepub fn triggered_alarms(self, input: AlarmStateInformation) -> Self
pub fn triggered_alarms(self, input: AlarmStateInformation) -> Self
Appends an item to triggered_alarms
.
To override the contents of this collection use set_triggered_alarms
.
The CloudWatch alarm that was invoked by the automation.
Sourcepub fn set_triggered_alarms(
self,
input: Option<Vec<AlarmStateInformation>>,
) -> Self
pub fn set_triggered_alarms( self, input: Option<Vec<AlarmStateInformation>>, ) -> Self
The CloudWatch alarm that was invoked by the automation.
Sourcepub fn get_triggered_alarms(&self) -> &Option<Vec<AlarmStateInformation>>
pub fn get_triggered_alarms(&self) -> &Option<Vec<AlarmStateInformation>>
The CloudWatch alarm that was invoked by the automation.
Sourcepub fn target_locations_url(self, input: impl Into<String>) -> Self
pub fn target_locations_url(self, input: impl Into<String>) -> Self
A publicly accessible URL for a file that contains the TargetLocations
body. Currently, only files in presigned Amazon S3 buckets are supported
Sourcepub fn set_target_locations_url(self, input: Option<String>) -> Self
pub fn set_target_locations_url(self, input: Option<String>) -> Self
A publicly accessible URL for a file that contains the TargetLocations
body. Currently, only files in presigned Amazon S3 buckets are supported
Sourcepub fn get_target_locations_url(&self) -> &Option<String>
pub fn get_target_locations_url(&self) -> &Option<String>
A publicly accessible URL for a file that contains the TargetLocations
body. Currently, only files in presigned Amazon S3 buckets are supported
Sourcepub fn automation_subtype(self, input: AutomationSubtype) -> Self
pub fn automation_subtype(self, input: AutomationSubtype) -> Self
The subtype of the Automation operation. Currently, the only supported value is ChangeRequest
.
Sourcepub fn set_automation_subtype(self, input: Option<AutomationSubtype>) -> Self
pub fn set_automation_subtype(self, input: Option<AutomationSubtype>) -> Self
The subtype of the Automation operation. Currently, the only supported value is ChangeRequest
.
Sourcepub fn get_automation_subtype(&self) -> &Option<AutomationSubtype>
pub fn get_automation_subtype(&self) -> &Option<AutomationSubtype>
The subtype of the Automation operation. Currently, the only supported value is ChangeRequest
.
Sourcepub fn scheduled_time(self, input: DateTime) -> Self
pub fn scheduled_time(self, input: DateTime) -> Self
The date and time the Automation operation is scheduled to start.
Sourcepub fn set_scheduled_time(self, input: Option<DateTime>) -> Self
pub fn set_scheduled_time(self, input: Option<DateTime>) -> Self
The date and time the Automation operation is scheduled to start.
Sourcepub fn get_scheduled_time(&self) -> &Option<DateTime>
pub fn get_scheduled_time(&self) -> &Option<DateTime>
The date and time the Automation operation is scheduled to start.
Sourcepub fn runbooks(self, input: Runbook) -> Self
pub fn runbooks(self, input: Runbook) -> Self
Appends an item to runbooks
.
To override the contents of this collection use set_runbooks
.
Information about the Automation runbooks that are run as part of a runbook workflow.
The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.
Sourcepub fn set_runbooks(self, input: Option<Vec<Runbook>>) -> Self
pub fn set_runbooks(self, input: Option<Vec<Runbook>>) -> Self
Information about the Automation runbooks that are run as part of a runbook workflow.
The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.
Sourcepub fn get_runbooks(&self) -> &Option<Vec<Runbook>>
pub fn get_runbooks(&self) -> &Option<Vec<Runbook>>
Information about the Automation runbooks that are run as part of a runbook workflow.
The Automation runbooks specified for the runbook workflow can't run until all required approvals for the change request have been received.
Sourcepub fn ops_item_id(self, input: impl Into<String>) -> Self
pub fn ops_item_id(self, input: impl Into<String>) -> Self
The ID of an OpsItem that is created to represent a Change Manager change request.
Sourcepub fn set_ops_item_id(self, input: Option<String>) -> Self
pub fn set_ops_item_id(self, input: Option<String>) -> Self
The ID of an OpsItem that is created to represent a Change Manager change request.
Sourcepub fn get_ops_item_id(&self) -> &Option<String>
pub fn get_ops_item_id(&self) -> &Option<String>
The ID of an OpsItem that is created to represent a Change Manager change request.
Sourcepub fn association_id(self, input: impl Into<String>) -> Self
pub fn association_id(self, input: impl Into<String>) -> Self
The ID of a State Manager association used in the Automation operation.
Sourcepub fn set_association_id(self, input: Option<String>) -> Self
pub fn set_association_id(self, input: Option<String>) -> Self
The ID of a State Manager association used in the Automation operation.
Sourcepub fn get_association_id(&self) -> &Option<String>
pub fn get_association_id(&self) -> &Option<String>
The ID of a State Manager association used in the Automation operation.
Sourcepub fn change_request_name(self, input: impl Into<String>) -> Self
pub fn change_request_name(self, input: impl Into<String>) -> Self
The name of the Change Manager change request.
Sourcepub fn set_change_request_name(self, input: Option<String>) -> Self
pub fn set_change_request_name(self, input: Option<String>) -> Self
The name of the Change Manager change request.
Sourcepub fn get_change_request_name(&self) -> &Option<String>
pub fn get_change_request_name(&self) -> &Option<String>
The name of the Change Manager change request.
Sourcepub fn variables(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn variables(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to variables
.
To override the contents of this collection use set_variables
.
Variables defined for the automation.
Sourcepub fn set_variables(self, input: Option<HashMap<String, Vec<String>>>) -> Self
pub fn set_variables(self, input: Option<HashMap<String, Vec<String>>>) -> Self
Variables defined for the automation.
Sourcepub fn get_variables(&self) -> &Option<HashMap<String, Vec<String>>>
pub fn get_variables(&self) -> &Option<HashMap<String, Vec<String>>>
Variables defined for the automation.
Sourcepub fn build(self) -> AutomationExecution
pub fn build(self) -> AutomationExecution
Consumes the builder and constructs a AutomationExecution
.
Trait Implementations§
Source§impl Clone for AutomationExecutionBuilder
impl Clone for AutomationExecutionBuilder
Source§fn clone(&self) -> AutomationExecutionBuilder
fn clone(&self) -> AutomationExecutionBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AutomationExecutionBuilder
impl Debug for AutomationExecutionBuilder
Source§impl Default for AutomationExecutionBuilder
impl Default for AutomationExecutionBuilder
Source§fn default() -> AutomationExecutionBuilder
fn default() -> AutomationExecutionBuilder
impl StructuralPartialEq for AutomationExecutionBuilder
Auto Trait Implementations§
impl Freeze for AutomationExecutionBuilder
impl RefUnwindSafe for AutomationExecutionBuilder
impl Send for AutomationExecutionBuilder
impl Sync for AutomationExecutionBuilder
impl Unpin for AutomationExecutionBuilder
impl UnwindSafe for AutomationExecutionBuilder
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);