aws_sdk_wafregional::client

Struct Client

Source
pub struct Client { /* private fields */ }
Expand description

Client for AWS WAF Regional

Client for invoking operations on AWS WAF Regional. Each operation on AWS WAF Regional is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_wafregional::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Builder struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_wafregional::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the AssociateWebACL operation has a Client::associate_web_acl, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.associate_web_acl()
    .web_acl_id("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

Source§

impl Client

Source

pub fn associate_web_acl(&self) -> AssociateWebACLFluentBuilder

Constructs a fluent builder for the AssociateWebACL operation.

Source§

impl Client

Source

pub fn create_byte_match_set(&self) -> CreateByteMatchSetFluentBuilder

Constructs a fluent builder for the CreateByteMatchSet operation.

Source§

impl Client

Source

pub fn create_geo_match_set(&self) -> CreateGeoMatchSetFluentBuilder

Constructs a fluent builder for the CreateGeoMatchSet operation.

Source§

impl Client

Source

pub fn create_ip_set(&self) -> CreateIPSetFluentBuilder

Constructs a fluent builder for the CreateIPSet operation.

Source§

impl Client

Source

pub fn create_rate_based_rule(&self) -> CreateRateBasedRuleFluentBuilder

Constructs a fluent builder for the CreateRateBasedRule operation.

  • The fluent builder is configurable:
    • name(impl Into<String>) / set_name(Option<String>):
      required: true

      A friendly name or description of the RateBasedRule. You can’t change the name of a RateBasedRule after you create it.


    • metric_name(impl Into<String>) / set_metric_name(Option<String>):
      required: true

      A friendly name or description for the metrics for this RateBasedRule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can’t contain whitespace or metric names reserved for AWS WAF, including “All” and “Default_Action.” You can’t change the name of the metric after you create the RateBasedRule.


    • rate_key(RateKey) / set_rate_key(Option<RateKey>):
      required: true

      The field that AWS WAF uses to determine if requests are likely arriving from a single source and thus subject to rate monitoring. The only valid value for RateKey is IP. IP indicates that requests that arrive from the same IP address are subject to the RateLimit that is specified in the RateBasedRule.


    • rate_limit(i64) / set_rate_limit(Option<i64>):
      required: true

      The maximum number of requests, which have an identical value in the field that is specified by RateKey, allowed in a five-minute period. If the number of requests exceeds the RateLimit and the other predicates specified in the rule are also met, AWS WAF triggers the action that is specified for this rule.


    • change_token(impl Into<String>) / set_change_token(Option<String>):
      required: true

      The ChangeToken that you used to submit the CreateRateBasedRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false


  • On success, responds with CreateRateBasedRuleOutput with field(s):
    • rule(Option<RateBasedRule>):

      The RateBasedRule that is returned in the CreateRateBasedRule response.

    • change_token(Option<String>):

      The ChangeToken that you used to submit the CreateRateBasedRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.

  • On failure, responds with SdkError<CreateRateBasedRuleError>
Source§

impl Client

Source

pub fn create_regex_match_set(&self) -> CreateRegexMatchSetFluentBuilder

Constructs a fluent builder for the CreateRegexMatchSet operation.

Source§

impl Client

Source

pub fn create_regex_pattern_set(&self) -> CreateRegexPatternSetFluentBuilder

Constructs a fluent builder for the CreateRegexPatternSet operation.

Source§

impl Client

Source

pub fn create_rule(&self) -> CreateRuleFluentBuilder

Constructs a fluent builder for the CreateRule operation.

Source§

impl Client

Source

pub fn create_rule_group(&self) -> CreateRuleGroupFluentBuilder

Constructs a fluent builder for the CreateRuleGroup operation.

Source§

impl Client

Source

pub fn create_size_constraint_set(&self) -> CreateSizeConstraintSetFluentBuilder

Constructs a fluent builder for the CreateSizeConstraintSet operation.

Source§

impl Client

Source

pub fn create_sql_injection_match_set( &self, ) -> CreateSqlInjectionMatchSetFluentBuilder

Constructs a fluent builder for the CreateSqlInjectionMatchSet operation.

Source§

impl Client

Source

pub fn create_web_acl(&self) -> CreateWebACLFluentBuilder

Constructs a fluent builder for the CreateWebACL operation.

Source§

impl Client

Source

pub fn create_web_acl_migration_stack( &self, ) -> CreateWebACLMigrationStackFluentBuilder

Constructs a fluent builder for the CreateWebACLMigrationStack operation.

Source§

impl Client

Source

pub fn create_xss_match_set(&self) -> CreateXssMatchSetFluentBuilder

Constructs a fluent builder for the CreateXssMatchSet operation.

Source§

impl Client

Source

pub fn delete_byte_match_set(&self) -> DeleteByteMatchSetFluentBuilder

Constructs a fluent builder for the DeleteByteMatchSet operation.

Source§

impl Client

Source

pub fn delete_geo_match_set(&self) -> DeleteGeoMatchSetFluentBuilder

Constructs a fluent builder for the DeleteGeoMatchSet operation.

Source§

impl Client

Source

pub fn delete_ip_set(&self) -> DeleteIPSetFluentBuilder

Constructs a fluent builder for the DeleteIPSet operation.

Source§

impl Client

Source

pub fn delete_logging_configuration( &self, ) -> DeleteLoggingConfigurationFluentBuilder

Constructs a fluent builder for the DeleteLoggingConfiguration operation.

Source§

impl Client

Source

pub fn delete_permission_policy(&self) -> DeletePermissionPolicyFluentBuilder

Constructs a fluent builder for the DeletePermissionPolicy operation.

Source§

impl Client

Source

pub fn delete_rate_based_rule(&self) -> DeleteRateBasedRuleFluentBuilder

Constructs a fluent builder for the DeleteRateBasedRule operation.

Source§

impl Client

Source

pub fn delete_regex_match_set(&self) -> DeleteRegexMatchSetFluentBuilder

Constructs a fluent builder for the DeleteRegexMatchSet operation.

Source§

impl Client

Source

pub fn delete_regex_pattern_set(&self) -> DeleteRegexPatternSetFluentBuilder

Constructs a fluent builder for the DeleteRegexPatternSet operation.

Source§

impl Client

Source

pub fn delete_rule(&self) -> DeleteRuleFluentBuilder

Constructs a fluent builder for the DeleteRule operation.

Source§

impl Client

Source

pub fn delete_rule_group(&self) -> DeleteRuleGroupFluentBuilder

Constructs a fluent builder for the DeleteRuleGroup operation.

Source§

impl Client

Source

pub fn delete_size_constraint_set(&self) -> DeleteSizeConstraintSetFluentBuilder

Constructs a fluent builder for the DeleteSizeConstraintSet operation.

Source§

impl Client

Source

pub fn delete_sql_injection_match_set( &self, ) -> DeleteSqlInjectionMatchSetFluentBuilder

Constructs a fluent builder for the DeleteSqlInjectionMatchSet operation.

Source§

impl Client

Source

pub fn delete_web_acl(&self) -> DeleteWebACLFluentBuilder

Constructs a fluent builder for the DeleteWebACL operation.

Source§

impl Client

Source

pub fn delete_xss_match_set(&self) -> DeleteXssMatchSetFluentBuilder

Constructs a fluent builder for the DeleteXssMatchSet operation.

Source§

impl Client

Source

pub fn disassociate_web_acl(&self) -> DisassociateWebACLFluentBuilder

Constructs a fluent builder for the DisassociateWebACL operation.

  • The fluent builder is configurable:
    • resource_arn(impl Into<String>) / set_resource_arn(Option<String>):
      required: true

      The ARN (Amazon Resource Name) of the resource from which the web ACL is being removed, either an application load balancer or Amazon API Gateway stage.

      The ARN should be in one of the following formats:

      • For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id

      • For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name


  • On success, responds with DisassociateWebAclOutput
  • On failure, responds with SdkError<DisassociateWebACLError>
Source§

impl Client

Source

pub fn get_byte_match_set(&self) -> GetByteMatchSetFluentBuilder

Constructs a fluent builder for the GetByteMatchSet operation.

  • The fluent builder is configurable:
  • On success, responds with GetByteMatchSetOutput with field(s):
    • byte_match_set(Option<ByteMatchSet>):

      Information about the ByteMatchSet that you specified in the GetByteMatchSet request. For more information, see the following topics:

      • ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name

      • ByteMatchTuples: Contains an array of ByteMatchTuple objects. Each ByteMatchTuple object contains FieldToMatch, PositionalConstraint, TargetString, and TextTransformation

      • FieldToMatch: Contains Data and Type

  • On failure, responds with SdkError<GetByteMatchSetError>
Source§

impl Client

Source

pub fn get_change_token(&self) -> GetChangeTokenFluentBuilder

Constructs a fluent builder for the GetChangeToken operation.

Source§

impl Client

Source

pub fn get_change_token_status(&self) -> GetChangeTokenStatusFluentBuilder

Constructs a fluent builder for the GetChangeTokenStatus operation.

Source§

impl Client

Source

pub fn get_geo_match_set(&self) -> GetGeoMatchSetFluentBuilder

Constructs a fluent builder for the GetGeoMatchSet operation.

Source§

impl Client

Source

pub fn get_ip_set(&self) -> GetIPSetFluentBuilder

Constructs a fluent builder for the GetIPSet operation.

  • The fluent builder is configurable:
  • On success, responds with GetIpSetOutput with field(s):
    • ip_set(Option<IpSet>):

      Information about the IPSet that you specified in the GetIPSet request. For more information, see the following topics:

      • IPSet: Contains IPSetDescriptors, IPSetId, and Name

      • IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each IPSetDescriptor object contains Type and Value

  • On failure, responds with SdkError<GetIPSetError>
Source§

impl Client

Source

pub fn get_logging_configuration(&self) -> GetLoggingConfigurationFluentBuilder

Constructs a fluent builder for the GetLoggingConfiguration operation.

Source§

impl Client

Source

pub fn get_permission_policy(&self) -> GetPermissionPolicyFluentBuilder

Constructs a fluent builder for the GetPermissionPolicy operation.

Source§

impl Client

Source

pub fn get_rate_based_rule(&self) -> GetRateBasedRuleFluentBuilder

Constructs a fluent builder for the GetRateBasedRule operation.

Source§

impl Client

Source

pub fn get_rate_based_rule_managed_keys( &self, ) -> GetRateBasedRuleManagedKeysFluentBuilder

Constructs a fluent builder for the GetRateBasedRuleManagedKeys operation.

Source§

impl Client

Source

pub fn get_regex_match_set(&self) -> GetRegexMatchSetFluentBuilder

Constructs a fluent builder for the GetRegexMatchSet operation.

Source§

impl Client

Source

pub fn get_regex_pattern_set(&self) -> GetRegexPatternSetFluentBuilder

Constructs a fluent builder for the GetRegexPatternSet operation.

Source§

impl Client

Source

pub fn get_rule(&self) -> GetRuleFluentBuilder

Constructs a fluent builder for the GetRule operation.

  • The fluent builder is configurable:
  • On success, responds with GetRuleOutput with field(s):
    • rule(Option<Rule>):

      Information about the Rule that you specified in the GetRule request. For more information, see the following topics:

      • Rule: Contains MetricName, Name, an array of Predicate objects, and RuleId

      • Predicate: Each Predicate object contains DataId, Negated, and Type

  • On failure, responds with SdkError<GetRuleError>
Source§

impl Client

Source

pub fn get_rule_group(&self) -> GetRuleGroupFluentBuilder

Constructs a fluent builder for the GetRuleGroup operation.

Source§

impl Client

Source

pub fn get_sampled_requests(&self) -> GetSampledRequestsFluentBuilder

Constructs a fluent builder for the GetSampledRequests operation.

  • The fluent builder is configurable:
    • web_acl_id(impl Into<String>) / set_web_acl_id(Option<String>):
      required: true

      The WebACLId of the WebACL for which you want GetSampledRequests to return a sample of requests.


    • rule_id(impl Into<String>) / set_rule_id(Option<String>):
      required: true

      RuleId is one of three values:

      • The RuleId of the Rule or the RuleGroupId of the RuleGroup for which you want GetSampledRequests to return a sample of requests.

      • Default_Action, which causes GetSampledRequests to return a sample of the requests that didn’t match any of the rules in the specified WebACL.


    • time_window(TimeWindow) / set_time_window(Option<TimeWindow>):
      required: true

      The start date and time and the end date and time of the range for which you want GetSampledRequests to return a sample of requests. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, “2016-09-27T14:50Z”. You can specify any time range in the previous three hours.


    • max_items(i64) / set_max_items(Option<i64>):
      required: true

      The number of requests that you want AWS WAF to return from among the first 5,000 requests that your AWS resource received during the time range. If your resource received fewer requests than the value of MaxItems, GetSampledRequests returns information about all of them.


  • On success, responds with GetSampledRequestsOutput with field(s):
    • sampled_requests(Option<Vec::<SampledHttpRequest>>):

      A complex type that contains detailed information about each of the requests in the sample.

    • population_size(i64):

      The total number of requests from which GetSampledRequests got a sample of MaxItems requests. If PopulationSize is less than MaxItems, the sample includes every request that your AWS resource received during the specified time range.

    • time_window(Option<TimeWindow>):

      Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. However, if your AWS resource received more than 5,000 requests during the time range that you specified in the request, GetSampledRequests returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.

  • On failure, responds with SdkError<GetSampledRequestsError>
Source§

impl Client

Source

pub fn get_size_constraint_set(&self) -> GetSizeConstraintSetFluentBuilder

Constructs a fluent builder for the GetSizeConstraintSet operation.

Source§

impl Client

Source

pub fn get_sql_injection_match_set( &self, ) -> GetSqlInjectionMatchSetFluentBuilder

Constructs a fluent builder for the GetSqlInjectionMatchSet operation.

Source§

impl Client

Source

pub fn get_web_acl(&self) -> GetWebACLFluentBuilder

Constructs a fluent builder for the GetWebACL operation.

  • The fluent builder is configurable:
  • On success, responds with GetWebAclOutput with field(s):
    • web_acl(Option<WebAcl>):

      Information about the WebACL that you specified in the GetWebACL request. For more information, see the following topics:

      • WebACL: Contains DefaultAction, MetricName, Name, an array of Rule objects, and WebACLId

      • DefaultAction (Data type is WafAction): Contains Type

      • Rules: Contains an array of ActivatedRule objects, which contain Action, Priority, and RuleId

      • Action: Contains Type

  • On failure, responds with SdkError<GetWebACLError>
Source§

impl Client

Source

pub fn get_web_acl_for_resource(&self) -> GetWebACLForResourceFluentBuilder

Constructs a fluent builder for the GetWebACLForResource operation.

  • The fluent builder is configurable:
    • resource_arn(impl Into<String>) / set_resource_arn(Option<String>):
      required: true

      The ARN (Amazon Resource Name) of the resource for which to get the web ACL, either an application load balancer or Amazon API Gateway stage.

      The ARN should be in one of the following formats:

      • For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id

      • For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name


  • On success, responds with GetWebAclForResourceOutput with field(s):
    • web_acl_summary(Option<WebAclSummary>):

      Information about the web ACL that you specified in the GetWebACLForResource request. If there is no associated resource, a null WebACLSummary is returned.

  • On failure, responds with SdkError<GetWebACLForResourceError>
Source§

impl Client

Source

pub fn get_xss_match_set(&self) -> GetXssMatchSetFluentBuilder

Constructs a fluent builder for the GetXssMatchSet operation.

Source§

impl Client

Source

pub fn list_activated_rules_in_rule_group( &self, ) -> ListActivatedRulesInRuleGroupFluentBuilder

Constructs a fluent builder for the ListActivatedRulesInRuleGroup operation.

  • The fluent builder is configurable:
    • rule_group_id(impl Into<String>) / set_rule_group_id(Option<String>):
      required: false

      The RuleGroupId of the RuleGroup for which you want to get a list of ActivatedRule objects.


    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more ActivatedRules than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of ActivatedRules. For the second and subsequent ListActivatedRulesInRuleGroup requests, specify the value of NextMarker from the previous response to get information about another batch of ActivatedRules.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of ActivatedRules that you want AWS WAF to return for this request. If you have more ActivatedRules than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of ActivatedRules.


  • On success, responds with ListActivatedRulesInRuleGroupOutput with field(s):
    • next_marker(Option<String>):

      If you have more ActivatedRules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more ActivatedRules, submit another ListActivatedRulesInRuleGroup request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • activated_rules(Option<Vec::<ActivatedRule>>):

      An array of ActivatedRules objects.

  • On failure, responds with SdkError<ListActivatedRulesInRuleGroupError>
Source§

impl Client

Source

pub fn list_byte_match_sets(&self) -> ListByteMatchSetsFluentBuilder

Constructs a fluent builder for the ListByteMatchSets operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more ByteMatchSets than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of ByteMatchSets. For the second and subsequent ListByteMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of ByteMatchSets.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of ByteMatchSet objects that you want AWS WAF to return for this request. If you have more ByteMatchSets objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of ByteMatchSet objects.


  • On success, responds with ListByteMatchSetsOutput with field(s):
    • next_marker(Option<String>):

      If you have more ByteMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more ByteMatchSet objects, submit another ListByteMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • byte_match_sets(Option<Vec::<ByteMatchSetSummary>>):

      An array of ByteMatchSetSummary objects.

  • On failure, responds with SdkError<ListByteMatchSetsError>
Source§

impl Client

Source

pub fn list_geo_match_sets(&self) -> ListGeoMatchSetsFluentBuilder

Constructs a fluent builder for the ListGeoMatchSets operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more GeoMatchSets than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of GeoMatchSet objects. For the second and subsequent ListGeoMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of GeoMatchSet objects.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of GeoMatchSet objects that you want AWS WAF to return for this request. If you have more GeoMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of GeoMatchSet objects.


  • On success, responds with ListGeoMatchSetsOutput with field(s):
    • next_marker(Option<String>):

      If you have more GeoMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more GeoMatchSet objects, submit another ListGeoMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • geo_match_sets(Option<Vec::<GeoMatchSetSummary>>):

      An array of GeoMatchSetSummary objects.

  • On failure, responds with SdkError<ListGeoMatchSetsError>
Source§

impl Client

Source

pub fn list_ip_sets(&self) -> ListIPSetsFluentBuilder

Constructs a fluent builder for the ListIPSets operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      AWS WAF returns a NextMarker value in the response that allows you to list another group of IPSets. For the second and subsequent ListIPSets requests, specify the value of NextMarker from the previous response to get information about another batch of IPSets.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of IPSet objects that you want AWS WAF to return for this request. If you have more IPSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of IPSet objects.


  • On success, responds with ListIpSetsOutput with field(s):
  • On failure, responds with SdkError<ListIPSetsError>
Source§

impl Client

Source

pub fn list_logging_configurations( &self, ) -> ListLoggingConfigurationsFluentBuilder

Constructs a fluent builder for the ListLoggingConfigurations operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more LoggingConfigurations than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of LoggingConfigurations. For the second and subsequent ListLoggingConfigurations requests, specify the value of NextMarker from the previous response to get information about another batch of ListLoggingConfigurations.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of LoggingConfigurations that you want AWS WAF to return for this request. If you have more LoggingConfigurations than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of LoggingConfigurations.


  • On success, responds with ListLoggingConfigurationsOutput with field(s):
    • logging_configurations(Option<Vec::<LoggingConfiguration>>):

      An array of LoggingConfiguration objects.

    • next_marker(Option<String>):

      If you have more LoggingConfigurations than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more LoggingConfigurations, submit another ListLoggingConfigurations request, and specify the NextMarker value from the response in the NextMarker value in the next request.

  • On failure, responds with SdkError<ListLoggingConfigurationsError>
Source§

impl Client

Source

pub fn list_rate_based_rules(&self) -> ListRateBasedRulesFluentBuilder

Constructs a fluent builder for the ListRateBasedRules operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more Rules than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of Rules. For the second and subsequent ListRateBasedRules requests, specify the value of NextMarker from the previous response to get information about another batch of Rules.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of Rules that you want AWS WAF to return for this request. If you have more Rules than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules.


  • On success, responds with ListRateBasedRulesOutput with field(s):
    • next_marker(Option<String>):

      If you have more Rules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more Rules, submit another ListRateBasedRules request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • rules(Option<Vec::<RuleSummary>>):

      An array of RuleSummary objects.

  • On failure, responds with SdkError<ListRateBasedRulesError>
Source§

impl Client

Source

pub fn list_regex_match_sets(&self) -> ListRegexMatchSetsFluentBuilder

Constructs a fluent builder for the ListRegexMatchSets operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more RegexMatchSet objects than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of ByteMatchSets. For the second and subsequent ListRegexMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of RegexMatchSet objects.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of RegexMatchSet objects that you want AWS WAF to return for this request. If you have more RegexMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RegexMatchSet objects.


  • On success, responds with ListRegexMatchSetsOutput with field(s):
    • next_marker(Option<String>):

      If you have more RegexMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more RegexMatchSet objects, submit another ListRegexMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • regex_match_sets(Option<Vec::<RegexMatchSetSummary>>):

      An array of RegexMatchSetSummary objects.

  • On failure, responds with SdkError<ListRegexMatchSetsError>
Source§

impl Client

Source

pub fn list_regex_pattern_sets(&self) -> ListRegexPatternSetsFluentBuilder

Constructs a fluent builder for the ListRegexPatternSets operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more RegexPatternSet objects than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of RegexPatternSet objects. For the second and subsequent ListRegexPatternSets requests, specify the value of NextMarker from the previous response to get information about another batch of RegexPatternSet objects.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of RegexPatternSet objects that you want AWS WAF to return for this request. If you have more RegexPatternSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RegexPatternSet objects.


  • On success, responds with ListRegexPatternSetsOutput with field(s):
    • next_marker(Option<String>):

      If you have more RegexPatternSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more RegexPatternSet objects, submit another ListRegexPatternSets request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • regex_pattern_sets(Option<Vec::<RegexPatternSetSummary>>):

      An array of RegexPatternSetSummary objects.

  • On failure, responds with SdkError<ListRegexPatternSetsError>
Source§

impl Client

Source

pub fn list_resources_for_web_acl(&self) -> ListResourcesForWebACLFluentBuilder

Constructs a fluent builder for the ListResourcesForWebACL operation.

Source§

impl Client

Source

pub fn list_rule_groups(&self) -> ListRuleGroupsFluentBuilder

Constructs a fluent builder for the ListRuleGroups operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more RuleGroups than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of RuleGroups. For the second and subsequent ListRuleGroups requests, specify the value of NextMarker from the previous response to get information about another batch of RuleGroups.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of RuleGroups that you want AWS WAF to return for this request. If you have more RuleGroups than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RuleGroups.


  • On success, responds with ListRuleGroupsOutput with field(s):
    • next_marker(Option<String>):

      If you have more RuleGroups than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more RuleGroups, submit another ListRuleGroups request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • rule_groups(Option<Vec::<RuleGroupSummary>>):

      An array of RuleGroup objects.

  • On failure, responds with SdkError<ListRuleGroupsError>
Source§

impl Client

Source

pub fn list_rules(&self) -> ListRulesFluentBuilder

Constructs a fluent builder for the ListRules operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more Rules than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of Rules. For the second and subsequent ListRules requests, specify the value of NextMarker from the previous response to get information about another batch of Rules.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of Rules that you want AWS WAF to return for this request. If you have more Rules than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules.


  • On success, responds with ListRulesOutput with field(s):
    • next_marker(Option<String>):

      If you have more Rules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more Rules, submit another ListRules request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • rules(Option<Vec::<RuleSummary>>):

      An array of RuleSummary objects.

  • On failure, responds with SdkError<ListRulesError>
Source§

impl Client

Source

pub fn list_size_constraint_sets(&self) -> ListSizeConstraintSetsFluentBuilder

Constructs a fluent builder for the ListSizeConstraintSets operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more SizeConstraintSets than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of SizeConstraintSets. For the second and subsequent ListSizeConstraintSets requests, specify the value of NextMarker from the previous response to get information about another batch of SizeConstraintSets.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of SizeConstraintSet objects that you want AWS WAF to return for this request. If you have more SizeConstraintSets objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of SizeConstraintSet objects.


  • On success, responds with ListSizeConstraintSetsOutput with field(s):
    • next_marker(Option<String>):

      If you have more SizeConstraintSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more SizeConstraintSet objects, submit another ListSizeConstraintSets request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • size_constraint_sets(Option<Vec::<SizeConstraintSetSummary>>):

      An array of SizeConstraintSetSummary objects.

  • On failure, responds with SdkError<ListSizeConstraintSetsError>
Source§

impl Client

Source

pub fn list_sql_injection_match_sets( &self, ) -> ListSqlInjectionMatchSetsFluentBuilder

Constructs a fluent builder for the ListSqlInjectionMatchSets operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more SqlInjectionMatchSet objects than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of SqlInjectionMatchSets. For the second and subsequent ListSqlInjectionMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of SqlInjectionMatchSets.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF to return for this request. If you have more SqlInjectionMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules.


  • On success, responds with ListSqlInjectionMatchSetsOutput with field(s):
    • next_marker(Option<String>):

      If you have more SqlInjectionMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more SqlInjectionMatchSet objects, submit another ListSqlInjectionMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • sql_injection_match_sets(Option<Vec::<SqlInjectionMatchSetSummary>>):

      An array of SqlInjectionMatchSetSummary objects.

  • On failure, responds with SdkError<ListSqlInjectionMatchSetsError>
Source§

impl Client

Source

pub fn list_subscribed_rule_groups( &self, ) -> ListSubscribedRuleGroupsFluentBuilder

Constructs a fluent builder for the ListSubscribedRuleGroups operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more ByteMatchSetssubscribed rule groups than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of subscribed rule groups. For the second and subsequent ListSubscribedRuleGroupsRequest requests, specify the value of NextMarker from the previous response to get information about another batch of subscribed rule groups.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of subscribed rule groups that you want AWS WAF to return for this request. If you have more objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of objects.


  • On success, responds with ListSubscribedRuleGroupsOutput with field(s):
    • next_marker(Option<String>):

      If you have more objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more objects, submit another ListSubscribedRuleGroups request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • rule_groups(Option<Vec::<SubscribedRuleGroupSummary>>):

      An array of RuleGroup objects.

  • On failure, responds with SdkError<ListSubscribedRuleGroupsError>
Source§

impl Client

Source§

impl Client

Source

pub fn list_web_acls(&self) -> ListWebACLsFluentBuilder

Constructs a fluent builder for the ListWebACLs operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more WebACL objects than the number that you specify for Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of WebACL objects. For the second and subsequent ListWebACLs requests, specify the value of NextMarker from the previous response to get information about another batch of WebACL objects.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of WebACL objects that you want AWS WAF to return for this request. If you have more WebACL objects than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of WebACL objects.


  • On success, responds with ListWebAcLsOutput with field(s):
    • next_marker(Option<String>):

      If you have more WebACL objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more WebACL objects, submit another ListWebACLs request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • web_acls(Option<Vec::<WebAclSummary>>):

      An array of WebACLSummary objects.

  • On failure, responds with SdkError<ListWebACLsError>
Source§

impl Client

Source

pub fn list_xss_match_sets(&self) -> ListXssMatchSetsFluentBuilder

Constructs a fluent builder for the ListXssMatchSets operation.

  • The fluent builder is configurable:
    • next_marker(impl Into<String>) / set_next_marker(Option<String>):
      required: false

      If you specify a value for Limit and you have more XssMatchSet objects than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of XssMatchSets. For the second and subsequent ListXssMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of XssMatchSets.


    • limit(i32) / set_limit(Option<i32>):
      required: false

      Specifies the number of XssMatchSet objects that you want AWS WAF to return for this request. If you have more XssMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules.


  • On success, responds with ListXssMatchSetsOutput with field(s):
    • next_marker(Option<String>):

      If you have more XssMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more XssMatchSet objects, submit another ListXssMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request.

    • xss_match_sets(Option<Vec::<XssMatchSetSummary>>):

      An array of XssMatchSetSummary objects.

  • On failure, responds with SdkError<ListXssMatchSetsError>
Source§

impl Client

Source

pub fn put_logging_configuration(&self) -> PutLoggingConfigurationFluentBuilder

Constructs a fluent builder for the PutLoggingConfiguration operation.

Source§

impl Client

Source

pub fn put_permission_policy(&self) -> PutPermissionPolicyFluentBuilder

Constructs a fluent builder for the PutPermissionPolicy operation.

Source§

impl Client

Source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

Source§

impl Client

Source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

Source§

impl Client

Source

pub fn update_byte_match_set(&self) -> UpdateByteMatchSetFluentBuilder

Constructs a fluent builder for the UpdateByteMatchSet operation.

Source§

impl Client

Source

pub fn update_geo_match_set(&self) -> UpdateGeoMatchSetFluentBuilder

Constructs a fluent builder for the UpdateGeoMatchSet operation.

Source§

impl Client

Source

pub fn update_ip_set(&self) -> UpdateIPSetFluentBuilder

Constructs a fluent builder for the UpdateIPSet operation.

Source§

impl Client

Source

pub fn update_rate_based_rule(&self) -> UpdateRateBasedRuleFluentBuilder

Constructs a fluent builder for the UpdateRateBasedRule operation.

Source§

impl Client

Source

pub fn update_regex_match_set(&self) -> UpdateRegexMatchSetFluentBuilder

Constructs a fluent builder for the UpdateRegexMatchSet operation.

Source§

impl Client

Source

pub fn update_regex_pattern_set(&self) -> UpdateRegexPatternSetFluentBuilder

Constructs a fluent builder for the UpdateRegexPatternSet operation.

Source§

impl Client

Source

pub fn update_rule(&self) -> UpdateRuleFluentBuilder

Constructs a fluent builder for the UpdateRule operation.

Source§

impl Client

Source

pub fn update_rule_group(&self) -> UpdateRuleGroupFluentBuilder

Constructs a fluent builder for the UpdateRuleGroup operation.

Source§

impl Client

Source

pub fn update_size_constraint_set(&self) -> UpdateSizeConstraintSetFluentBuilder

Constructs a fluent builder for the UpdateSizeConstraintSet operation.

Source§

impl Client

Source

pub fn update_sql_injection_match_set( &self, ) -> UpdateSqlInjectionMatchSetFluentBuilder

Constructs a fluent builder for the UpdateSqlInjectionMatchSet operation.

Source§

impl Client

Source

pub fn update_web_acl(&self) -> UpdateWebACLFluentBuilder

Constructs a fluent builder for the UpdateWebACL operation.

  • The fluent builder is configurable:
    • web_acl_id(impl Into<String>) / set_web_acl_id(Option<String>):
      required: true

      The WebACLId of the WebACL that you want to update. WebACLId is returned by CreateWebACL and by ListWebACLs.


    • change_token(impl Into<String>) / set_change_token(Option<String>):
      required: true

      The value returned by the most recent call to GetChangeToken.


    • updates(WebAclUpdate) / set_updates(Option<Vec::<WebAclUpdate>>):
      required: false

      An array of updates to make to the WebACL.

      An array of WebACLUpdate objects that you want to insert into or delete from a WebACL. For more information, see the applicable data types:

      • WebACLUpdate: Contains Action and ActivatedRule

      • ActivatedRule: Contains Action, OverrideAction, Priority, RuleId, and Type. ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup to a WebACL. In this case, you do not use ActivatedRule|Action. For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction.

      • WafAction: Contains Type


    • default_action(WafAction) / set_default_action(Option<WafAction>):
      required: false

      A default action for the web ACL, either ALLOW or BLOCK. AWS WAF performs the default action if a request doesn’t match the criteria in any of the rules in a web ACL.


  • On success, responds with UpdateWebAclOutput with field(s):
    • change_token(Option<String>):

      The ChangeToken that you used to submit the UpdateWebACL request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus.

  • On failure, responds with SdkError<UpdateWebACLError>
Source§

impl Client

Source

pub fn update_xss_match_set(&self) -> UpdateXssMatchSetFluentBuilder

Constructs a fluent builder for the UpdateXssMatchSet operation.

Source§

impl Client

Source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

Source

pub fn config(&self) -> &Config

Returns the client’s configuration.

Source§

impl Client

Source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

§Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

Source§

impl Clone for Client

Source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Client

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Paint for T
where T: ?Sized,

Source§

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 primary(&self) -> Painted<&T>

Returns self with the fg() set to Color::Primary.

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to Color::Fixed.

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to Color::Rgb.

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to Color::Black.

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to Color::Red.

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to Color::Green.

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to Color::Yellow.

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to Color::Blue.

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to Color::Magenta.

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to Color::Cyan.

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to Color::White.

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightBlack.

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightRed.

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightGreen.

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightYellow.

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightBlue.

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightMagenta.

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightCyan.

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to Color::BrightWhite.

§Example
println!("{}", value.bright_white());
Source§

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>

Returns self with the bg() set to Color::Primary.

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to Color::Fixed.

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to Color::Rgb.

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to Color::Black.

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to Color::Red.

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to Color::Green.

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to Color::Yellow.

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to Color::Blue.

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to Color::Magenta.

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to Color::Cyan.

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to Color::White.

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightBlack.

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightRed.

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightGreen.

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightYellow.

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightBlue.

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightMagenta.

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightCyan.

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to Color::BrightWhite.

§Example
println!("{}", value.on_bright_white());
Source§

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 bold(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Bold.

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Dim.

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Italic.

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Underline.

§Example
println!("{}", value.underline());

Returns self with the attr() set to Attribute::Blink.

§Example
println!("{}", value.blink());

Returns self with the attr() set to Attribute::RapidBlink.

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Invert.

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Conceal.

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to Attribute::Strike.

§Example
println!("{}", value.strike());
Source§

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 mask(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Mask.

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Wrap.

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Linger.

§Example
println!("{}", value.linger());
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.

Returns self with the quirk() set to Quirk::Clear.

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Resetting.

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::Bright.

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to Quirk::OnBright.

§Example
println!("{}", value.on_bright());
Source§

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);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T