pub struct UpdateFunctionConfigurationFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to UpdateFunctionConfiguration
.
Modify the version-specific settings of a Lambda function.
When you update a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute. During this time, you can't modify the function, but you can still invoke it. The LastUpdateStatus
, LastUpdateStatusReason
, and LastUpdateStatusReasonCode
fields in the response from GetFunctionConfiguration
indicate when the update is complete and the function is processing events with the new configuration. For more information, see Lambda function states.
These settings can vary between versions of a function and are locked when you publish a version. You can't modify the configuration of a published version, only the unpublished version.
To configure function concurrency, use PutFunctionConcurrency
. To grant invoke permissions to an Amazon Web Services account or Amazon Web Services service, use AddPermission
.
Implementations§
Source§impl UpdateFunctionConfigurationFluentBuilder
impl UpdateFunctionConfigurationFluentBuilder
Sourcepub fn as_input(&self) -> &UpdateFunctionConfigurationInputBuilder
pub fn as_input(&self) -> &UpdateFunctionConfigurationInputBuilder
Access the UpdateFunctionConfiguration as a reference.
Sourcepub async fn send(
self,
) -> Result<UpdateFunctionConfigurationOutput, SdkError<UpdateFunctionConfigurationError, HttpResponse>>
pub async fn send( self, ) -> Result<UpdateFunctionConfigurationOutput, SdkError<UpdateFunctionConfigurationError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
Sourcepub fn customize(
self,
) -> CustomizableOperation<UpdateFunctionConfigurationOutput, UpdateFunctionConfigurationError, Self>
pub fn customize( self, ) -> CustomizableOperation<UpdateFunctionConfigurationOutput, UpdateFunctionConfigurationError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
Sourcepub fn function_name(self, input: impl Into<String>) -> Self
pub fn function_name(self, input: impl Into<String>) -> Self
The name or ARN of the Lambda function.
Name formats
-
Function name –
my-function
. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN –
123456789012:function:my-function
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Sourcepub fn set_function_name(self, input: Option<String>) -> Self
pub fn set_function_name(self, input: Option<String>) -> Self
The name or ARN of the Lambda function.
Name formats
-
Function name –
my-function
. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN –
123456789012:function:my-function
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Sourcepub fn get_function_name(&self) -> &Option<String>
pub fn get_function_name(&self) -> &Option<String>
The name or ARN of the Lambda function.
Name formats
-
Function name –
my-function
. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function
. -
Partial ARN –
123456789012:function:my-function
.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
Sourcepub fn role(self, input: impl Into<String>) -> Self
pub fn role(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the function's execution role.
Sourcepub fn set_role(self, input: Option<String>) -> Self
pub fn set_role(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the function's execution role.
Sourcepub fn get_role(&self) -> &Option<String>
pub fn get_role(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the function's execution role.
Sourcepub fn handler(self, input: impl Into<String>) -> Self
pub fn handler(self, input: impl Into<String>) -> Self
The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
Sourcepub fn set_handler(self, input: Option<String>) -> Self
pub fn set_handler(self, input: Option<String>) -> Self
The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
Sourcepub fn get_handler(&self) -> &Option<String>
pub fn get_handler(&self) -> &Option<String>
The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model.
Sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description of the function.
Sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description of the function.
Sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
A description of the function.
Sourcepub fn timeout(self, input: i32) -> Self
pub fn timeout(self, input: i32) -> Self
The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
Sourcepub fn set_timeout(self, input: Option<i32>) -> Self
pub fn set_timeout(self, input: Option<i32>) -> Self
The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
Sourcepub fn get_timeout(&self) -> &Option<i32>
pub fn get_timeout(&self) -> &Option<i32>
The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.
Sourcepub fn memory_size(self, input: i32) -> Self
pub fn memory_size(self, input: i32) -> Self
The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
Sourcepub fn set_memory_size(self, input: Option<i32>) -> Self
pub fn set_memory_size(self, input: Option<i32>) -> Self
The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
Sourcepub fn get_memory_size(&self) -> &Option<i32>
pub fn get_memory_size(&self) -> &Option<i32>
The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
Sourcepub fn vpc_config(self, input: VpcConfig) -> Self
pub fn vpc_config(self, input: VpcConfig) -> Self
For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
Sourcepub fn set_vpc_config(self, input: Option<VpcConfig>) -> Self
pub fn set_vpc_config(self, input: Option<VpcConfig>) -> Self
For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
Sourcepub fn get_vpc_config(&self) -> &Option<VpcConfig>
pub fn get_vpc_config(&self) -> &Option<VpcConfig>
For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC.
Sourcepub fn environment(self, input: Environment) -> Self
pub fn environment(self, input: Environment) -> Self
Environment variables that are accessible from function code during execution.
Sourcepub fn set_environment(self, input: Option<Environment>) -> Self
pub fn set_environment(self, input: Option<Environment>) -> Self
Environment variables that are accessible from function code during execution.
Sourcepub fn get_environment(&self) -> &Option<Environment>
pub fn get_environment(&self) -> &Option<Environment>
Environment variables that are accessible from function code during execution.
Sourcepub fn runtime(self, input: Runtime) -> Self
pub fn runtime(self, input: Runtime) -> Self
The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.
The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
Sourcepub fn set_runtime(self, input: Option<Runtime>) -> Self
pub fn set_runtime(self, input: Option<Runtime>) -> Self
The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.
The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
Sourcepub fn get_runtime(&self) -> &Option<Runtime>
pub fn get_runtime(&self) -> &Option<Runtime>
The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.
The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation.
For a list of all currently supported runtimes, see Supported runtimes.
Sourcepub fn dead_letter_config(self, input: DeadLetterConfig) -> Self
pub fn dead_letter_config(self, input: DeadLetterConfig) -> Self
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
Sourcepub fn set_dead_letter_config(self, input: Option<DeadLetterConfig>) -> Self
pub fn set_dead_letter_config(self, input: Option<DeadLetterConfig>) -> Self
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
Sourcepub fn get_dead_letter_config(&self) -> &Option<DeadLetterConfig>
pub fn get_dead_letter_config(&self) -> &Option<DeadLetterConfig>
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues.
Sourcepub fn kms_key_arn(self, input: impl Into<String>) -> Self
pub fn kms_key_arn(self, input: impl Into<String>) -> Self
The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:
-
The function's environment variables.
-
The function's Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn
, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see Function lifecycle.
If you don't provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
Sourcepub fn set_kms_key_arn(self, input: Option<String>) -> Self
pub fn set_kms_key_arn(self, input: Option<String>) -> Self
The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:
-
The function's environment variables.
-
The function's Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn
, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see Function lifecycle.
If you don't provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
Sourcepub fn get_kms_key_arn(&self) -> &Option<String>
pub fn get_kms_key_arn(&self) -> &Option<String>
The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:
-
The function's environment variables.
-
The function's Lambda SnapStart snapshots.
-
When used with
SourceKMSKeyArn
, the unzipped version of the .zip deployment package that's used for function invocations. For more information, see Specifying a customer managed key for Lambda. -
The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see Function lifecycle.
If you don't provide a customer managed key, Lambda uses an Amazon Web Services owned key or an Amazon Web Services managed key.
Sourcepub fn tracing_config(self, input: TracingConfig) -> Self
pub fn tracing_config(self, input: TracingConfig) -> Self
Set Mode
to Active
to sample and trace a subset of incoming requests with X-Ray.
Sourcepub fn set_tracing_config(self, input: Option<TracingConfig>) -> Self
pub fn set_tracing_config(self, input: Option<TracingConfig>) -> Self
Set Mode
to Active
to sample and trace a subset of incoming requests with X-Ray.
Sourcepub fn get_tracing_config(&self) -> &Option<TracingConfig>
pub fn get_tracing_config(&self) -> &Option<TracingConfig>
Set Mode
to Active
to sample and trace a subset of incoming requests with X-Ray.
Sourcepub fn revision_id(self, input: impl Into<String>) -> Self
pub fn revision_id(self, input: impl Into<String>) -> Self
Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.
Sourcepub fn set_revision_id(self, input: Option<String>) -> Self
pub fn set_revision_id(self, input: Option<String>) -> Self
Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.
Sourcepub fn get_revision_id(&self) -> &Option<String>
pub fn get_revision_id(&self) -> &Option<String>
Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.
Sourcepub fn layers(self, input: impl Into<String>) -> Self
pub fn layers(self, input: impl Into<String>) -> Self
Appends an item to Layers
.
To override the contents of this collection use set_layers
.
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
Sourcepub fn set_layers(self, input: Option<Vec<String>>) -> Self
pub fn set_layers(self, input: Option<Vec<String>>) -> Self
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
Sourcepub fn get_layers(&self) -> &Option<Vec<String>>
pub fn get_layers(&self) -> &Option<Vec<String>>
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
Sourcepub fn file_system_configs(self, input: FileSystemConfig) -> Self
pub fn file_system_configs(self, input: FileSystemConfig) -> Self
Appends an item to FileSystemConfigs
.
To override the contents of this collection use set_file_system_configs
.
Connection settings for an Amazon EFS file system.
Sourcepub fn set_file_system_configs(
self,
input: Option<Vec<FileSystemConfig>>,
) -> Self
pub fn set_file_system_configs( self, input: Option<Vec<FileSystemConfig>>, ) -> Self
Connection settings for an Amazon EFS file system.
Sourcepub fn get_file_system_configs(&self) -> &Option<Vec<FileSystemConfig>>
pub fn get_file_system_configs(&self) -> &Option<Vec<FileSystemConfig>>
Connection settings for an Amazon EFS file system.
Sourcepub fn image_config(self, input: ImageConfig) -> Self
pub fn image_config(self, input: ImageConfig) -> Self
Container image configuration values that override the values in the container image Docker file.
Sourcepub fn set_image_config(self, input: Option<ImageConfig>) -> Self
pub fn set_image_config(self, input: Option<ImageConfig>) -> Self
Container image configuration values that override the values in the container image Docker file.
Sourcepub fn get_image_config(&self) -> &Option<ImageConfig>
pub fn get_image_config(&self) -> &Option<ImageConfig>
Container image configuration values that override the values in the container image Docker file.
Sourcepub fn ephemeral_storage(self, input: EphemeralStorage) -> Self
pub fn ephemeral_storage(self, input: EphemeralStorage) -> Self
The size of the function's /tmp
directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).
Sourcepub fn set_ephemeral_storage(self, input: Option<EphemeralStorage>) -> Self
pub fn set_ephemeral_storage(self, input: Option<EphemeralStorage>) -> Self
The size of the function's /tmp
directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).
Sourcepub fn get_ephemeral_storage(&self) -> &Option<EphemeralStorage>
pub fn get_ephemeral_storage(&self) -> &Option<EphemeralStorage>
The size of the function's /tmp
directory in MB. The default value is 512, but can be any whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage (console).
Sourcepub fn snap_start(self, input: SnapStart) -> Self
pub fn snap_start(self, input: SnapStart) -> Self
The function's SnapStart setting.
Sourcepub fn set_snap_start(self, input: Option<SnapStart>) -> Self
pub fn set_snap_start(self, input: Option<SnapStart>) -> Self
The function's SnapStart setting.
Sourcepub fn get_snap_start(&self) -> &Option<SnapStart>
pub fn get_snap_start(&self) -> &Option<SnapStart>
The function's SnapStart setting.
Sourcepub fn logging_config(self, input: LoggingConfig) -> Self
pub fn logging_config(self, input: LoggingConfig) -> Self
The function's Amazon CloudWatch Logs configuration settings.
Sourcepub fn set_logging_config(self, input: Option<LoggingConfig>) -> Self
pub fn set_logging_config(self, input: Option<LoggingConfig>) -> Self
The function's Amazon CloudWatch Logs configuration settings.
Sourcepub fn get_logging_config(&self) -> &Option<LoggingConfig>
pub fn get_logging_config(&self) -> &Option<LoggingConfig>
The function's Amazon CloudWatch Logs configuration settings.
Trait Implementations§
Source§impl Clone for UpdateFunctionConfigurationFluentBuilder
impl Clone for UpdateFunctionConfigurationFluentBuilder
Source§fn clone(&self) -> UpdateFunctionConfigurationFluentBuilder
fn clone(&self) -> UpdateFunctionConfigurationFluentBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for UpdateFunctionConfigurationFluentBuilder
impl !RefUnwindSafe for UpdateFunctionConfigurationFluentBuilder
impl Send for UpdateFunctionConfigurationFluentBuilder
impl Sync for UpdateFunctionConfigurationFluentBuilder
impl Unpin for UpdateFunctionConfigurationFluentBuilder
impl !UnwindSafe for UpdateFunctionConfigurationFluentBuilder
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);