#[non_exhaustive]pub struct DevEndpointBuilder { /* private fields */ }
Expand description
A builder for DevEndpoint
.
Implementations§
Source§impl DevEndpointBuilder
impl DevEndpointBuilder
Sourcepub fn endpoint_name(self, input: impl Into<String>) -> Self
pub fn endpoint_name(self, input: impl Into<String>) -> Self
The name of the DevEndpoint
.
Sourcepub fn set_endpoint_name(self, input: Option<String>) -> Self
pub fn set_endpoint_name(self, input: Option<String>) -> Self
The name of the DevEndpoint
.
Sourcepub fn get_endpoint_name(&self) -> &Option<String>
pub fn get_endpoint_name(&self) -> &Option<String>
The name of the DevEndpoint
.
Sourcepub fn role_arn(self, input: impl Into<String>) -> Self
pub fn role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role used in this DevEndpoint
.
Sourcepub fn set_role_arn(self, input: Option<String>) -> Self
pub fn set_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role used in this DevEndpoint
.
Sourcepub fn get_role_arn(&self) -> &Option<String>
pub fn get_role_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the IAM role used in this DevEndpoint
.
Sourcepub fn security_group_ids(self, input: impl Into<String>) -> Self
pub fn security_group_ids(self, input: impl Into<String>) -> Self
Appends an item to security_group_ids
.
To override the contents of this collection use set_security_group_ids
.
A list of security group identifiers used in this DevEndpoint
.
Sourcepub fn set_security_group_ids(self, input: Option<Vec<String>>) -> Self
pub fn set_security_group_ids(self, input: Option<Vec<String>>) -> Self
A list of security group identifiers used in this DevEndpoint
.
Sourcepub fn get_security_group_ids(&self) -> &Option<Vec<String>>
pub fn get_security_group_ids(&self) -> &Option<Vec<String>>
A list of security group identifiers used in this DevEndpoint
.
Sourcepub fn set_subnet_id(self, input: Option<String>) -> Self
pub fn set_subnet_id(self, input: Option<String>) -> Self
The subnet ID for this DevEndpoint
.
Sourcepub fn get_subnet_id(&self) -> &Option<String>
pub fn get_subnet_id(&self) -> &Option<String>
The subnet ID for this DevEndpoint
.
Sourcepub fn yarn_endpoint_address(self, input: impl Into<String>) -> Self
pub fn yarn_endpoint_address(self, input: impl Into<String>) -> Self
The YARN endpoint address used by this DevEndpoint
.
Sourcepub fn set_yarn_endpoint_address(self, input: Option<String>) -> Self
pub fn set_yarn_endpoint_address(self, input: Option<String>) -> Self
The YARN endpoint address used by this DevEndpoint
.
Sourcepub fn get_yarn_endpoint_address(&self) -> &Option<String>
pub fn get_yarn_endpoint_address(&self) -> &Option<String>
The YARN endpoint address used by this DevEndpoint
.
Sourcepub fn private_address(self, input: impl Into<String>) -> Self
pub fn private_address(self, input: impl Into<String>) -> Self
A private IP address to access the DevEndpoint
within a VPC if the DevEndpoint
is created within one. The PrivateAddress
field is present only when you create the DevEndpoint
within your VPC.
Sourcepub fn set_private_address(self, input: Option<String>) -> Self
pub fn set_private_address(self, input: Option<String>) -> Self
A private IP address to access the DevEndpoint
within a VPC if the DevEndpoint
is created within one. The PrivateAddress
field is present only when you create the DevEndpoint
within your VPC.
Sourcepub fn get_private_address(&self) -> &Option<String>
pub fn get_private_address(&self) -> &Option<String>
A private IP address to access the DevEndpoint
within a VPC if the DevEndpoint
is created within one. The PrivateAddress
field is present only when you create the DevEndpoint
within your VPC.
Sourcepub fn zeppelin_remote_spark_interpreter_port(self, input: i32) -> Self
pub fn zeppelin_remote_spark_interpreter_port(self, input: i32) -> Self
The Apache Zeppelin port for the remote Apache Spark interpreter.
Sourcepub fn set_zeppelin_remote_spark_interpreter_port(
self,
input: Option<i32>,
) -> Self
pub fn set_zeppelin_remote_spark_interpreter_port( self, input: Option<i32>, ) -> Self
The Apache Zeppelin port for the remote Apache Spark interpreter.
Sourcepub fn get_zeppelin_remote_spark_interpreter_port(&self) -> &Option<i32>
pub fn get_zeppelin_remote_spark_interpreter_port(&self) -> &Option<i32>
The Apache Zeppelin port for the remote Apache Spark interpreter.
Sourcepub fn public_address(self, input: impl Into<String>) -> Self
pub fn public_address(self, input: impl Into<String>) -> Self
The public IP address used by this DevEndpoint
. The PublicAddress
field is present only when you create a non-virtual private cloud (VPC) DevEndpoint
.
Sourcepub fn set_public_address(self, input: Option<String>) -> Self
pub fn set_public_address(self, input: Option<String>) -> Self
The public IP address used by this DevEndpoint
. The PublicAddress
field is present only when you create a non-virtual private cloud (VPC) DevEndpoint
.
Sourcepub fn get_public_address(&self) -> &Option<String>
pub fn get_public_address(&self) -> &Option<String>
The public IP address used by this DevEndpoint
. The PublicAddress
field is present only when you create a non-virtual private cloud (VPC) DevEndpoint
.
Sourcepub fn set_status(self, input: Option<String>) -> Self
pub fn set_status(self, input: Option<String>) -> Self
The current status of this DevEndpoint
.
Sourcepub fn get_status(&self) -> &Option<String>
pub fn get_status(&self) -> &Option<String>
The current status of this DevEndpoint
.
Sourcepub fn worker_type(self, input: WorkerType) -> Self
pub fn worker_type(self, input: WorkerType) -> Self
The type of predefined worker that is allocated to the development endpoint. Accepts a value of Standard, G.1X, or G.2X.
-
For the
Standard
worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker. -
For the
G.1X
worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs. -
For the
G.2X
worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.
Known issue: when a development endpoint is created with the G.2X
WorkerType
configuration, the Spark drivers for the development endpoint will run on 4 vCPU, 16 GB of memory, and a 64 GB disk.
Sourcepub fn set_worker_type(self, input: Option<WorkerType>) -> Self
pub fn set_worker_type(self, input: Option<WorkerType>) -> Self
The type of predefined worker that is allocated to the development endpoint. Accepts a value of Standard, G.1X, or G.2X.
-
For the
Standard
worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker. -
For the
G.1X
worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs. -
For the
G.2X
worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.
Known issue: when a development endpoint is created with the G.2X
WorkerType
configuration, the Spark drivers for the development endpoint will run on 4 vCPU, 16 GB of memory, and a 64 GB disk.
Sourcepub fn get_worker_type(&self) -> &Option<WorkerType>
pub fn get_worker_type(&self) -> &Option<WorkerType>
The type of predefined worker that is allocated to the development endpoint. Accepts a value of Standard, G.1X, or G.2X.
-
For the
Standard
worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker. -
For the
G.1X
worker type, each worker maps to 1 DPU (4 vCPU, 16 GB of memory, 64 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs. -
For the
G.2X
worker type, each worker maps to 2 DPU (8 vCPU, 32 GB of memory, 128 GB disk), and provides 1 executor per worker. We recommend this worker type for memory-intensive jobs.
Known issue: when a development endpoint is created with the G.2X
WorkerType
configuration, the Spark drivers for the development endpoint will run on 4 vCPU, 16 GB of memory, and a 64 GB disk.
Sourcepub fn glue_version(self, input: impl Into<String>) -> Self
pub fn glue_version(self, input: impl Into<String>) -> Self
Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates the version supported for running your ETL scripts on development endpoints.
For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
Development endpoints that are created without specifying a Glue version default to Glue 0.9.
You can specify a version of Python support for development endpoints by using the Arguments
parameter in the CreateDevEndpoint
or UpdateDevEndpoint
APIs. If no arguments are provided, the version defaults to Python 2.
Sourcepub fn set_glue_version(self, input: Option<String>) -> Self
pub fn set_glue_version(self, input: Option<String>) -> Self
Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates the version supported for running your ETL scripts on development endpoints.
For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
Development endpoints that are created without specifying a Glue version default to Glue 0.9.
You can specify a version of Python support for development endpoints by using the Arguments
parameter in the CreateDevEndpoint
or UpdateDevEndpoint
APIs. If no arguments are provided, the version defaults to Python 2.
Sourcepub fn get_glue_version(&self) -> &Option<String>
pub fn get_glue_version(&self) -> &Option<String>
Glue version determines the versions of Apache Spark and Python that Glue supports. The Python version indicates the version supported for running your ETL scripts on development endpoints.
For more information about the available Glue versions and corresponding Spark and Python versions, see Glue version in the developer guide.
Development endpoints that are created without specifying a Glue version default to Glue 0.9.
You can specify a version of Python support for development endpoints by using the Arguments
parameter in the CreateDevEndpoint
or UpdateDevEndpoint
APIs. If no arguments are provided, the version defaults to Python 2.
Sourcepub fn number_of_workers(self, input: i32) -> Self
pub fn number_of_workers(self, input: i32) -> Self
The number of workers of a defined workerType
that are allocated to the development endpoint.
The maximum number of workers you can define are 299 for G.1X
, and 149 for G.2X
.
Sourcepub fn set_number_of_workers(self, input: Option<i32>) -> Self
pub fn set_number_of_workers(self, input: Option<i32>) -> Self
The number of workers of a defined workerType
that are allocated to the development endpoint.
The maximum number of workers you can define are 299 for G.1X
, and 149 for G.2X
.
Sourcepub fn get_number_of_workers(&self) -> &Option<i32>
pub fn get_number_of_workers(&self) -> &Option<i32>
The number of workers of a defined workerType
that are allocated to the development endpoint.
The maximum number of workers you can define are 299 for G.1X
, and 149 for G.2X
.
Sourcepub fn number_of_nodes(self, input: i32) -> Self
pub fn number_of_nodes(self, input: i32) -> Self
The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint
.
Sourcepub fn set_number_of_nodes(self, input: Option<i32>) -> Self
pub fn set_number_of_nodes(self, input: Option<i32>) -> Self
The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint
.
Sourcepub fn get_number_of_nodes(&self) -> &Option<i32>
pub fn get_number_of_nodes(&self) -> &Option<i32>
The number of Glue Data Processing Units (DPUs) allocated to this DevEndpoint
.
Sourcepub fn availability_zone(self, input: impl Into<String>) -> Self
pub fn availability_zone(self, input: impl Into<String>) -> Self
The Amazon Web Services Availability Zone where this DevEndpoint
is located.
Sourcepub fn set_availability_zone(self, input: Option<String>) -> Self
pub fn set_availability_zone(self, input: Option<String>) -> Self
The Amazon Web Services Availability Zone where this DevEndpoint
is located.
Sourcepub fn get_availability_zone(&self) -> &Option<String>
pub fn get_availability_zone(&self) -> &Option<String>
The Amazon Web Services Availability Zone where this DevEndpoint
is located.
Sourcepub fn vpc_id(self, input: impl Into<String>) -> Self
pub fn vpc_id(self, input: impl Into<String>) -> Self
The ID of the virtual private cloud (VPC) used by this DevEndpoint
.
Sourcepub fn set_vpc_id(self, input: Option<String>) -> Self
pub fn set_vpc_id(self, input: Option<String>) -> Self
The ID of the virtual private cloud (VPC) used by this DevEndpoint
.
Sourcepub fn get_vpc_id(&self) -> &Option<String>
pub fn get_vpc_id(&self) -> &Option<String>
The ID of the virtual private cloud (VPC) used by this DevEndpoint
.
Sourcepub fn extra_python_libs_s3_path(self, input: impl Into<String>) -> Self
pub fn extra_python_libs_s3_path(self, input: impl Into<String>) -> Self
The paths to one or more Python libraries in an Amazon S3 bucket that should be loaded in your DevEndpoint
. Multiple values must be complete paths separated by a comma.
You can only use pure Python libraries with a DevEndpoint
. Libraries that rely on C extensions, such as the pandas Python data analysis library, are not currently supported.
Sourcepub fn set_extra_python_libs_s3_path(self, input: Option<String>) -> Self
pub fn set_extra_python_libs_s3_path(self, input: Option<String>) -> Self
The paths to one or more Python libraries in an Amazon S3 bucket that should be loaded in your DevEndpoint
. Multiple values must be complete paths separated by a comma.
You can only use pure Python libraries with a DevEndpoint
. Libraries that rely on C extensions, such as the pandas Python data analysis library, are not currently supported.
Sourcepub fn get_extra_python_libs_s3_path(&self) -> &Option<String>
pub fn get_extra_python_libs_s3_path(&self) -> &Option<String>
The paths to one or more Python libraries in an Amazon S3 bucket that should be loaded in your DevEndpoint
. Multiple values must be complete paths separated by a comma.
You can only use pure Python libraries with a DevEndpoint
. Libraries that rely on C extensions, such as the pandas Python data analysis library, are not currently supported.
Sourcepub fn extra_jars_s3_path(self, input: impl Into<String>) -> Self
pub fn extra_jars_s3_path(self, input: impl Into<String>) -> Self
The path to one or more Java .jar
files in an S3 bucket that should be loaded in your DevEndpoint
.
You can only use pure Java/Scala libraries with a DevEndpoint
.
Sourcepub fn set_extra_jars_s3_path(self, input: Option<String>) -> Self
pub fn set_extra_jars_s3_path(self, input: Option<String>) -> Self
The path to one or more Java .jar
files in an S3 bucket that should be loaded in your DevEndpoint
.
You can only use pure Java/Scala libraries with a DevEndpoint
.
Sourcepub fn get_extra_jars_s3_path(&self) -> &Option<String>
pub fn get_extra_jars_s3_path(&self) -> &Option<String>
The path to one or more Java .jar
files in an S3 bucket that should be loaded in your DevEndpoint
.
You can only use pure Java/Scala libraries with a DevEndpoint
.
Sourcepub fn failure_reason(self, input: impl Into<String>) -> Self
pub fn failure_reason(self, input: impl Into<String>) -> Self
The reason for a current failure in this DevEndpoint
.
Sourcepub fn set_failure_reason(self, input: Option<String>) -> Self
pub fn set_failure_reason(self, input: Option<String>) -> Self
The reason for a current failure in this DevEndpoint
.
Sourcepub fn get_failure_reason(&self) -> &Option<String>
pub fn get_failure_reason(&self) -> &Option<String>
The reason for a current failure in this DevEndpoint
.
Sourcepub fn last_update_status(self, input: impl Into<String>) -> Self
pub fn last_update_status(self, input: impl Into<String>) -> Self
The status of the last update.
Sourcepub fn set_last_update_status(self, input: Option<String>) -> Self
pub fn set_last_update_status(self, input: Option<String>) -> Self
The status of the last update.
Sourcepub fn get_last_update_status(&self) -> &Option<String>
pub fn get_last_update_status(&self) -> &Option<String>
The status of the last update.
Sourcepub fn created_timestamp(self, input: DateTime) -> Self
pub fn created_timestamp(self, input: DateTime) -> Self
The point in time at which this DevEndpoint was created.
Sourcepub fn set_created_timestamp(self, input: Option<DateTime>) -> Self
pub fn set_created_timestamp(self, input: Option<DateTime>) -> Self
The point in time at which this DevEndpoint was created.
Sourcepub fn get_created_timestamp(&self) -> &Option<DateTime>
pub fn get_created_timestamp(&self) -> &Option<DateTime>
The point in time at which this DevEndpoint was created.
Sourcepub fn last_modified_timestamp(self, input: DateTime) -> Self
pub fn last_modified_timestamp(self, input: DateTime) -> Self
The point in time at which this DevEndpoint
was last modified.
Sourcepub fn set_last_modified_timestamp(self, input: Option<DateTime>) -> Self
pub fn set_last_modified_timestamp(self, input: Option<DateTime>) -> Self
The point in time at which this DevEndpoint
was last modified.
Sourcepub fn get_last_modified_timestamp(&self) -> &Option<DateTime>
pub fn get_last_modified_timestamp(&self) -> &Option<DateTime>
The point in time at which this DevEndpoint
was last modified.
Sourcepub fn public_key(self, input: impl Into<String>) -> Self
pub fn public_key(self, input: impl Into<String>) -> Self
The public key to be used by this DevEndpoint
for authentication. This attribute is provided for backward compatibility because the recommended attribute to use is public keys.
Sourcepub fn set_public_key(self, input: Option<String>) -> Self
pub fn set_public_key(self, input: Option<String>) -> Self
The public key to be used by this DevEndpoint
for authentication. This attribute is provided for backward compatibility because the recommended attribute to use is public keys.
Sourcepub fn get_public_key(&self) -> &Option<String>
pub fn get_public_key(&self) -> &Option<String>
The public key to be used by this DevEndpoint
for authentication. This attribute is provided for backward compatibility because the recommended attribute to use is public keys.
Sourcepub fn public_keys(self, input: impl Into<String>) -> Self
pub fn public_keys(self, input: impl Into<String>) -> Self
Appends an item to public_keys
.
To override the contents of this collection use set_public_keys
.
A list of public keys to be used by the DevEndpoints
for authentication. Using this attribute is preferred over a single public key because the public keys allow you to have a different private key per client.
If you previously created an endpoint with a public key, you must remove that key to be able to set a list of public keys. Call the UpdateDevEndpoint
API operation with the public key content in the deletePublicKeys
attribute, and the list of new keys in the addPublicKeys
attribute.
Sourcepub fn set_public_keys(self, input: Option<Vec<String>>) -> Self
pub fn set_public_keys(self, input: Option<Vec<String>>) -> Self
A list of public keys to be used by the DevEndpoints
for authentication. Using this attribute is preferred over a single public key because the public keys allow you to have a different private key per client.
If you previously created an endpoint with a public key, you must remove that key to be able to set a list of public keys. Call the UpdateDevEndpoint
API operation with the public key content in the deletePublicKeys
attribute, and the list of new keys in the addPublicKeys
attribute.
Sourcepub fn get_public_keys(&self) -> &Option<Vec<String>>
pub fn get_public_keys(&self) -> &Option<Vec<String>>
A list of public keys to be used by the DevEndpoints
for authentication. Using this attribute is preferred over a single public key because the public keys allow you to have a different private key per client.
If you previously created an endpoint with a public key, you must remove that key to be able to set a list of public keys. Call the UpdateDevEndpoint
API operation with the public key content in the deletePublicKeys
attribute, and the list of new keys in the addPublicKeys
attribute.
Sourcepub fn security_configuration(self, input: impl Into<String>) -> Self
pub fn security_configuration(self, input: impl Into<String>) -> Self
The name of the SecurityConfiguration
structure to be used with this DevEndpoint
.
Sourcepub fn set_security_configuration(self, input: Option<String>) -> Self
pub fn set_security_configuration(self, input: Option<String>) -> Self
The name of the SecurityConfiguration
structure to be used with this DevEndpoint
.
Sourcepub fn get_security_configuration(&self) -> &Option<String>
pub fn get_security_configuration(&self) -> &Option<String>
The name of the SecurityConfiguration
structure to be used with this DevEndpoint
.
Sourcepub fn arguments(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn arguments(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to arguments
.
To override the contents of this collection use set_arguments
.
A map of arguments used to configure the DevEndpoint
.
Valid arguments are:
-
"--enable-glue-datacatalog": ""
You can specify a version of Python support for development endpoints by using the Arguments
parameter in the CreateDevEndpoint
or UpdateDevEndpoint
APIs. If no arguments are provided, the version defaults to Python 2.
Sourcepub fn set_arguments(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_arguments(self, input: Option<HashMap<String, String>>) -> Self
A map of arguments used to configure the DevEndpoint
.
Valid arguments are:
-
"--enable-glue-datacatalog": ""
You can specify a version of Python support for development endpoints by using the Arguments
parameter in the CreateDevEndpoint
or UpdateDevEndpoint
APIs. If no arguments are provided, the version defaults to Python 2.
Sourcepub fn get_arguments(&self) -> &Option<HashMap<String, String>>
pub fn get_arguments(&self) -> &Option<HashMap<String, String>>
A map of arguments used to configure the DevEndpoint
.
Valid arguments are:
-
"--enable-glue-datacatalog": ""
You can specify a version of Python support for development endpoints by using the Arguments
parameter in the CreateDevEndpoint
or UpdateDevEndpoint
APIs. If no arguments are provided, the version defaults to Python 2.
Sourcepub fn build(self) -> DevEndpoint
pub fn build(self) -> DevEndpoint
Consumes the builder and constructs a DevEndpoint
.
Trait Implementations§
Source§impl Clone for DevEndpointBuilder
impl Clone for DevEndpointBuilder
Source§fn clone(&self) -> DevEndpointBuilder
fn clone(&self) -> DevEndpointBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DevEndpointBuilder
impl Debug for DevEndpointBuilder
Source§impl Default for DevEndpointBuilder
impl Default for DevEndpointBuilder
Source§fn default() -> DevEndpointBuilder
fn default() -> DevEndpointBuilder
Source§impl PartialEq for DevEndpointBuilder
impl PartialEq for DevEndpointBuilder
impl StructuralPartialEq for DevEndpointBuilder
Auto Trait Implementations§
impl Freeze for DevEndpointBuilder
impl RefUnwindSafe for DevEndpointBuilder
impl Send for DevEndpointBuilder
impl Sync for DevEndpointBuilder
impl Unpin for DevEndpointBuilder
impl UnwindSafe for DevEndpointBuilder
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);