#[non_exhaustive]pub struct DeploymentBuilder { /* private fields */ }
Expand description
A builder for Deployment
.
Implementations§
Source§impl DeploymentBuilder
impl DeploymentBuilder
Sourcepub fn status(self, input: impl Into<String>) -> Self
pub fn status(self, input: impl Into<String>) -> Self
The status of the deployment. The following describes each state.
- PRIMARY
-
The most recent deployment of a service.
- ACTIVE
-
A service deployment that still has running tasks, but are in the process of being replaced with a new
PRIMARY
deployment. - INACTIVE
-
A deployment that has been completely replaced.
Sourcepub fn set_status(self, input: Option<String>) -> Self
pub fn set_status(self, input: Option<String>) -> Self
The status of the deployment. The following describes each state.
- PRIMARY
-
The most recent deployment of a service.
- ACTIVE
-
A service deployment that still has running tasks, but are in the process of being replaced with a new
PRIMARY
deployment. - INACTIVE
-
A deployment that has been completely replaced.
Sourcepub fn get_status(&self) -> &Option<String>
pub fn get_status(&self) -> &Option<String>
The status of the deployment. The following describes each state.
- PRIMARY
-
The most recent deployment of a service.
- ACTIVE
-
A service deployment that still has running tasks, but are in the process of being replaced with a new
PRIMARY
deployment. - INACTIVE
-
A deployment that has been completely replaced.
Sourcepub fn task_definition(self, input: impl Into<String>) -> Self
pub fn task_definition(self, input: impl Into<String>) -> Self
The most recent task definition that was specified for the tasks in the service to use.
Sourcepub fn set_task_definition(self, input: Option<String>) -> Self
pub fn set_task_definition(self, input: Option<String>) -> Self
The most recent task definition that was specified for the tasks in the service to use.
Sourcepub fn get_task_definition(&self) -> &Option<String>
pub fn get_task_definition(&self) -> &Option<String>
The most recent task definition that was specified for the tasks in the service to use.
Sourcepub fn desired_count(self, input: i32) -> Self
pub fn desired_count(self, input: i32) -> Self
The most recent desired count of tasks that was specified for the service to deploy or maintain.
Sourcepub fn set_desired_count(self, input: Option<i32>) -> Self
pub fn set_desired_count(self, input: Option<i32>) -> Self
The most recent desired count of tasks that was specified for the service to deploy or maintain.
Sourcepub fn get_desired_count(&self) -> &Option<i32>
pub fn get_desired_count(&self) -> &Option<i32>
The most recent desired count of tasks that was specified for the service to deploy or maintain.
Sourcepub fn pending_count(self, input: i32) -> Self
pub fn pending_count(self, input: i32) -> Self
The number of tasks in the deployment that are in the PENDING
status.
Sourcepub fn set_pending_count(self, input: Option<i32>) -> Self
pub fn set_pending_count(self, input: Option<i32>) -> Self
The number of tasks in the deployment that are in the PENDING
status.
Sourcepub fn get_pending_count(&self) -> &Option<i32>
pub fn get_pending_count(&self) -> &Option<i32>
The number of tasks in the deployment that are in the PENDING
status.
Sourcepub fn running_count(self, input: i32) -> Self
pub fn running_count(self, input: i32) -> Self
The number of tasks in the deployment that are in the RUNNING
status.
Sourcepub fn set_running_count(self, input: Option<i32>) -> Self
pub fn set_running_count(self, input: Option<i32>) -> Self
The number of tasks in the deployment that are in the RUNNING
status.
Sourcepub fn get_running_count(&self) -> &Option<i32>
pub fn get_running_count(&self) -> &Option<i32>
The number of tasks in the deployment that are in the RUNNING
status.
Sourcepub fn failed_tasks(self, input: i32) -> Self
pub fn failed_tasks(self, input: i32) -> Self
The number of consecutively failed tasks in the deployment. A task is considered a failure if the service scheduler can't launch the task, the task doesn't transition to a RUNNING
state, or if it fails any of its defined health checks and is stopped.
Once a service deployment has one or more successfully running tasks, the failed task count resets to zero and stops being evaluated.
Sourcepub fn set_failed_tasks(self, input: Option<i32>) -> Self
pub fn set_failed_tasks(self, input: Option<i32>) -> Self
The number of consecutively failed tasks in the deployment. A task is considered a failure if the service scheduler can't launch the task, the task doesn't transition to a RUNNING
state, or if it fails any of its defined health checks and is stopped.
Once a service deployment has one or more successfully running tasks, the failed task count resets to zero and stops being evaluated.
Sourcepub fn get_failed_tasks(&self) -> &Option<i32>
pub fn get_failed_tasks(&self) -> &Option<i32>
The number of consecutively failed tasks in the deployment. A task is considered a failure if the service scheduler can't launch the task, the task doesn't transition to a RUNNING
state, or if it fails any of its defined health checks and is stopped.
Once a service deployment has one or more successfully running tasks, the failed task count resets to zero and stops being evaluated.
Sourcepub fn created_at(self, input: DateTime) -> Self
pub fn created_at(self, input: DateTime) -> Self
The Unix timestamp for the time when the service deployment was created.
Sourcepub fn set_created_at(self, input: Option<DateTime>) -> Self
pub fn set_created_at(self, input: Option<DateTime>) -> Self
The Unix timestamp for the time when the service deployment was created.
Sourcepub fn get_created_at(&self) -> &Option<DateTime>
pub fn get_created_at(&self) -> &Option<DateTime>
The Unix timestamp for the time when the service deployment was created.
Sourcepub fn updated_at(self, input: DateTime) -> Self
pub fn updated_at(self, input: DateTime) -> Self
The Unix timestamp for the time when the service deployment was last updated.
Sourcepub fn set_updated_at(self, input: Option<DateTime>) -> Self
pub fn set_updated_at(self, input: Option<DateTime>) -> Self
The Unix timestamp for the time when the service deployment was last updated.
Sourcepub fn get_updated_at(&self) -> &Option<DateTime>
pub fn get_updated_at(&self) -> &Option<DateTime>
The Unix timestamp for the time when the service deployment was last updated.
Sourcepub fn capacity_provider_strategy(
self,
input: CapacityProviderStrategyItem,
) -> Self
pub fn capacity_provider_strategy( self, input: CapacityProviderStrategyItem, ) -> Self
Appends an item to capacity_provider_strategy
.
To override the contents of this collection use set_capacity_provider_strategy
.
The capacity provider strategy that the deployment is using.
Sourcepub fn set_capacity_provider_strategy(
self,
input: Option<Vec<CapacityProviderStrategyItem>>,
) -> Self
pub fn set_capacity_provider_strategy( self, input: Option<Vec<CapacityProviderStrategyItem>>, ) -> Self
The capacity provider strategy that the deployment is using.
Sourcepub fn get_capacity_provider_strategy(
&self,
) -> &Option<Vec<CapacityProviderStrategyItem>>
pub fn get_capacity_provider_strategy( &self, ) -> &Option<Vec<CapacityProviderStrategyItem>>
The capacity provider strategy that the deployment is using.
Sourcepub fn launch_type(self, input: LaunchType) -> Self
pub fn launch_type(self, input: LaunchType) -> Self
The launch type the tasks in the service are using. For more information, see Amazon ECS Launch Types in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn set_launch_type(self, input: Option<LaunchType>) -> Self
pub fn set_launch_type(self, input: Option<LaunchType>) -> Self
The launch type the tasks in the service are using. For more information, see Amazon ECS Launch Types in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn get_launch_type(&self) -> &Option<LaunchType>
pub fn get_launch_type(&self) -> &Option<LaunchType>
The launch type the tasks in the service are using. For more information, see Amazon ECS Launch Types in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn platform_version(self, input: impl Into<String>) -> Self
pub fn platform_version(self, input: impl Into<String>) -> Self
The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If one isn't specified, the LATEST
platform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn set_platform_version(self, input: Option<String>) -> Self
pub fn set_platform_version(self, input: Option<String>) -> Self
The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If one isn't specified, the LATEST
platform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn get_platform_version(&self) -> &Option<String>
pub fn get_platform_version(&self) -> &Option<String>
The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If one isn't specified, the LATEST
platform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn platform_family(self, input: impl Into<String>) -> Self
pub fn platform_family(self, input: impl Into<String>) -> Self
The operating system that your tasks in the service, or tasks are running on. A platform family is specified only for tasks using the Fargate launch type.
All tasks that run as part of this service must use the same platformFamily
value as the service, for example, LINUX.
.
Sourcepub fn set_platform_family(self, input: Option<String>) -> Self
pub fn set_platform_family(self, input: Option<String>) -> Self
The operating system that your tasks in the service, or tasks are running on. A platform family is specified only for tasks using the Fargate launch type.
All tasks that run as part of this service must use the same platformFamily
value as the service, for example, LINUX.
.
Sourcepub fn get_platform_family(&self) -> &Option<String>
pub fn get_platform_family(&self) -> &Option<String>
The operating system that your tasks in the service, or tasks are running on. A platform family is specified only for tasks using the Fargate launch type.
All tasks that run as part of this service must use the same platformFamily
value as the service, for example, LINUX.
.
Sourcepub fn network_configuration(self, input: NetworkConfiguration) -> Self
pub fn network_configuration(self, input: NetworkConfiguration) -> Self
The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the awsvpc
networking mode.
Sourcepub fn set_network_configuration(
self,
input: Option<NetworkConfiguration>,
) -> Self
pub fn set_network_configuration( self, input: Option<NetworkConfiguration>, ) -> Self
The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the awsvpc
networking mode.
Sourcepub fn get_network_configuration(&self) -> &Option<NetworkConfiguration>
pub fn get_network_configuration(&self) -> &Option<NetworkConfiguration>
The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the awsvpc
networking mode.
Sourcepub fn rollout_state(self, input: DeploymentRolloutState) -> Self
pub fn rollout_state(self, input: DeploymentRolloutState) -> Self
The rolloutState
of a service is only returned for services that use the rolling update (ECS
) deployment type that aren't behind a Classic Load Balancer.
The rollout state of the deployment. When a service deployment is started, it begins in an IN_PROGRESS
state. When the service reaches a steady state, the deployment transitions to a COMPLETED
state. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to a FAILED
state. A deployment in FAILED
state doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.
Sourcepub fn set_rollout_state(self, input: Option<DeploymentRolloutState>) -> Self
pub fn set_rollout_state(self, input: Option<DeploymentRolloutState>) -> Self
The rolloutState
of a service is only returned for services that use the rolling update (ECS
) deployment type that aren't behind a Classic Load Balancer.
The rollout state of the deployment. When a service deployment is started, it begins in an IN_PROGRESS
state. When the service reaches a steady state, the deployment transitions to a COMPLETED
state. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to a FAILED
state. A deployment in FAILED
state doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.
Sourcepub fn get_rollout_state(&self) -> &Option<DeploymentRolloutState>
pub fn get_rollout_state(&self) -> &Option<DeploymentRolloutState>
The rolloutState
of a service is only returned for services that use the rolling update (ECS
) deployment type that aren't behind a Classic Load Balancer.
The rollout state of the deployment. When a service deployment is started, it begins in an IN_PROGRESS
state. When the service reaches a steady state, the deployment transitions to a COMPLETED
state. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to a FAILED
state. A deployment in FAILED
state doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.
Sourcepub fn rollout_state_reason(self, input: impl Into<String>) -> Self
pub fn rollout_state_reason(self, input: impl Into<String>) -> Self
A description of the rollout state of a deployment.
Sourcepub fn set_rollout_state_reason(self, input: Option<String>) -> Self
pub fn set_rollout_state_reason(self, input: Option<String>) -> Self
A description of the rollout state of a deployment.
Sourcepub fn get_rollout_state_reason(&self) -> &Option<String>
pub fn get_rollout_state_reason(&self) -> &Option<String>
A description of the rollout state of a deployment.
Sourcepub fn service_connect_configuration(
self,
input: ServiceConnectConfiguration,
) -> Self
pub fn service_connect_configuration( self, input: ServiceConnectConfiguration, ) -> Self
The details of the Service Connect configuration that's used by this deployment. Compare the configuration between multiple deployments when troubleshooting issues with new deployments.
The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn set_service_connect_configuration(
self,
input: Option<ServiceConnectConfiguration>,
) -> Self
pub fn set_service_connect_configuration( self, input: Option<ServiceConnectConfiguration>, ) -> Self
The details of the Service Connect configuration that's used by this deployment. Compare the configuration between multiple deployments when troubleshooting issues with new deployments.
The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn get_service_connect_configuration(
&self,
) -> &Option<ServiceConnectConfiguration>
pub fn get_service_connect_configuration( &self, ) -> &Option<ServiceConnectConfiguration>
The details of the Service Connect configuration that's used by this deployment. Compare the configuration between multiple deployments when troubleshooting issues with new deployments.
The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
Sourcepub fn service_connect_resources(
self,
input: ServiceConnectServiceResource,
) -> Self
pub fn service_connect_resources( self, input: ServiceConnectServiceResource, ) -> Self
Appends an item to service_connect_resources
.
To override the contents of this collection use set_service_connect_resources
.
The list of Service Connect resources that are associated with this deployment. Each list entry maps a discovery name to a Cloud Map service name.
Sourcepub fn set_service_connect_resources(
self,
input: Option<Vec<ServiceConnectServiceResource>>,
) -> Self
pub fn set_service_connect_resources( self, input: Option<Vec<ServiceConnectServiceResource>>, ) -> Self
The list of Service Connect resources that are associated with this deployment. Each list entry maps a discovery name to a Cloud Map service name.
Sourcepub fn get_service_connect_resources(
&self,
) -> &Option<Vec<ServiceConnectServiceResource>>
pub fn get_service_connect_resources( &self, ) -> &Option<Vec<ServiceConnectServiceResource>>
The list of Service Connect resources that are associated with this deployment. Each list entry maps a discovery name to a Cloud Map service name.
Sourcepub fn volume_configurations(self, input: ServiceVolumeConfiguration) -> Self
pub fn volume_configurations(self, input: ServiceVolumeConfiguration) -> Self
Appends an item to volume_configurations
.
To override the contents of this collection use set_volume_configurations
.
The details of the volume that was configuredAtLaunch
. You can configure different settings like the size, throughput, volumeType, and ecryption in ServiceManagedEBSVolumeConfiguration. The name
of the volume must match the name
from the task definition.
Sourcepub fn set_volume_configurations(
self,
input: Option<Vec<ServiceVolumeConfiguration>>,
) -> Self
pub fn set_volume_configurations( self, input: Option<Vec<ServiceVolumeConfiguration>>, ) -> Self
The details of the volume that was configuredAtLaunch
. You can configure different settings like the size, throughput, volumeType, and ecryption in ServiceManagedEBSVolumeConfiguration. The name
of the volume must match the name
from the task definition.
Sourcepub fn get_volume_configurations(
&self,
) -> &Option<Vec<ServiceVolumeConfiguration>>
pub fn get_volume_configurations( &self, ) -> &Option<Vec<ServiceVolumeConfiguration>>
The details of the volume that was configuredAtLaunch
. You can configure different settings like the size, throughput, volumeType, and ecryption in ServiceManagedEBSVolumeConfiguration. The name
of the volume must match the name
from the task definition.
Sourcepub fn fargate_ephemeral_storage(
self,
input: DeploymentEphemeralStorage,
) -> Self
pub fn fargate_ephemeral_storage( self, input: DeploymentEphemeralStorage, ) -> Self
The Fargate ephemeral storage settings for the deployment.
Sourcepub fn set_fargate_ephemeral_storage(
self,
input: Option<DeploymentEphemeralStorage>,
) -> Self
pub fn set_fargate_ephemeral_storage( self, input: Option<DeploymentEphemeralStorage>, ) -> Self
The Fargate ephemeral storage settings for the deployment.
Sourcepub fn get_fargate_ephemeral_storage(
&self,
) -> &Option<DeploymentEphemeralStorage>
pub fn get_fargate_ephemeral_storage( &self, ) -> &Option<DeploymentEphemeralStorage>
The Fargate ephemeral storage settings for the deployment.
Sourcepub fn vpc_lattice_configurations(self, input: VpcLatticeConfiguration) -> Self
pub fn vpc_lattice_configurations(self, input: VpcLatticeConfiguration) -> Self
Appends an item to vpc_lattice_configurations
.
To override the contents of this collection use set_vpc_lattice_configurations
.
The VPC Lattice configuration for the service deployment.
Sourcepub fn set_vpc_lattice_configurations(
self,
input: Option<Vec<VpcLatticeConfiguration>>,
) -> Self
pub fn set_vpc_lattice_configurations( self, input: Option<Vec<VpcLatticeConfiguration>>, ) -> Self
The VPC Lattice configuration for the service deployment.
Sourcepub fn get_vpc_lattice_configurations(
&self,
) -> &Option<Vec<VpcLatticeConfiguration>>
pub fn get_vpc_lattice_configurations( &self, ) -> &Option<Vec<VpcLatticeConfiguration>>
The VPC Lattice configuration for the service deployment.
Sourcepub fn build(self) -> Deployment
pub fn build(self) -> Deployment
Consumes the builder and constructs a Deployment
.
Trait Implementations§
Source§impl Clone for DeploymentBuilder
impl Clone for DeploymentBuilder
Source§fn clone(&self) -> DeploymentBuilder
fn clone(&self) -> DeploymentBuilder
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DeploymentBuilder
impl Debug for DeploymentBuilder
Source§impl Default for DeploymentBuilder
impl Default for DeploymentBuilder
Source§fn default() -> DeploymentBuilder
fn default() -> DeploymentBuilder
Source§impl PartialEq for DeploymentBuilder
impl PartialEq for DeploymentBuilder
impl StructuralPartialEq for DeploymentBuilder
Auto Trait Implementations§
impl Freeze for DeploymentBuilder
impl RefUnwindSafe for DeploymentBuilder
impl Send for DeploymentBuilder
impl Sync for DeploymentBuilder
impl Unpin for DeploymentBuilder
impl UnwindSafe for DeploymentBuilder
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);