#[non_exhaustive]pub struct CreateEnvironmentInputBuilder { /* private fields */ }
Expand description
A builder for CreateEnvironmentInput
.
Implementations§
Source§impl CreateEnvironmentInputBuilder
impl CreateEnvironmentInputBuilder
Sourcepub fn client_token(self, input: impl Into<String>) -> Self
pub fn client_token(self, input: impl Into<String>) -> Self
This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.
A unique, case-sensitive identifier that you provide to ensure the idempotency of the environment creation request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
Sourcepub fn set_client_token(self, input: Option<String>) -> Self
pub fn set_client_token(self, input: Option<String>) -> Self
This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.
A unique, case-sensitive identifier that you provide to ensure the idempotency of the environment creation request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
Sourcepub fn get_client_token(&self) -> &Option<String>
pub fn get_client_token(&self) -> &Option<String>
This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.
A unique, case-sensitive identifier that you provide to ensure the idempotency of the environment creation request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
Sourcepub fn environment_name(self, input: impl Into<String>) -> Self
pub fn environment_name(self, input: impl Into<String>) -> Self
The name to give to your environment. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character, and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the environment in.
Sourcepub fn set_environment_name(self, input: Option<String>) -> Self
pub fn set_environment_name(self, input: Option<String>) -> Self
The name to give to your environment. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character, and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the environment in.
Sourcepub fn get_environment_name(&self) -> &Option<String>
pub fn get_environment_name(&self) -> &Option<String>
The name to give to your environment. The name can contain only alphanumeric characters (case-sensitive), hyphens, and underscores. It must start with an alphanumeric character, and can't be longer than 100 characters. The name must be unique within the Amazon Web Services Region and Amazon Web Services account that you're creating the environment in.
Sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
A unique ID for the customer-managed KMS key that is used to encrypt the VCF credential pairs for SDDC Manager, NSX Manager, and vCenter appliances. These credentials are stored in Amazon Web Services Secrets Manager.
Sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
A unique ID for the customer-managed KMS key that is used to encrypt the VCF credential pairs for SDDC Manager, NSX Manager, and vCenter appliances. These credentials are stored in Amazon Web Services Secrets Manager.
Sourcepub fn get_kms_key_id(&self) -> &Option<String>
pub fn get_kms_key_id(&self) -> &Option<String>
A unique ID for the customer-managed KMS key that is used to encrypt the VCF credential pairs for SDDC Manager, NSX Manager, and vCenter appliances. These credentials are stored in Amazon Web Services Secrets Manager.
Adds a key-value pair to tags
.
To override the contents of this collection use set_tags
.
Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
Sourcepub fn service_access_security_groups(
self,
input: ServiceAccessSecurityGroups,
) -> Self
pub fn service_access_security_groups( self, input: ServiceAccessSecurityGroups, ) -> Self
The security group that controls communication between the Amazon EVS control plane and VPC. The default security group is used if a custom security group isn't specified.
The security group should allow access to the following.
-
TCP/UDP access to the DNS servers
-
HTTPS/SSH access to the host management VLAN subnet
-
HTTPS/SSH access to the Management VM VLAN subnet
You should avoid modifying the security group rules after deployment, as this can break the persistent connection between the Amazon EVS control plane and VPC. This can cause future environment actions like adding or removing hosts to fail.
Sourcepub fn set_service_access_security_groups(
self,
input: Option<ServiceAccessSecurityGroups>,
) -> Self
pub fn set_service_access_security_groups( self, input: Option<ServiceAccessSecurityGroups>, ) -> Self
The security group that controls communication between the Amazon EVS control plane and VPC. The default security group is used if a custom security group isn't specified.
The security group should allow access to the following.
-
TCP/UDP access to the DNS servers
-
HTTPS/SSH access to the host management VLAN subnet
-
HTTPS/SSH access to the Management VM VLAN subnet
You should avoid modifying the security group rules after deployment, as this can break the persistent connection between the Amazon EVS control plane and VPC. This can cause future environment actions like adding or removing hosts to fail.
Sourcepub fn get_service_access_security_groups(
&self,
) -> &Option<ServiceAccessSecurityGroups>
pub fn get_service_access_security_groups( &self, ) -> &Option<ServiceAccessSecurityGroups>
The security group that controls communication between the Amazon EVS control plane and VPC. The default security group is used if a custom security group isn't specified.
The security group should allow access to the following.
-
TCP/UDP access to the DNS servers
-
HTTPS/SSH access to the host management VLAN subnet
-
HTTPS/SSH access to the Management VM VLAN subnet
You should avoid modifying the security group rules after deployment, as this can break the persistent connection between the Amazon EVS control plane and VPC. This can cause future environment actions like adding or removing hosts to fail.
Sourcepub fn vpc_id(self, input: impl Into<String>) -> Self
pub fn vpc_id(self, input: impl Into<String>) -> Self
A unique ID for the VPC that connects to the environment control plane for service access.
Amazon EVS requires that all VPC subnets exist in a single Availability Zone in a Region where the service is available.
The VPC that you select must have a valid DHCP option set with domain name, at least two DNS servers, and an NTP server. These settings are used to configure your VCF appliances and hosts.
If you plan to use HCX over the internet, choose a VPC that has a primary CIDR block and a /28 secondary CIDR block from an IPAM pool. Make sure that your VPC also has an attached internet gateway.
Amazon EVS does not support the following Amazon Web Services networking options for NSX overlay connectivity: cross-Region VPC peering, Amazon S3 gateway endpoints, or Amazon Web Services Direct Connect virtual private gateway associations.
This field is required.Sourcepub fn set_vpc_id(self, input: Option<String>) -> Self
pub fn set_vpc_id(self, input: Option<String>) -> Self
A unique ID for the VPC that connects to the environment control plane for service access.
Amazon EVS requires that all VPC subnets exist in a single Availability Zone in a Region where the service is available.
The VPC that you select must have a valid DHCP option set with domain name, at least two DNS servers, and an NTP server. These settings are used to configure your VCF appliances and hosts.
If you plan to use HCX over the internet, choose a VPC that has a primary CIDR block and a /28 secondary CIDR block from an IPAM pool. Make sure that your VPC also has an attached internet gateway.
Amazon EVS does not support the following Amazon Web Services networking options for NSX overlay connectivity: cross-Region VPC peering, Amazon S3 gateway endpoints, or Amazon Web Services Direct Connect virtual private gateway associations.
Sourcepub fn get_vpc_id(&self) -> &Option<String>
pub fn get_vpc_id(&self) -> &Option<String>
A unique ID for the VPC that connects to the environment control plane for service access.
Amazon EVS requires that all VPC subnets exist in a single Availability Zone in a Region where the service is available.
The VPC that you select must have a valid DHCP option set with domain name, at least two DNS servers, and an NTP server. These settings are used to configure your VCF appliances and hosts.
If you plan to use HCX over the internet, choose a VPC that has a primary CIDR block and a /28 secondary CIDR block from an IPAM pool. Make sure that your VPC also has an attached internet gateway.
Amazon EVS does not support the following Amazon Web Services networking options for NSX overlay connectivity: cross-Region VPC peering, Amazon S3 gateway endpoints, or Amazon Web Services Direct Connect virtual private gateway associations.
Sourcepub fn service_access_subnet_id(self, input: impl Into<String>) -> Self
pub fn service_access_subnet_id(self, input: impl Into<String>) -> Self
The subnet that is used to establish connectivity between the Amazon EVS control plane and VPC. Amazon EVS uses this subnet to validate mandatory DNS records for your VCF appliances and hosts and create the environment.
This field is required.Sourcepub fn set_service_access_subnet_id(self, input: Option<String>) -> Self
pub fn set_service_access_subnet_id(self, input: Option<String>) -> Self
The subnet that is used to establish connectivity between the Amazon EVS control plane and VPC. Amazon EVS uses this subnet to validate mandatory DNS records for your VCF appliances and hosts and create the environment.
Sourcepub fn get_service_access_subnet_id(&self) -> &Option<String>
pub fn get_service_access_subnet_id(&self) -> &Option<String>
The subnet that is used to establish connectivity between the Amazon EVS control plane and VPC. Amazon EVS uses this subnet to validate mandatory DNS records for your VCF appliances and hosts and create the environment.
Sourcepub fn vcf_version(self, input: VcfVersion) -> Self
pub fn vcf_version(self, input: VcfVersion) -> Self
The VCF version to use for the environment. Amazon EVS only supports VCF version 5.2.1 at this time.
This field is required.Sourcepub fn set_vcf_version(self, input: Option<VcfVersion>) -> Self
pub fn set_vcf_version(self, input: Option<VcfVersion>) -> Self
The VCF version to use for the environment. Amazon EVS only supports VCF version 5.2.1 at this time.
Sourcepub fn get_vcf_version(&self) -> &Option<VcfVersion>
pub fn get_vcf_version(&self) -> &Option<VcfVersion>
The VCF version to use for the environment. Amazon EVS only supports VCF version 5.2.1 at this time.
Sourcepub fn terms_accepted(self, input: bool) -> Self
pub fn terms_accepted(self, input: bool) -> Self
Customer confirmation that the customer has purchased and maintains sufficient VCF software licenses to cover all physical processor cores in the environment, in compliance with VMware's licensing requirements and terms of use.
This field is required.Sourcepub fn set_terms_accepted(self, input: Option<bool>) -> Self
pub fn set_terms_accepted(self, input: Option<bool>) -> Self
Customer confirmation that the customer has purchased and maintains sufficient VCF software licenses to cover all physical processor cores in the environment, in compliance with VMware's licensing requirements and terms of use.
Sourcepub fn get_terms_accepted(&self) -> &Option<bool>
pub fn get_terms_accepted(&self) -> &Option<bool>
Customer confirmation that the customer has purchased and maintains sufficient VCF software licenses to cover all physical processor cores in the environment, in compliance with VMware's licensing requirements and terms of use.
Sourcepub fn license_info(self, input: LicenseInfo) -> Self
pub fn license_info(self, input: LicenseInfo) -> Self
Appends an item to license_info
.
To override the contents of this collection use set_license_info
.
The license information that Amazon EVS requires to create an environment. Amazon EVS requires two license keys: a VCF solution key and a vSAN license key. VCF licenses must have sufficient core entitlements to cover vCPU core and vSAN storage capacity needs.
VCF licenses can be used for only one Amazon EVS environment. Amazon EVS does not support reuse of VCF licenses for multiple environments.
VCF license information can be retrieved from the Broadcom portal.
Sourcepub fn set_license_info(self, input: Option<Vec<LicenseInfo>>) -> Self
pub fn set_license_info(self, input: Option<Vec<LicenseInfo>>) -> Self
The license information that Amazon EVS requires to create an environment. Amazon EVS requires two license keys: a VCF solution key and a vSAN license key. VCF licenses must have sufficient core entitlements to cover vCPU core and vSAN storage capacity needs.
VCF licenses can be used for only one Amazon EVS environment. Amazon EVS does not support reuse of VCF licenses for multiple environments.
VCF license information can be retrieved from the Broadcom portal.
Sourcepub fn get_license_info(&self) -> &Option<Vec<LicenseInfo>>
pub fn get_license_info(&self) -> &Option<Vec<LicenseInfo>>
The license information that Amazon EVS requires to create an environment. Amazon EVS requires two license keys: a VCF solution key and a vSAN license key. VCF licenses must have sufficient core entitlements to cover vCPU core and vSAN storage capacity needs.
VCF licenses can be used for only one Amazon EVS environment. Amazon EVS does not support reuse of VCF licenses for multiple environments.
VCF license information can be retrieved from the Broadcom portal.
Sourcepub fn initial_vlans(self, input: InitialVlans) -> Self
pub fn initial_vlans(self, input: InitialVlans) -> Self
The initial VLAN subnets for the environment. You must specify a non-overlapping CIDR block for each VLAN subnet.
This field is required.Sourcepub fn set_initial_vlans(self, input: Option<InitialVlans>) -> Self
pub fn set_initial_vlans(self, input: Option<InitialVlans>) -> Self
The initial VLAN subnets for the environment. You must specify a non-overlapping CIDR block for each VLAN subnet.
Sourcepub fn get_initial_vlans(&self) -> &Option<InitialVlans>
pub fn get_initial_vlans(&self) -> &Option<InitialVlans>
The initial VLAN subnets for the environment. You must specify a non-overlapping CIDR block for each VLAN subnet.
Sourcepub fn hosts(self, input: HostInfoForCreate) -> Self
pub fn hosts(self, input: HostInfoForCreate) -> Self
Appends an item to hosts
.
To override the contents of this collection use set_hosts
.
The ESXi hosts to add to the environment. Amazon EVS requires that you provide details for a minimum of 4 hosts during environment creation.
For each host, you must provide the desired hostname, EC2 SSH key, and EC2 instance type. Optionally, you can also provide a partition or cluster placement group to use, or use Amazon EC2 Dedicated Hosts.
Sourcepub fn set_hosts(self, input: Option<Vec<HostInfoForCreate>>) -> Self
pub fn set_hosts(self, input: Option<Vec<HostInfoForCreate>>) -> Self
The ESXi hosts to add to the environment. Amazon EVS requires that you provide details for a minimum of 4 hosts during environment creation.
For each host, you must provide the desired hostname, EC2 SSH key, and EC2 instance type. Optionally, you can also provide a partition or cluster placement group to use, or use Amazon EC2 Dedicated Hosts.
Sourcepub fn get_hosts(&self) -> &Option<Vec<HostInfoForCreate>>
pub fn get_hosts(&self) -> &Option<Vec<HostInfoForCreate>>
The ESXi hosts to add to the environment. Amazon EVS requires that you provide details for a minimum of 4 hosts during environment creation.
For each host, you must provide the desired hostname, EC2 SSH key, and EC2 instance type. Optionally, you can also provide a partition or cluster placement group to use, or use Amazon EC2 Dedicated Hosts.
Sourcepub fn connectivity_info(self, input: ConnectivityInfo) -> Self
pub fn connectivity_info(self, input: ConnectivityInfo) -> Self
The connectivity configuration for the environment. Amazon EVS requires that you specify two route server peer IDs. During environment creation, the route server endpoints peer with the NSX edges over the NSX, providing BGP dynamic routing for overlay networks.
This field is required.Sourcepub fn set_connectivity_info(self, input: Option<ConnectivityInfo>) -> Self
pub fn set_connectivity_info(self, input: Option<ConnectivityInfo>) -> Self
The connectivity configuration for the environment. Amazon EVS requires that you specify two route server peer IDs. During environment creation, the route server endpoints peer with the NSX edges over the NSX, providing BGP dynamic routing for overlay networks.
Sourcepub fn get_connectivity_info(&self) -> &Option<ConnectivityInfo>
pub fn get_connectivity_info(&self) -> &Option<ConnectivityInfo>
The connectivity configuration for the environment. Amazon EVS requires that you specify two route server peer IDs. During environment creation, the route server endpoints peer with the NSX edges over the NSX, providing BGP dynamic routing for overlay networks.
Sourcepub fn vcf_hostnames(self, input: VcfHostnames) -> Self
pub fn vcf_hostnames(self, input: VcfHostnames) -> Self
The DNS hostnames for the virtual machines that host the VCF management appliances. Amazon EVS requires that you provide DNS hostnames for the following appliances: vCenter, NSX Manager, SDDC Manager, and Cloud Builder.
This field is required.Sourcepub fn set_vcf_hostnames(self, input: Option<VcfHostnames>) -> Self
pub fn set_vcf_hostnames(self, input: Option<VcfHostnames>) -> Self
The DNS hostnames for the virtual machines that host the VCF management appliances. Amazon EVS requires that you provide DNS hostnames for the following appliances: vCenter, NSX Manager, SDDC Manager, and Cloud Builder.
Sourcepub fn get_vcf_hostnames(&self) -> &Option<VcfHostnames>
pub fn get_vcf_hostnames(&self) -> &Option<VcfHostnames>
The DNS hostnames for the virtual machines that host the VCF management appliances. Amazon EVS requires that you provide DNS hostnames for the following appliances: vCenter, NSX Manager, SDDC Manager, and Cloud Builder.
Sourcepub fn site_id(self, input: impl Into<String>) -> Self
pub fn site_id(self, input: impl Into<String>) -> Self
The Broadcom Site ID that is allocated to you as part of your electronic software delivery. This ID allows customer access to the Broadcom portal, and is provided to you by Broadcom at the close of your software contract or contract renewal. Amazon EVS uses the Broadcom Site ID that you provide to meet Broadcom VCF license usage reporting requirements for Amazon EVS.
This field is required.Sourcepub fn set_site_id(self, input: Option<String>) -> Self
pub fn set_site_id(self, input: Option<String>) -> Self
The Broadcom Site ID that is allocated to you as part of your electronic software delivery. This ID allows customer access to the Broadcom portal, and is provided to you by Broadcom at the close of your software contract or contract renewal. Amazon EVS uses the Broadcom Site ID that you provide to meet Broadcom VCF license usage reporting requirements for Amazon EVS.
Sourcepub fn get_site_id(&self) -> &Option<String>
pub fn get_site_id(&self) -> &Option<String>
The Broadcom Site ID that is allocated to you as part of your electronic software delivery. This ID allows customer access to the Broadcom portal, and is provided to you by Broadcom at the close of your software contract or contract renewal. Amazon EVS uses the Broadcom Site ID that you provide to meet Broadcom VCF license usage reporting requirements for Amazon EVS.
Sourcepub fn build(self) -> Result<CreateEnvironmentInput, BuildError>
pub fn build(self) -> Result<CreateEnvironmentInput, BuildError>
Consumes the builder and constructs a CreateEnvironmentInput
.
Source§impl CreateEnvironmentInputBuilder
impl CreateEnvironmentInputBuilder
Sourcepub async fn send_with(
self,
client: &Client,
) -> Result<CreateEnvironmentOutput, SdkError<CreateEnvironmentError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<CreateEnvironmentOutput, SdkError<CreateEnvironmentError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
Source§impl Clone for CreateEnvironmentInputBuilder
impl Clone for CreateEnvironmentInputBuilder
Source§fn clone(&self) -> CreateEnvironmentInputBuilder
fn clone(&self) -> CreateEnvironmentInputBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for CreateEnvironmentInputBuilder
impl Default for CreateEnvironmentInputBuilder
Source§fn default() -> CreateEnvironmentInputBuilder
fn default() -> CreateEnvironmentInputBuilder
Source§impl PartialEq for CreateEnvironmentInputBuilder
impl PartialEq for CreateEnvironmentInputBuilder
Source§fn eq(&self, other: &CreateEnvironmentInputBuilder) -> bool
fn eq(&self, other: &CreateEnvironmentInputBuilder) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for CreateEnvironmentInputBuilder
Auto Trait Implementations§
impl Freeze for CreateEnvironmentInputBuilder
impl RefUnwindSafe for CreateEnvironmentInputBuilder
impl Send for CreateEnvironmentInputBuilder
impl Sync for CreateEnvironmentInputBuilder
impl Unpin for CreateEnvironmentInputBuilder
impl UnwindSafe for CreateEnvironmentInputBuilder
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);