#[non_exhaustive]pub struct RegisterImageInputBuilder { /* private fields */ }Expand description
A builder for RegisterImageInput.
Implementations§
Source§impl RegisterImageInputBuilder
impl RegisterImageInputBuilder
Sourcepub fn image_location(self, input: impl Into<String>) -> Self
pub fn image_location(self, input: impl Into<String>) -> Self
The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the aws-exec-read canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see Canned ACL in the Amazon S3 Service Developer Guide.
Sourcepub fn set_image_location(self, input: Option<String>) -> Self
pub fn set_image_location(self, input: Option<String>) -> Self
The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the aws-exec-read canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see Canned ACL in the Amazon S3 Service Developer Guide.
Sourcepub fn get_image_location(&self) -> &Option<String>
pub fn get_image_location(&self) -> &Option<String>
The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the aws-exec-read canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see Canned ACL in the Amazon S3 Service Developer Guide.
Sourcepub fn billing_products(self, input: impl Into<String>) -> Self
pub fn billing_products(self, input: impl Into<String>) -> Self
Appends an item to billing_products.
To override the contents of this collection use set_billing_products.
The billing product codes. Your account must be authorized to specify billing product codes.
If your account is not authorized to specify billing product codes, you can publish AMIs that include billable software and list them on the Amazon Web Services Marketplace. You must first register as a seller on the Amazon Web Services Marketplace. For more information, see Getting started as an Amazon Web Services Marketplace seller and AMI-based products in Amazon Web Services Marketplace in the Amazon Web Services Marketplace Seller Guide.
Sourcepub fn set_billing_products(self, input: Option<Vec<String>>) -> Self
pub fn set_billing_products(self, input: Option<Vec<String>>) -> Self
The billing product codes. Your account must be authorized to specify billing product codes.
If your account is not authorized to specify billing product codes, you can publish AMIs that include billable software and list them on the Amazon Web Services Marketplace. You must first register as a seller on the Amazon Web Services Marketplace. For more information, see Getting started as an Amazon Web Services Marketplace seller and AMI-based products in Amazon Web Services Marketplace in the Amazon Web Services Marketplace Seller Guide.
Sourcepub fn get_billing_products(&self) -> &Option<Vec<String>>
pub fn get_billing_products(&self) -> &Option<Vec<String>>
The billing product codes. Your account must be authorized to specify billing product codes.
If your account is not authorized to specify billing product codes, you can publish AMIs that include billable software and list them on the Amazon Web Services Marketplace. You must first register as a seller on the Amazon Web Services Marketplace. For more information, see Getting started as an Amazon Web Services Marketplace seller and AMI-based products in Amazon Web Services Marketplace in the Amazon Web Services Marketplace Seller Guide.
Sourcepub fn boot_mode(self, input: BootModeValues) -> Self
pub fn boot_mode(self, input: BootModeValues) -> Self
The boot mode of the AMI. A value of uefi-preferred indicates that the AMI supports both UEFI and Legacy BIOS.
The operating system contained in the AMI must be configured to support the specified boot mode.
For more information, see Instance launch behavior with Amazon EC2 boot modes in the Amazon EC2 User Guide.
Sourcepub fn set_boot_mode(self, input: Option<BootModeValues>) -> Self
pub fn set_boot_mode(self, input: Option<BootModeValues>) -> Self
The boot mode of the AMI. A value of uefi-preferred indicates that the AMI supports both UEFI and Legacy BIOS.
The operating system contained in the AMI must be configured to support the specified boot mode.
For more information, see Instance launch behavior with Amazon EC2 boot modes in the Amazon EC2 User Guide.
Sourcepub fn get_boot_mode(&self) -> &Option<BootModeValues>
pub fn get_boot_mode(&self) -> &Option<BootModeValues>
The boot mode of the AMI. A value of uefi-preferred indicates that the AMI supports both UEFI and Legacy BIOS.
The operating system contained in the AMI must be configured to support the specified boot mode.
For more information, see Instance launch behavior with Amazon EC2 boot modes in the Amazon EC2 User Guide.
Sourcepub fn tpm_support(self, input: TpmSupportValues) -> Self
pub fn tpm_support(self, input: TpmSupportValues) -> Self
Set to v2.0 to enable Trusted Platform Module (TPM) support. For more information, see NitroTPM in the Amazon EC2 User Guide.
Sourcepub fn set_tpm_support(self, input: Option<TpmSupportValues>) -> Self
pub fn set_tpm_support(self, input: Option<TpmSupportValues>) -> Self
Set to v2.0 to enable Trusted Platform Module (TPM) support. For more information, see NitroTPM in the Amazon EC2 User Guide.
Sourcepub fn get_tpm_support(&self) -> &Option<TpmSupportValues>
pub fn get_tpm_support(&self) -> &Option<TpmSupportValues>
Set to v2.0 to enable Trusted Platform Module (TPM) support. For more information, see NitroTPM in the Amazon EC2 User Guide.
Sourcepub fn uefi_data(self, input: impl Into<String>) -> Self
pub fn uefi_data(self, input: impl Into<String>) -> Self
Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see UEFI Secure Boot for Amazon EC2 instances in the Amazon EC2 User Guide.
Sourcepub fn set_uefi_data(self, input: Option<String>) -> Self
pub fn set_uefi_data(self, input: Option<String>) -> Self
Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see UEFI Secure Boot for Amazon EC2 instances in the Amazon EC2 User Guide.
Sourcepub fn get_uefi_data(&self) -> &Option<String>
pub fn get_uefi_data(&self) -> &Option<String>
Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the GetInstanceUefiData command. You can inspect and modify the UEFI data by using the python-uefivars tool on GitHub. For more information, see UEFI Secure Boot for Amazon EC2 instances in the Amazon EC2 User Guide.
Sourcepub fn imds_support(self, input: ImdsSupportValues) -> Self
pub fn imds_support(self, input: ImdsSupportValues) -> Self
Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will have HttpTokens automatically set to required so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide.
If you set the value to v2.0, make sure that your AMI software can support IMDSv2.
Sourcepub fn set_imds_support(self, input: Option<ImdsSupportValues>) -> Self
pub fn set_imds_support(self, input: Option<ImdsSupportValues>) -> Self
Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will have HttpTokens automatically set to required so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide.
If you set the value to v2.0, make sure that your AMI software can support IMDSv2.
Sourcepub fn get_imds_support(&self) -> &Option<ImdsSupportValues>
pub fn get_imds_support(&self) -> &Option<ImdsSupportValues>
Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched from this AMI will have HttpTokens automatically set to required so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, HttpPutResponseHopLimit is set to 2. For more information, see Configure the AMI in the Amazon EC2 User Guide.
If you set the value to v2.0, make sure that your AMI software can support IMDSv2.
Sourcepub fn tag_specifications(self, input: TagSpecification) -> Self
pub fn tag_specifications(self, input: TagSpecification) -> Self
Appends an item to tag_specifications.
To override the contents of this collection use set_tag_specifications.
The tags to apply to the AMI.
To tag the AMI, the value for ResourceType must be image. If you specify another value for ResourceType, the request fails.
To tag an AMI after it has been registered, see CreateTags.
Sourcepub fn set_tag_specifications(
self,
input: Option<Vec<TagSpecification>>,
) -> Self
pub fn set_tag_specifications( self, input: Option<Vec<TagSpecification>>, ) -> Self
The tags to apply to the AMI.
To tag the AMI, the value for ResourceType must be image. If you specify another value for ResourceType, the request fails.
To tag an AMI after it has been registered, see CreateTags.
Sourcepub fn get_tag_specifications(&self) -> &Option<Vec<TagSpecification>>
pub fn get_tag_specifications(&self) -> &Option<Vec<TagSpecification>>
The tags to apply to the AMI.
To tag the AMI, the value for ResourceType must be image. If you specify another value for ResourceType, the request fails.
To tag an AMI after it has been registered, see CreateTags.
Sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
Sourcepub fn set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
Sourcepub fn get_dry_run(&self) -> &Option<bool>
pub fn get_dry_run(&self) -> &Option<bool>
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
Sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
A name for your AMI.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
This field is required.Sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
A name for your AMI.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
Sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
A name for your AMI.
Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
Sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description for your AMI.
Sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description for your AMI.
Sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
A description for your AMI.
Sourcepub fn architecture(self, input: ArchitectureValues) -> Self
pub fn architecture(self, input: ArchitectureValues) -> Self
The architecture of the AMI.
Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, the architecture specified in the manifest file.
Sourcepub fn set_architecture(self, input: Option<ArchitectureValues>) -> Self
pub fn set_architecture(self, input: Option<ArchitectureValues>) -> Self
The architecture of the AMI.
Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, the architecture specified in the manifest file.
Sourcepub fn get_architecture(&self) -> &Option<ArchitectureValues>
pub fn get_architecture(&self) -> &Option<ArchitectureValues>
The architecture of the AMI.
Default: For Amazon EBS-backed AMIs, i386. For instance store-backed AMIs, the architecture specified in the manifest file.
Sourcepub fn set_kernel_id(self, input: Option<String>) -> Self
pub fn set_kernel_id(self, input: Option<String>) -> Self
The ID of the kernel.
Sourcepub fn get_kernel_id(&self) -> &Option<String>
pub fn get_kernel_id(&self) -> &Option<String>
The ID of the kernel.
Sourcepub fn ramdisk_id(self, input: impl Into<String>) -> Self
pub fn ramdisk_id(self, input: impl Into<String>) -> Self
The ID of the RAM disk.
Sourcepub fn set_ramdisk_id(self, input: Option<String>) -> Self
pub fn set_ramdisk_id(self, input: Option<String>) -> Self
The ID of the RAM disk.
Sourcepub fn get_ramdisk_id(&self) -> &Option<String>
pub fn get_ramdisk_id(&self) -> &Option<String>
The ID of the RAM disk.
Sourcepub fn root_device_name(self, input: impl Into<String>) -> Self
pub fn root_device_name(self, input: impl Into<String>) -> Self
The device name of the root device volume (for example, /dev/sda1).
Sourcepub fn set_root_device_name(self, input: Option<String>) -> Self
pub fn set_root_device_name(self, input: Option<String>) -> Self
The device name of the root device volume (for example, /dev/sda1).
Sourcepub fn get_root_device_name(&self) -> &Option<String>
pub fn get_root_device_name(&self) -> &Option<String>
The device name of the root device volume (for example, /dev/sda1).
Sourcepub fn block_device_mappings(self, input: BlockDeviceMapping) -> Self
pub fn block_device_mappings(self, input: BlockDeviceMapping) -> Self
Appends an item to block_device_mappings.
To override the contents of this collection use set_block_device_mappings.
The block device mapping entries.
If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.
If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, Create AMIs from local snapshots in the Amazon EBS User Guide.
Sourcepub fn set_block_device_mappings(
self,
input: Option<Vec<BlockDeviceMapping>>,
) -> Self
pub fn set_block_device_mappings( self, input: Option<Vec<BlockDeviceMapping>>, ) -> Self
The block device mapping entries.
If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.
If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, Create AMIs from local snapshots in the Amazon EBS User Guide.
Sourcepub fn get_block_device_mappings(&self) -> &Option<Vec<BlockDeviceMapping>>
pub fn get_block_device_mappings(&self) -> &Option<Vec<BlockDeviceMapping>>
The block device mapping entries.
If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.
If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, Create AMIs from local snapshots in the Amazon EBS User Guide.
Sourcepub fn virtualization_type(self, input: impl Into<String>) -> Self
pub fn virtualization_type(self, input: impl Into<String>) -> Self
The type of virtualization (hvm | paravirtual).
Default: paravirtual
Sourcepub fn set_virtualization_type(self, input: Option<String>) -> Self
pub fn set_virtualization_type(self, input: Option<String>) -> Self
The type of virtualization (hvm | paravirtual).
Default: paravirtual
Sourcepub fn get_virtualization_type(&self) -> &Option<String>
pub fn get_virtualization_type(&self) -> &Option<String>
The type of virtualization (hvm | paravirtual).
Default: paravirtual
Sourcepub fn sriov_net_support(self, input: impl Into<String>) -> Self
pub fn sriov_net_support(self, input: impl Into<String>) -> Self
Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.
There is no way to disable sriovNetSupport at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
Sourcepub fn set_sriov_net_support(self, input: Option<String>) -> Self
pub fn set_sriov_net_support(self, input: Option<String>) -> Self
Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.
There is no way to disable sriovNetSupport at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
Sourcepub fn get_sriov_net_support(&self) -> &Option<String>
pub fn get_sriov_net_support(&self) -> &Option<String>
Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.
There is no way to disable sriovNetSupport at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
Sourcepub fn ena_support(self, input: bool) -> Self
pub fn ena_support(self, input: bool) -> Self
Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
Sourcepub fn set_ena_support(self, input: Option<bool>) -> Self
pub fn set_ena_support(self, input: Option<bool>) -> Self
Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
Sourcepub fn get_ena_support(&self) -> &Option<bool>
pub fn get_ena_support(&self) -> &Option<bool>
Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
Sourcepub fn build(self) -> Result<RegisterImageInput, BuildError>
pub fn build(self) -> Result<RegisterImageInput, BuildError>
Consumes the builder and constructs a RegisterImageInput.
Source§impl RegisterImageInputBuilder
impl RegisterImageInputBuilder
Sourcepub async fn send_with(
self,
client: &Client,
) -> Result<RegisterImageOutput, SdkError<RegisterImageError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<RegisterImageOutput, SdkError<RegisterImageError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
Source§impl Clone for RegisterImageInputBuilder
impl Clone for RegisterImageInputBuilder
Source§fn clone(&self) -> RegisterImageInputBuilder
fn clone(&self) -> RegisterImageInputBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RegisterImageInputBuilder
impl Debug for RegisterImageInputBuilder
Source§impl Default for RegisterImageInputBuilder
impl Default for RegisterImageInputBuilder
Source§fn default() -> RegisterImageInputBuilder
fn default() -> RegisterImageInputBuilder
impl StructuralPartialEq for RegisterImageInputBuilder
Auto Trait Implementations§
impl Freeze for RegisterImageInputBuilder
impl RefUnwindSafe for RegisterImageInputBuilder
impl Send for RegisterImageInputBuilder
impl Sync for RegisterImageInputBuilder
impl Unpin for RegisterImageInputBuilder
impl UnwindSafe for RegisterImageInputBuilder
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);