#[non_exhaustive]pub struct AppBuilder { /* private fields */ }
Expand description
A builder for App
.
Implementations§
Source§impl AppBuilder
impl AppBuilder
Sourcepub fn app_id(self, input: impl Into<String>) -> Self
pub fn app_id(self, input: impl Into<String>) -> Self
The unique ID of the Amplify app.
This field is required.Sourcepub fn set_app_id(self, input: Option<String>) -> Self
pub fn set_app_id(self, input: Option<String>) -> Self
The unique ID of the Amplify app.
Sourcepub fn get_app_id(&self) -> &Option<String>
pub fn get_app_id(&self) -> &Option<String>
The unique ID of the Amplify app.
Sourcepub fn app_arn(self, input: impl Into<String>) -> Self
pub fn app_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the Amplify app.
This field is required.Sourcepub fn set_app_arn(self, input: Option<String>) -> Self
pub fn set_app_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the Amplify app.
Sourcepub fn get_app_arn(&self) -> &Option<String>
pub fn get_app_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the Amplify app.
Sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name for the Amplify app.
This field is required.Adds a key-value pair to tags
.
To override the contents of this collection use set_tags
.
The tag for the Amplify app.
The tag for the Amplify app.
The tag for the Amplify app.
Sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
The description for the Amplify app.
This field is required.Sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
The description for the Amplify app.
Sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
The description for the Amplify app.
Sourcepub fn repository(self, input: impl Into<String>) -> Self
pub fn repository(self, input: impl Into<String>) -> Self
The Git repository for the Amplify app.
This field is required.Sourcepub fn set_repository(self, input: Option<String>) -> Self
pub fn set_repository(self, input: Option<String>) -> Self
The Git repository for the Amplify app.
Sourcepub fn get_repository(&self) -> &Option<String>
pub fn get_repository(&self) -> &Option<String>
The Git repository for the Amplify app.
Sourcepub fn platform(self, input: Platform) -> Self
pub fn platform(self, input: Platform) -> Self
The platform for the Amplify app. For a static app, set the platform type to WEB
. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE
. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC
.
If you are deploying an SSG only app with Next.js 14 or later, you must use the platform type WEB_COMPUTE
.
Sourcepub fn set_platform(self, input: Option<Platform>) -> Self
pub fn set_platform(self, input: Option<Platform>) -> Self
The platform for the Amplify app. For a static app, set the platform type to WEB
. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE
. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC
.
If you are deploying an SSG only app with Next.js 14 or later, you must use the platform type WEB_COMPUTE
.
Sourcepub fn get_platform(&self) -> &Option<Platform>
pub fn get_platform(&self) -> &Option<Platform>
The platform for the Amplify app. For a static app, set the platform type to WEB
. For a dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE
. For an app requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC
.
If you are deploying an SSG only app with Next.js 14 or later, you must use the platform type WEB_COMPUTE
.
Sourcepub fn create_time(self, input: DateTime) -> Self
pub fn create_time(self, input: DateTime) -> Self
A timestamp of when Amplify created the application.
This field is required.Sourcepub fn set_create_time(self, input: Option<DateTime>) -> Self
pub fn set_create_time(self, input: Option<DateTime>) -> Self
A timestamp of when Amplify created the application.
Sourcepub fn get_create_time(&self) -> &Option<DateTime>
pub fn get_create_time(&self) -> &Option<DateTime>
A timestamp of when Amplify created the application.
Sourcepub fn update_time(self, input: DateTime) -> Self
pub fn update_time(self, input: DateTime) -> Self
A timestamp of when Amplify updated the application.
This field is required.Sourcepub fn set_update_time(self, input: Option<DateTime>) -> Self
pub fn set_update_time(self, input: Option<DateTime>) -> Self
A timestamp of when Amplify updated the application.
Sourcepub fn get_update_time(&self) -> &Option<DateTime>
pub fn get_update_time(&self) -> &Option<DateTime>
A timestamp of when Amplify updated the application.
Sourcepub fn compute_role_arn(self, input: impl Into<String>) -> Self
pub fn compute_role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role for an SSR app. The Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see Adding an SSR Compute role in the Amplify User Guide.
Sourcepub fn set_compute_role_arn(self, input: Option<String>) -> Self
pub fn set_compute_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the IAM role for an SSR app. The Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see Adding an SSR Compute role in the Amplify User Guide.
Sourcepub fn get_compute_role_arn(&self) -> &Option<String>
pub fn get_compute_role_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the IAM role for an SSR app. The Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see Adding an SSR Compute role in the Amplify User Guide.
Sourcepub fn iam_service_role_arn(self, input: impl Into<String>) -> Self
pub fn iam_service_role_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.
Sourcepub fn set_iam_service_role_arn(self, input: Option<String>) -> Self
pub fn set_iam_service_role_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.
Sourcepub fn get_iam_service_role_arn(&self) -> &Option<String>
pub fn get_iam_service_role_arn(&self) -> &Option<String>
The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.
Sourcepub fn environment_variables(
self,
k: impl Into<String>,
v: impl Into<String>,
) -> Self
pub fn environment_variables( self, k: impl Into<String>, v: impl Into<String>, ) -> Self
Adds a key-value pair to environment_variables
.
To override the contents of this collection use set_environment_variables
.
The environment variables for the Amplify app.
For a list of the environment variables that are accessible to Amplify by default, see Amplify Environment variables in the Amplify Hosting User Guide.
Sourcepub fn set_environment_variables(
self,
input: Option<HashMap<String, String>>,
) -> Self
pub fn set_environment_variables( self, input: Option<HashMap<String, String>>, ) -> Self
The environment variables for the Amplify app.
For a list of the environment variables that are accessible to Amplify by default, see Amplify Environment variables in the Amplify Hosting User Guide.
Sourcepub fn get_environment_variables(&self) -> &Option<HashMap<String, String>>
pub fn get_environment_variables(&self) -> &Option<HashMap<String, String>>
The environment variables for the Amplify app.
For a list of the environment variables that are accessible to Amplify by default, see Amplify Environment variables in the Amplify Hosting User Guide.
Sourcepub fn default_domain(self, input: impl Into<String>) -> Self
pub fn default_domain(self, input: impl Into<String>) -> Self
The default domain for the Amplify app.
This field is required.Sourcepub fn set_default_domain(self, input: Option<String>) -> Self
pub fn set_default_domain(self, input: Option<String>) -> Self
The default domain for the Amplify app.
Sourcepub fn get_default_domain(&self) -> &Option<String>
pub fn get_default_domain(&self) -> &Option<String>
The default domain for the Amplify app.
Sourcepub fn enable_branch_auto_build(self, input: bool) -> Self
pub fn enable_branch_auto_build(self, input: bool) -> Self
Enables the auto-building of branches for the Amplify app.
This field is required.Sourcepub fn set_enable_branch_auto_build(self, input: Option<bool>) -> Self
pub fn set_enable_branch_auto_build(self, input: Option<bool>) -> Self
Enables the auto-building of branches for the Amplify app.
Sourcepub fn get_enable_branch_auto_build(&self) -> &Option<bool>
pub fn get_enable_branch_auto_build(&self) -> &Option<bool>
Enables the auto-building of branches for the Amplify app.
Sourcepub fn enable_branch_auto_deletion(self, input: bool) -> Self
pub fn enable_branch_auto_deletion(self, input: bool) -> Self
Automatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.
Sourcepub fn set_enable_branch_auto_deletion(self, input: Option<bool>) -> Self
pub fn set_enable_branch_auto_deletion(self, input: Option<bool>) -> Self
Automatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.
Sourcepub fn get_enable_branch_auto_deletion(&self) -> &Option<bool>
pub fn get_enable_branch_auto_deletion(&self) -> &Option<bool>
Automatically disconnect a branch in the Amplify console when you delete a branch from your Git repository.
Sourcepub fn enable_basic_auth(self, input: bool) -> Self
pub fn enable_basic_auth(self, input: bool) -> Self
Enables basic authorization for the Amplify app's branches.
This field is required.Sourcepub fn set_enable_basic_auth(self, input: Option<bool>) -> Self
pub fn set_enable_basic_auth(self, input: Option<bool>) -> Self
Enables basic authorization for the Amplify app's branches.
Sourcepub fn get_enable_basic_auth(&self) -> &Option<bool>
pub fn get_enable_basic_auth(&self) -> &Option<bool>
Enables basic authorization for the Amplify app's branches.
Sourcepub fn basic_auth_credentials(self, input: impl Into<String>) -> Self
pub fn basic_auth_credentials(self, input: impl Into<String>) -> Self
The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password
.
Sourcepub fn set_basic_auth_credentials(self, input: Option<String>) -> Self
pub fn set_basic_auth_credentials(self, input: Option<String>) -> Self
The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password
.
Sourcepub fn get_basic_auth_credentials(&self) -> &Option<String>
pub fn get_basic_auth_credentials(&self) -> &Option<String>
The basic authorization credentials for branches for the Amplify app. You must base64-encode the authorization credentials and provide them in the format user:password
.
Sourcepub fn custom_rules(self, input: CustomRule) -> Self
pub fn custom_rules(self, input: CustomRule) -> Self
Appends an item to custom_rules
.
To override the contents of this collection use set_custom_rules
.
Describes the custom redirect and rewrite rules for the Amplify app.
Sourcepub fn set_custom_rules(self, input: Option<Vec<CustomRule>>) -> Self
pub fn set_custom_rules(self, input: Option<Vec<CustomRule>>) -> Self
Describes the custom redirect and rewrite rules for the Amplify app.
Sourcepub fn get_custom_rules(&self) -> &Option<Vec<CustomRule>>
pub fn get_custom_rules(&self) -> &Option<Vec<CustomRule>>
Describes the custom redirect and rewrite rules for the Amplify app.
Sourcepub fn production_branch(self, input: ProductionBranch) -> Self
pub fn production_branch(self, input: ProductionBranch) -> Self
Describes the information about a production branch of the Amplify app.
Sourcepub fn set_production_branch(self, input: Option<ProductionBranch>) -> Self
pub fn set_production_branch(self, input: Option<ProductionBranch>) -> Self
Describes the information about a production branch of the Amplify app.
Sourcepub fn get_production_branch(&self) -> &Option<ProductionBranch>
pub fn get_production_branch(&self) -> &Option<ProductionBranch>
Describes the information about a production branch of the Amplify app.
Sourcepub fn build_spec(self, input: impl Into<String>) -> Self
pub fn build_spec(self, input: impl Into<String>) -> Self
Describes the content of the build specification (build spec) for the Amplify app.
Sourcepub fn set_build_spec(self, input: Option<String>) -> Self
pub fn set_build_spec(self, input: Option<String>) -> Self
Describes the content of the build specification (build spec) for the Amplify app.
Sourcepub fn get_build_spec(&self) -> &Option<String>
pub fn get_build_spec(&self) -> &Option<String>
Describes the content of the build specification (build spec) for the Amplify app.
Sourcepub fn custom_headers(self, input: impl Into<String>) -> Self
pub fn custom_headers(self, input: impl Into<String>) -> Self
Describes the custom HTTP headers for the Amplify app.
Sourcepub fn set_custom_headers(self, input: Option<String>) -> Self
pub fn set_custom_headers(self, input: Option<String>) -> Self
Describes the custom HTTP headers for the Amplify app.
Sourcepub fn get_custom_headers(&self) -> &Option<String>
pub fn get_custom_headers(&self) -> &Option<String>
Describes the custom HTTP headers for the Amplify app.
Sourcepub fn enable_auto_branch_creation(self, input: bool) -> Self
pub fn enable_auto_branch_creation(self, input: bool) -> Self
Enables automated branch creation for the Amplify app.
Sourcepub fn set_enable_auto_branch_creation(self, input: Option<bool>) -> Self
pub fn set_enable_auto_branch_creation(self, input: Option<bool>) -> Self
Enables automated branch creation for the Amplify app.
Sourcepub fn get_enable_auto_branch_creation(&self) -> &Option<bool>
pub fn get_enable_auto_branch_creation(&self) -> &Option<bool>
Enables automated branch creation for the Amplify app.
Sourcepub fn auto_branch_creation_patterns(self, input: impl Into<String>) -> Self
pub fn auto_branch_creation_patterns(self, input: impl Into<String>) -> Self
Appends an item to auto_branch_creation_patterns
.
To override the contents of this collection use set_auto_branch_creation_patterns
.
Describes the automated branch creation glob patterns for the Amplify app.
Sourcepub fn set_auto_branch_creation_patterns(
self,
input: Option<Vec<String>>,
) -> Self
pub fn set_auto_branch_creation_patterns( self, input: Option<Vec<String>>, ) -> Self
Describes the automated branch creation glob patterns for the Amplify app.
Sourcepub fn get_auto_branch_creation_patterns(&self) -> &Option<Vec<String>>
pub fn get_auto_branch_creation_patterns(&self) -> &Option<Vec<String>>
Describes the automated branch creation glob patterns for the Amplify app.
Sourcepub fn auto_branch_creation_config(
self,
input: AutoBranchCreationConfig,
) -> Self
pub fn auto_branch_creation_config( self, input: AutoBranchCreationConfig, ) -> Self
Describes the automated branch creation configuration for the Amplify app.
Sourcepub fn set_auto_branch_creation_config(
self,
input: Option<AutoBranchCreationConfig>,
) -> Self
pub fn set_auto_branch_creation_config( self, input: Option<AutoBranchCreationConfig>, ) -> Self
Describes the automated branch creation configuration for the Amplify app.
Sourcepub fn get_auto_branch_creation_config(
&self,
) -> &Option<AutoBranchCreationConfig>
pub fn get_auto_branch_creation_config( &self, ) -> &Option<AutoBranchCreationConfig>
Describes the automated branch creation configuration for the Amplify app.
Sourcepub fn repository_clone_method(self, input: RepositoryCloneMethod) -> Self
pub fn repository_clone_method(self, input: RepositoryCloneMethod) -> Self
This is for internal use.
The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN
for a GitHub repository, SIGV4
for an Amazon Web Services CodeCommit repository, and SSH
for GitLab and Bitbucket repositories.
Sourcepub fn set_repository_clone_method(
self,
input: Option<RepositoryCloneMethod>,
) -> Self
pub fn set_repository_clone_method( self, input: Option<RepositoryCloneMethod>, ) -> Self
This is for internal use.
The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN
for a GitHub repository, SIGV4
for an Amazon Web Services CodeCommit repository, and SSH
for GitLab and Bitbucket repositories.
Sourcepub fn get_repository_clone_method(&self) -> &Option<RepositoryCloneMethod>
pub fn get_repository_clone_method(&self) -> &Option<RepositoryCloneMethod>
This is for internal use.
The Amplify service uses this parameter to specify the authentication protocol to use to access the Git repository for an Amplify app. Amplify specifies TOKEN
for a GitHub repository, SIGV4
for an Amazon Web Services CodeCommit repository, and SSH
for GitLab and Bitbucket repositories.
Sourcepub fn cache_config(self, input: CacheConfig) -> Self
pub fn cache_config(self, input: CacheConfig) -> Self
The cache configuration for the Amplify app. If you don't specify the cache configuration type
, Amplify uses the default AMPLIFY_MANAGED
setting.
Sourcepub fn set_cache_config(self, input: Option<CacheConfig>) -> Self
pub fn set_cache_config(self, input: Option<CacheConfig>) -> Self
The cache configuration for the Amplify app. If you don't specify the cache configuration type
, Amplify uses the default AMPLIFY_MANAGED
setting.
Sourcepub fn get_cache_config(&self) -> &Option<CacheConfig>
pub fn get_cache_config(&self) -> &Option<CacheConfig>
The cache configuration for the Amplify app. If you don't specify the cache configuration type
, Amplify uses the default AMPLIFY_MANAGED
setting.
Sourcepub fn webhook_create_time(self, input: DateTime) -> Self
pub fn webhook_create_time(self, input: DateTime) -> Self
A timestamp of when Amplify created the webhook in your Git repository.
Sourcepub fn set_webhook_create_time(self, input: Option<DateTime>) -> Self
pub fn set_webhook_create_time(self, input: Option<DateTime>) -> Self
A timestamp of when Amplify created the webhook in your Git repository.
Sourcepub fn get_webhook_create_time(&self) -> &Option<DateTime>
pub fn get_webhook_create_time(&self) -> &Option<DateTime>
A timestamp of when Amplify created the webhook in your Git repository.
Sourcepub fn waf_configuration(self, input: WafConfiguration) -> Self
pub fn waf_configuration(self, input: WafConfiguration) -> Self
Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.
Sourcepub fn set_waf_configuration(self, input: Option<WafConfiguration>) -> Self
pub fn set_waf_configuration(self, input: Option<WafConfiguration>) -> Self
Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.
Sourcepub fn get_waf_configuration(&self) -> &Option<WafConfiguration>
pub fn get_waf_configuration(&self) -> &Option<WafConfiguration>
Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration with WAF.
Sourcepub fn job_config(self, input: JobConfig) -> Self
pub fn job_config(self, input: JobConfig) -> Self
The configuration details that apply to the jobs for an Amplify app.
Sourcepub fn set_job_config(self, input: Option<JobConfig>) -> Self
pub fn set_job_config(self, input: Option<JobConfig>) -> Self
The configuration details that apply to the jobs for an Amplify app.
Sourcepub fn get_job_config(&self) -> &Option<JobConfig>
pub fn get_job_config(&self) -> &Option<JobConfig>
The configuration details that apply to the jobs for an Amplify app.
Trait Implementations§
Source§impl Clone for AppBuilder
impl Clone for AppBuilder
Source§fn clone(&self) -> AppBuilder
fn clone(&self) -> AppBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AppBuilder
impl Debug for AppBuilder
Source§impl Default for AppBuilder
impl Default for AppBuilder
Source§fn default() -> AppBuilder
fn default() -> AppBuilder
Source§impl PartialEq for AppBuilder
impl PartialEq for AppBuilder
impl StructuralPartialEq for AppBuilder
Auto Trait Implementations§
impl Freeze for AppBuilder
impl RefUnwindSafe for AppBuilder
impl Send for AppBuilder
impl Sync for AppBuilder
impl Unpin for AppBuilder
impl UnwindSafe for AppBuilder
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);