#[non_exhaustive]pub struct PutIntentInputBuilder { /* private fields */ }Expand description
A builder for PutIntentInput.
Implementations§
Source§impl PutIntentInputBuilder
impl PutIntentInputBuilder
Sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of the intent. The name is not case sensitive.
The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called AMAZON.HelpIntent, you can't create a custom intent called HelpIntent.
For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.
This field is required.Sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of the intent. The name is not case sensitive.
The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called AMAZON.HelpIntent, you can't create a custom intent called HelpIntent.
For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.
Sourcepub fn get_name(&self) -> &Option<String>
pub fn get_name(&self) -> &Option<String>
The name of the intent. The name is not case sensitive.
The name can't match a built-in intent name, or a built-in intent name with "AMAZON." removed. For example, because there is a built-in intent called AMAZON.HelpIntent, you can't create a custom intent called HelpIntent.
For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit.
Sourcepub fn description(self, input: impl Into<String>) -> Self
pub fn description(self, input: impl Into<String>) -> Self
A description of the intent.
Sourcepub fn set_description(self, input: Option<String>) -> Self
pub fn set_description(self, input: Option<String>) -> Self
A description of the intent.
Sourcepub fn get_description(&self) -> &Option<String>
pub fn get_description(&self) -> &Option<String>
A description of the intent.
Sourcepub fn slots(self, input: Slot) -> Self
pub fn slots(self, input: Slot) -> Self
Appends an item to slots.
To override the contents of this collection use set_slots.
An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.
Sourcepub fn set_slots(self, input: Option<Vec<Slot>>) -> Self
pub fn set_slots(self, input: Option<Vec<Slot>>) -> Self
An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.
Sourcepub fn get_slots(&self) -> &Option<Vec<Slot>>
pub fn get_slots(&self) -> &Option<Vec<Slot>>
An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works.
Sourcepub fn sample_utterances(self, input: impl Into<String>) -> Self
pub fn sample_utterances(self, input: impl Into<String>) -> Self
Appends an item to sample_utterances.
To override the contents of this collection use set_sample_utterances.
An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
In each utterance, a slot name is enclosed in curly braces.
Sourcepub fn set_sample_utterances(self, input: Option<Vec<String>>) -> Self
pub fn set_sample_utterances(self, input: Option<Vec<String>>) -> Self
An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
In each utterance, a slot name is enclosed in curly braces.
Sourcepub fn get_sample_utterances(&self) -> &Option<Vec<String>>
pub fn get_sample_utterances(&self) -> &Option<Vec<String>>
An array of utterances (strings) that a user might say to signal the intent. For example, "I want {PizzaSize} pizza", "Order {Quantity} {PizzaSize} pizzas".
In each utterance, a slot name is enclosed in curly braces.
Sourcepub fn confirmation_prompt(self, input: Prompt) -> Self
pub fn confirmation_prompt(self, input: Prompt) -> Self
Prompts the user to confirm the intent. This question should have a yes or no answer.
Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
You you must provide both the rejectionStatement and the confirmationPrompt, or neither.
Sourcepub fn set_confirmation_prompt(self, input: Option<Prompt>) -> Self
pub fn set_confirmation_prompt(self, input: Option<Prompt>) -> Self
Prompts the user to confirm the intent. This question should have a yes or no answer.
Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
You you must provide both the rejectionStatement and the confirmationPrompt, or neither.
Sourcepub fn get_confirmation_prompt(&self) -> &Option<Prompt>
pub fn get_confirmation_prompt(&self) -> &Option<Prompt>
Prompts the user to confirm the intent. This question should have a yes or no answer.
Amazon Lex uses this prompt to ensure that the user acknowledges that the intent is ready for fulfillment. For example, with the OrderPizza intent, you might want to confirm that the order is correct before placing it. For other intents, such as intents that simply respond to user questions, you might not need to ask the user for confirmation before providing the information.
You you must provide both the rejectionStatement and the confirmationPrompt, or neither.
Sourcepub fn rejection_statement(self, input: Statement) -> Self
pub fn rejection_statement(self, input: Statement) -> Self
When the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
You must provide both the rejectionStatement and the confirmationPrompt, or neither.
Sourcepub fn set_rejection_statement(self, input: Option<Statement>) -> Self
pub fn set_rejection_statement(self, input: Option<Statement>) -> Self
When the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
You must provide both the rejectionStatement and the confirmationPrompt, or neither.
Sourcepub fn get_rejection_statement(&self) -> &Option<Statement>
pub fn get_rejection_statement(&self) -> &Option<Statement>
When the user answers "no" to the question defined in confirmationPrompt, Amazon Lex responds with this statement to acknowledge that the intent was canceled.
You must provide both the rejectionStatement and the confirmationPrompt, or neither.
Sourcepub fn follow_up_prompt(self, input: FollowUpPrompt) -> Self
pub fn follow_up_prompt(self, input: FollowUpPrompt) -> Self
Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the user to order a drink.
The action that Amazon Lex takes depends on the user's response, as follows:
-
If the user says "Yes" it responds with the clarification prompt that is configured for the bot.
-
if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.
-
If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.
-
If it doesn't recognize the utterance it repeats the follow-up prompt again.
The followUpPrompt field and the conclusionStatement field are mutually exclusive. You can specify only one.
Sourcepub fn set_follow_up_prompt(self, input: Option<FollowUpPrompt>) -> Self
pub fn set_follow_up_prompt(self, input: Option<FollowUpPrompt>) -> Self
Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the user to order a drink.
The action that Amazon Lex takes depends on the user's response, as follows:
-
If the user says "Yes" it responds with the clarification prompt that is configured for the bot.
-
if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.
-
If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.
-
If it doesn't recognize the utterance it repeats the follow-up prompt again.
The followUpPrompt field and the conclusionStatement field are mutually exclusive. You can specify only one.
Sourcepub fn get_follow_up_prompt(&self) -> &Option<FollowUpPrompt>
pub fn get_follow_up_prompt(&self) -> &Option<FollowUpPrompt>
Amazon Lex uses this prompt to solicit additional activity after fulfilling an intent. For example, after the OrderPizza intent is fulfilled, you might prompt the user to order a drink.
The action that Amazon Lex takes depends on the user's response, as follows:
-
If the user says "Yes" it responds with the clarification prompt that is configured for the bot.
-
if the user says "Yes" and continues with an utterance that triggers an intent it starts a conversation for the intent.
-
If the user says "No" it responds with the rejection statement configured for the the follow-up prompt.
-
If it doesn't recognize the utterance it repeats the follow-up prompt again.
The followUpPrompt field and the conclusionStatement field are mutually exclusive. You can specify only one.
Sourcepub fn conclusion_statement(self, input: Statement) -> Self
pub fn conclusion_statement(self, input: Statement) -> Self
The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.
This element is relevant only if you provide a Lambda function in the fulfillmentActivity. If you return the intent to the client application, you can't specify this element.
The followUpPrompt and conclusionStatement are mutually exclusive. You can specify only one.
Sourcepub fn set_conclusion_statement(self, input: Option<Statement>) -> Self
pub fn set_conclusion_statement(self, input: Option<Statement>) -> Self
The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.
This element is relevant only if you provide a Lambda function in the fulfillmentActivity. If you return the intent to the client application, you can't specify this element.
The followUpPrompt and conclusionStatement are mutually exclusive. You can specify only one.
Sourcepub fn get_conclusion_statement(&self) -> &Option<Statement>
pub fn get_conclusion_statement(&self) -> &Option<Statement>
The statement that you want Amazon Lex to convey to the user after the intent is successfully fulfilled by the Lambda function.
This element is relevant only if you provide a Lambda function in the fulfillmentActivity. If you return the intent to the client application, you can't specify this element.
The followUpPrompt and conclusionStatement are mutually exclusive. You can specify only one.
Sourcepub fn dialog_code_hook(self, input: CodeHook) -> Self
pub fn dialog_code_hook(self, input: CodeHook) -> Self
Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.
For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, GlutenIntolerant, to true. You might find John's phone number and set the corresponding session attribute.
Sourcepub fn set_dialog_code_hook(self, input: Option<CodeHook>) -> Self
pub fn set_dialog_code_hook(self, input: Option<CodeHook>) -> Self
Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.
For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, GlutenIntolerant, to true. You might find John's phone number and set the corresponding session attribute.
Sourcepub fn get_dialog_code_hook(&self) -> &Option<CodeHook>
pub fn get_dialog_code_hook(&self) -> &Option<CodeHook>
Specifies a Lambda function to invoke for each user input. You can invoke this Lambda function to personalize user interaction.
For example, suppose your bot determines that the user is John. Your Lambda function might retrieve John's information from a backend database and prepopulate some of the values. For example, if you find that John is gluten intolerant, you might set the corresponding intent slot, GlutenIntolerant, to true. You might find John's phone number and set the corresponding session attribute.
Sourcepub fn fulfillment_activity(self, input: FulfillmentActivity) -> Self
pub fn fulfillment_activity(self, input: FulfillmentActivity) -> Self
Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, fulfillmentActivity defines how the bot places an order with a local pizza store.
You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria).
Sourcepub fn set_fulfillment_activity(
self,
input: Option<FulfillmentActivity>,
) -> Self
pub fn set_fulfillment_activity( self, input: Option<FulfillmentActivity>, ) -> Self
Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, fulfillmentActivity defines how the bot places an order with a local pizza store.
You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria).
Sourcepub fn get_fulfillment_activity(&self) -> &Option<FulfillmentActivity>
pub fn get_fulfillment_activity(&self) -> &Option<FulfillmentActivity>
Required. Describes how the intent is fulfilled. For example, after a user provides all of the information for a pizza order, fulfillmentActivity defines how the bot places an order with a local pizza store.
You might configure Amazon Lex to return all of the intent information to the client application, or direct it to invoke a Lambda function that can process the intent (for example, place an order with a pizzeria).
Sourcepub fn parent_intent_signature(self, input: impl Into<String>) -> Self
pub fn parent_intent_signature(self, input: impl Into<String>) -> Self
A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.
Sourcepub fn set_parent_intent_signature(self, input: Option<String>) -> Self
pub fn set_parent_intent_signature(self, input: Option<String>) -> Self
A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.
Sourcepub fn get_parent_intent_signature(&self) -> &Option<String>
pub fn get_parent_intent_signature(&self) -> &Option<String>
A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit.
Sourcepub fn checksum(self, input: impl Into<String>) -> Self
pub fn checksum(self, input: impl Into<String>) -> Self
Identifies a specific revision of the $LATEST version.
When you create a new intent, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception.
When you want to update a intent, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.
Sourcepub fn set_checksum(self, input: Option<String>) -> Self
pub fn set_checksum(self, input: Option<String>) -> Self
Identifies a specific revision of the $LATEST version.
When you create a new intent, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception.
When you want to update a intent, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.
Sourcepub fn get_checksum(&self) -> &Option<String>
pub fn get_checksum(&self) -> &Option<String>
Identifies a specific revision of the $LATEST version.
When you create a new intent, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception.
When you want to update a intent, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception.
Sourcepub fn create_version(self, input: bool) -> Self
pub fn create_version(self, input: bool) -> Self
When set to true a new numbered version of the intent is created. This is the same as calling the CreateIntentVersion operation. If you do not specify createVersion, the default is false.
Sourcepub fn set_create_version(self, input: Option<bool>) -> Self
pub fn set_create_version(self, input: Option<bool>) -> Self
When set to true a new numbered version of the intent is created. This is the same as calling the CreateIntentVersion operation. If you do not specify createVersion, the default is false.
Sourcepub fn get_create_version(&self) -> &Option<bool>
pub fn get_create_version(&self) -> &Option<bool>
When set to true a new numbered version of the intent is created. This is the same as calling the CreateIntentVersion operation. If you do not specify createVersion, the default is false.
Sourcepub fn kendra_configuration(self, input: KendraConfiguration) -> Self
pub fn kendra_configuration(self, input: KendraConfiguration) -> Self
Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.
Sourcepub fn set_kendra_configuration(
self,
input: Option<KendraConfiguration>,
) -> Self
pub fn set_kendra_configuration( self, input: Option<KendraConfiguration>, ) -> Self
Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.
Sourcepub fn get_kendra_configuration(&self) -> &Option<KendraConfiguration>
pub fn get_kendra_configuration(&self) -> &Option<KendraConfiguration>
Configuration information required to use the AMAZON.KendraSearchIntent intent to connect to an Amazon Kendra index. For more information, see AMAZON.KendraSearchIntent.
Sourcepub fn input_contexts(self, input: InputContext) -> Self
pub fn input_contexts(self, input: InputContext) -> Self
Appends an item to input_contexts.
To override the contents of this collection use set_input_contexts.
An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
Sourcepub fn set_input_contexts(self, input: Option<Vec<InputContext>>) -> Self
pub fn set_input_contexts(self, input: Option<Vec<InputContext>>) -> Self
An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
Sourcepub fn get_input_contexts(&self) -> &Option<Vec<InputContext>>
pub fn get_input_contexts(&self) -> &Option<Vec<InputContext>>
An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user.
Sourcepub fn output_contexts(self, input: OutputContext) -> Self
pub fn output_contexts(self, input: OutputContext) -> Self
Appends an item to output_contexts.
To override the contents of this collection use set_output_contexts.
An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
Sourcepub fn set_output_contexts(self, input: Option<Vec<OutputContext>>) -> Self
pub fn set_output_contexts(self, input: Option<Vec<OutputContext>>) -> Self
An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
Sourcepub fn get_output_contexts(&self) -> &Option<Vec<OutputContext>>
pub fn get_output_contexts(&self) -> &Option<Vec<OutputContext>>
An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled.
Sourcepub fn build(self) -> Result<PutIntentInput, BuildError>
pub fn build(self) -> Result<PutIntentInput, BuildError>
Consumes the builder and constructs a PutIntentInput.
Source§impl PutIntentInputBuilder
impl PutIntentInputBuilder
Sourcepub async fn send_with(
self,
client: &Client,
) -> Result<PutIntentOutput, SdkError<PutIntentError, HttpResponse>>
pub async fn send_with( self, client: &Client, ) -> Result<PutIntentOutput, SdkError<PutIntentError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
Source§impl Clone for PutIntentInputBuilder
impl Clone for PutIntentInputBuilder
Source§fn clone(&self) -> PutIntentInputBuilder
fn clone(&self) -> PutIntentInputBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PutIntentInputBuilder
impl Debug for PutIntentInputBuilder
Source§impl Default for PutIntentInputBuilder
impl Default for PutIntentInputBuilder
Source§fn default() -> PutIntentInputBuilder
fn default() -> PutIntentInputBuilder
Source§impl PartialEq for PutIntentInputBuilder
impl PartialEq for PutIntentInputBuilder
impl StructuralPartialEq for PutIntentInputBuilder
Auto Trait Implementations§
impl Freeze for PutIntentInputBuilder
impl RefUnwindSafe for PutIntentInputBuilder
impl Send for PutIntentInputBuilder
impl Sync for PutIntentInputBuilder
impl Unpin for PutIntentInputBuilder
impl UnwindSafe for PutIntentInputBuilder
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);