pub struct Client { /* private fields */ }Expand description
Client for AWS Mainframe Modernization Application Testing
Client for invoking operations on AWS Mainframe Modernization Application Testing. Each operation on AWS Mainframe Modernization Application Testing 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_apptest::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_apptest::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 ListTagsForResource operation has
a Client::list_tags_for_resource, 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.list_tags_for_resource()
.resource_arn("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
impl Client
sourcepub fn create_test_case(&self) -> CreateTestCaseFluentBuilder
pub fn create_test_case(&self) -> CreateTestCaseFluentBuilder
Constructs a fluent builder for the CreateTestCase operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the test case.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the test case.
steps(Step)/set_steps(Option<Vec::<Step>>):
required: trueThe steps in the test case.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseThe client token of the test case.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe specified tags of the test case.
- On success, responds with
CreateTestCaseOutputwith field(s):test_case_id(String):The test case ID of the test case.
test_case_version(i32):The test case version of the test case.
- On failure, responds with
SdkError<CreateTestCaseError>
source§impl Client
impl Client
sourcepub fn create_test_configuration(&self) -> CreateTestConfigurationFluentBuilder
pub fn create_test_configuration(&self) -> CreateTestConfigurationFluentBuilder
Constructs a fluent builder for the CreateTestConfiguration operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the test configuration.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the test configuration.
resources(Resource)/set_resources(Option<Vec::<Resource>>):
required: trueThe defined resources of the test configuration.
properties(impl Into<String>, impl Into<String>)/set_properties(Option<HashMap::<String, String>>):
required: falseThe properties of the test configuration.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseThe client token of the test configuration.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags of the test configuration.
service_settings(ServiceSettings)/set_service_settings(Option<ServiceSettings>):
required: falseThe service settings of the test configuration.
- On success, responds with
CreateTestConfigurationOutputwith field(s):test_configuration_id(String):The test configuration ID.
test_configuration_version(i32):The test configuration version.
- On failure, responds with
SdkError<CreateTestConfigurationError>
source§impl Client
impl Client
sourcepub fn create_test_suite(&self) -> CreateTestSuiteFluentBuilder
pub fn create_test_suite(&self) -> CreateTestSuiteFluentBuilder
Constructs a fluent builder for the CreateTestSuite operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the test suite.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the test suite.
before_steps(Step)/set_before_steps(Option<Vec::<Step>>):
required: falseThe before steps of the test suite.
after_steps(Step)/set_after_steps(Option<Vec::<Step>>):
required: falseThe after steps of the test suite.
test_cases(TestCases)/set_test_cases(Option<TestCases>):
required: trueThe test cases in the test suite.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseThe client token of the test suite.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags of the test suite.
- On success, responds with
CreateTestSuiteOutputwith field(s):test_suite_id(String):The suite ID of the test suite.
test_suite_version(i32):The suite version of the test suite.
- On failure, responds with
SdkError<CreateTestSuiteError>
source§impl Client
impl Client
sourcepub fn delete_test_case(&self) -> DeleteTestCaseFluentBuilder
pub fn delete_test_case(&self) -> DeleteTestCaseFluentBuilder
Constructs a fluent builder for the DeleteTestCase operation.
- The fluent builder is configurable:
test_case_id(impl Into<String>)/set_test_case_id(Option<String>):
required: trueThe test case ID of the test case.
- On success, responds with
DeleteTestCaseOutput - On failure, responds with
SdkError<DeleteTestCaseError>
source§impl Client
impl Client
sourcepub fn delete_test_configuration(&self) -> DeleteTestConfigurationFluentBuilder
pub fn delete_test_configuration(&self) -> DeleteTestConfigurationFluentBuilder
Constructs a fluent builder for the DeleteTestConfiguration operation.
- The fluent builder is configurable:
test_configuration_id(impl Into<String>)/set_test_configuration_id(Option<String>):
required: trueThe test ID of the test configuration.
- On success, responds with
DeleteTestConfigurationOutput - On failure, responds with
SdkError<DeleteTestConfigurationError>
source§impl Client
impl Client
sourcepub fn delete_test_run(&self) -> DeleteTestRunFluentBuilder
pub fn delete_test_run(&self) -> DeleteTestRunFluentBuilder
Constructs a fluent builder for the DeleteTestRun operation.
- The fluent builder is configurable:
test_run_id(impl Into<String>)/set_test_run_id(Option<String>):
required: trueThe run ID of the test run.
- On success, responds with
DeleteTestRunOutput - On failure, responds with
SdkError<DeleteTestRunError>
source§impl Client
impl Client
sourcepub fn delete_test_suite(&self) -> DeleteTestSuiteFluentBuilder
pub fn delete_test_suite(&self) -> DeleteTestSuiteFluentBuilder
Constructs a fluent builder for the DeleteTestSuite operation.
- The fluent builder is configurable:
test_suite_id(impl Into<String>)/set_test_suite_id(Option<String>):
required: trueThe test ID of the test suite.
- On success, responds with
DeleteTestSuiteOutput - On failure, responds with
SdkError<DeleteTestSuiteError>
source§impl Client
impl Client
sourcepub fn get_test_case(&self) -> GetTestCaseFluentBuilder
pub fn get_test_case(&self) -> GetTestCaseFluentBuilder
Constructs a fluent builder for the GetTestCase operation.
- The fluent builder is configurable:
test_case_id(impl Into<String>)/set_test_case_id(Option<String>):
required: trueThe request test ID of the test case.
test_case_version(i32)/set_test_case_version(Option<i32>):
required: falseThe test case version of the test case.
- On success, responds with
GetTestCaseOutputwith field(s):test_case_id(String):The response test ID of the test case.
test_case_arn(String):The Amazon Resource Name (ARN) of the test case.
name(String):The name of the test case.
description(Option<String>):The description of the test case.
latest_version(Option<TestCaseLatestVersion>):The latest version of the test case.
test_case_version(i32):The case version of the test case.
status(TestCaseLifecycle):The status of the test case.
status_reason(Option<String>):The status reason of the test case.
creation_time(DateTime):The creation time of the test case.
last_update_time(DateTime):The last update time of the test case.
steps(Vec::<Step>):The steps of the test case.
tags(Option<HashMap::<String, String>>):The tags of the test case.
- On failure, responds with
SdkError<GetTestCaseError>
source§impl Client
impl Client
sourcepub fn get_test_configuration(&self) -> GetTestConfigurationFluentBuilder
pub fn get_test_configuration(&self) -> GetTestConfigurationFluentBuilder
Constructs a fluent builder for the GetTestConfiguration operation.
- The fluent builder is configurable:
test_configuration_id(impl Into<String>)/set_test_configuration_id(Option<String>):
required: trueThe request test configuration ID.
test_configuration_version(i32)/set_test_configuration_version(Option<i32>):
required: falseThe test configuration version.
- On success, responds with
GetTestConfigurationOutputwith field(s):test_configuration_id(String):The response test configuration ID.
name(String):The test configuration name
test_configuration_arn(String):The test configuration Amazon Resource Name (ARN).
latest_version(Option<TestConfigurationLatestVersion>):The latest version of the test configuration.
test_configuration_version(i32):The test configuration version.
status(TestConfigurationLifecycle):The status of the test configuration.
status_reason(Option<String>):The status reason of the test configuration.
creation_time(DateTime):The creation time of the test configuration.
last_update_time(DateTime):The last update time of the test configuration.
description(Option<String>):The description of the test configuration.
resources(Vec::<Resource>):The resources of the test configuration.
properties(HashMap::<String, String>):The properties of the test configuration.
tags(Option<HashMap::<String, String>>):The tags of the test configuration.
service_settings(Option<ServiceSettings>):The service settings of the test configuration.
- On failure, responds with
SdkError<GetTestConfigurationError>
source§impl Client
impl Client
sourcepub fn get_test_run_step(&self) -> GetTestRunStepFluentBuilder
pub fn get_test_run_step(&self) -> GetTestRunStepFluentBuilder
Constructs a fluent builder for the GetTestRunStep operation.
- The fluent builder is configurable:
test_run_id(impl Into<String>)/set_test_run_id(Option<String>):
required: trueThe test run ID of the test run step.
step_name(impl Into<String>)/set_step_name(Option<String>):
required: trueThe step name of the test run step.
test_case_id(impl Into<String>)/set_test_case_id(Option<String>):
required: falseThe test case ID of a test run step.
test_suite_id(impl Into<String>)/set_test_suite_id(Option<String>):
required: falseThe test suite ID of a test run step.
- On success, responds with
GetTestRunStepOutputwith field(s):step_name(String):The step name of the test run step.
test_run_id(String):The test run ID of the test run step.
test_case_id(Option<String>):The test case ID of the test run step.
test_case_version(Option<i32>):The test case version of the test run step.
test_suite_id(Option<String>):The test suite ID of the test run step.
test_suite_version(Option<i32>):The test suite version of the test run step.
before_step(Option<bool>):The before steps of the test run step.
after_step(Option<bool>):The after steps of the test run step.
status(StepRunStatus):The status of the test run step.
status_reason(Option<String>):The status reason of the test run step.
run_start_time(DateTime):The run start time of the test run step.
run_end_time(Option<DateTime>):The run end time of the test run step.
step_run_summary(Option<StepRunSummary>):The step run summary of the test run step.
- On failure, responds with
SdkError<GetTestRunStepError>
source§impl Client
impl Client
sourcepub fn get_test_suite(&self) -> GetTestSuiteFluentBuilder
pub fn get_test_suite(&self) -> GetTestSuiteFluentBuilder
Constructs a fluent builder for the GetTestSuite operation.
- The fluent builder is configurable:
test_suite_id(impl Into<String>)/set_test_suite_id(Option<String>):
required: trueThe ID of the test suite.
test_suite_version(i32)/set_test_suite_version(Option<i32>):
required: falseThe version of the test suite.
- On success, responds with
GetTestSuiteOutputwith field(s):test_suite_id(String):The response ID of the test suite.
name(String):The name of the test suite.
latest_version(Option<TestSuiteLatestVersion>):The latest version of the test suite.
test_suite_version(i32):The version of the test suite.
status(Option<TestSuiteLifecycle>):The status of the test suite.
status_reason(Option<String>):The status reason of the test suite.
test_suite_arn(String):The test suite Amazon Resource Name (ARN).
creation_time(DateTime):The creation time of the test suite.
last_update_time(DateTime):The last update time of the test suite.
description(Option<String>):The description of the test suite.
before_steps(Vec::<Step>):The before steps of the test suite.
after_steps(Vec::<Step>):The after steps of the test suite.
test_cases(Option<TestCases>):The test cases of the test suite.
tags(Option<HashMap::<String, String>>):The tags of the test suite.
- On failure, responds with
SdkError<GetTestSuiteError>
source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(HashMap::<String, String>):The tags of the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
source§impl Client
impl Client
sourcepub fn list_test_cases(&self) -> ListTestCasesFluentBuilder
pub fn list_test_cases(&self) -> ListTestCasesFluentBuilder
Constructs a fluent builder for the ListTestCases operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
test_case_ids(impl Into<String>)/set_test_case_ids(Option<Vec::<String>>):
required: falseThe IDs of the test cases.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe next token of the test cases.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum results of the test case.
- On success, responds with
ListTestCasesOutputwith field(s):test_cases(Vec::<TestCaseSummary>):The test cases in an application.
next_token(Option<String>):The next token in test cases.
- On failure, responds with
SdkError<ListTestCasesError>
source§impl Client
impl Client
sourcepub fn list_test_configurations(&self) -> ListTestConfigurationsFluentBuilder
pub fn list_test_configurations(&self) -> ListTestConfigurationsFluentBuilder
Constructs a fluent builder for the ListTestConfigurations operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
test_configuration_ids(impl Into<String>)/set_test_configuration_ids(Option<Vec::<String>>):
required: falseThe configuration IDs of the test configurations.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe next token for the test configurations.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum results of the test configuration.
- On success, responds with
ListTestConfigurationsOutputwith field(s):test_configurations(Vec::<TestConfigurationSummary>):The test configurations.
next_token(Option<String>):The next token in the test configurations.
- On failure, responds with
SdkError<ListTestConfigurationsError>
source§impl Client
impl Client
sourcepub fn list_test_run_steps(&self) -> ListTestRunStepsFluentBuilder
pub fn list_test_run_steps(&self) -> ListTestRunStepsFluentBuilder
Constructs a fluent builder for the ListTestRunSteps operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
test_run_id(impl Into<String>)/set_test_run_id(Option<String>):
required: trueThe test run ID of the test run steps.
test_case_id(impl Into<String>)/set_test_case_id(Option<String>):
required: falseThe test case ID of the test run steps.
test_suite_id(impl Into<String>)/set_test_suite_id(Option<String>):
required: falseThe test suite ID of the test run steps.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token from a previous step to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of test run steps to return in one page of results.
- On success, responds with
ListTestRunStepsOutputwith field(s):test_run_steps(Vec::<TestRunStepSummary>):The test run steps of the response query.
next_token(Option<String>):The token from a previous request to retrieve the next page of results.
- On failure, responds with
SdkError<ListTestRunStepsError>
source§impl Client
impl Client
sourcepub fn list_test_run_test_cases(&self) -> ListTestRunTestCasesFluentBuilder
pub fn list_test_run_test_cases(&self) -> ListTestRunTestCasesFluentBuilder
Constructs a fluent builder for the ListTestRunTestCases operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
test_run_id(impl Into<String>)/set_test_run_id(Option<String>):
required: trueThe test run ID of the test cases.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token from a previous request to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of test run test cases to return in one page of results.
- On success, responds with
ListTestRunTestCasesOutputwith field(s):test_run_test_cases(Vec::<TestCaseRunSummary>):The test run of the test cases.
next_token(Option<String>):The token from a previous request to retrieve the next page of results.
- On failure, responds with
SdkError<ListTestRunTestCasesError>
source§impl Client
impl Client
sourcepub fn list_test_runs(&self) -> ListTestRunsFluentBuilder
pub fn list_test_runs(&self) -> ListTestRunsFluentBuilder
Constructs a fluent builder for the ListTestRuns operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
test_suite_id(impl Into<String>)/set_test_suite_id(Option<String>):
required: falseThe test suite ID of the test runs.
test_run_ids(impl Into<String>)/set_test_run_ids(Option<Vec::<String>>):
required: falseThe test run IDs of the test runs.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token from the previous request to retrieve the next page of test run results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of test runs to return in one page of results.
- On success, responds with
ListTestRunsOutputwith field(s):test_runs(Vec::<TestRunSummary>):The test runs of the response query.
next_token(Option<String>):The token from the previous request to retrieve the next page of results.
- On failure, responds with
SdkError<ListTestRunsError>
source§impl Client
impl Client
sourcepub fn list_test_suites(&self) -> ListTestSuitesFluentBuilder
pub fn list_test_suites(&self) -> ListTestSuitesFluentBuilder
Constructs a fluent builder for the ListTestSuites operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
test_suite_ids(impl Into<String>)/set_test_suite_ids(Option<Vec::<String>>):
required: falseThe suite ID of the test suites.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token from a previous request to retrieve the next page of results.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of test suites to return in one page of results.
- On success, responds with
ListTestSuitesOutputwith field(s):test_suites(Vec::<TestSuiteSummary>):The test suites returned with the response query.
next_token(Option<String>):The token from a previous request to retrieve the next page of test suites results.
- On failure, responds with
SdkError<ListTestSuitesError>
source§impl Client
impl Client
sourcepub fn start_test_run(&self) -> StartTestRunFluentBuilder
pub fn start_test_run(&self) -> StartTestRunFluentBuilder
Constructs a fluent builder for the StartTestRun operation.
- The fluent builder is configurable:
test_suite_id(impl Into<String>)/set_test_suite_id(Option<String>):
required: trueThe test suite ID of the test run.
test_configuration_id(impl Into<String>)/set_test_configuration_id(Option<String>):
required: falseThe configuration ID of the test run.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseThe client token of the test run.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: falseThe tags of the test run.
- On success, responds with
StartTestRunOutputwith field(s):test_run_id(String):The test run ID of the test run.
test_run_status(TestRunStatus):The test run status of the test run.
- On failure, responds with
SdkError<StartTestRunError>
source§impl Client
impl Client
sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the tag resource.
tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: trueThe tags of the resource.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
source§impl Client
impl Client
sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe Amazon Resource Name (ARN) of the resource.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe tag keys of the resource.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
source§impl Client
impl Client
sourcepub fn update_test_case(&self) -> UpdateTestCaseFluentBuilder
pub fn update_test_case(&self) -> UpdateTestCaseFluentBuilder
Constructs a fluent builder for the UpdateTestCase operation.
- The fluent builder is configurable:
test_case_id(impl Into<String>)/set_test_case_id(Option<String>):
required: trueThe test case ID of the test case.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the test case.
steps(Step)/set_steps(Option<Vec::<Step>>):
required: falseThe steps of the test case.
- On success, responds with
UpdateTestCaseOutputwith field(s):test_case_id(String):The test case ID of the test case.
test_case_version(i32):The test case version of the test case.
- On failure, responds with
SdkError<UpdateTestCaseError>
source§impl Client
impl Client
sourcepub fn update_test_configuration(&self) -> UpdateTestConfigurationFluentBuilder
pub fn update_test_configuration(&self) -> UpdateTestConfigurationFluentBuilder
Constructs a fluent builder for the UpdateTestConfiguration operation.
- The fluent builder is configurable:
test_configuration_id(impl Into<String>)/set_test_configuration_id(Option<String>):
required: trueThe test configuration ID of the test configuration.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the test configuration.
resources(Resource)/set_resources(Option<Vec::<Resource>>):
required: falseThe resources of the test configuration.
properties(impl Into<String>, impl Into<String>)/set_properties(Option<HashMap::<String, String>>):
required: falseThe properties of the test configuration.
service_settings(ServiceSettings)/set_service_settings(Option<ServiceSettings>):
required: falseThe service settings of the test configuration.
- On success, responds with
UpdateTestConfigurationOutputwith field(s):test_configuration_id(String):The configuration ID of the test configuration.
test_configuration_version(i32):The configuration version of the test configuration.
- On failure, responds with
SdkError<UpdateTestConfigurationError>
source§impl Client
impl Client
sourcepub fn update_test_suite(&self) -> UpdateTestSuiteFluentBuilder
pub fn update_test_suite(&self) -> UpdateTestSuiteFluentBuilder
Constructs a fluent builder for the UpdateTestSuite operation.
- The fluent builder is configurable:
test_suite_id(impl Into<String>)/set_test_suite_id(Option<String>):
required: trueThe test suite ID of the test suite.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe description of the test suite.
before_steps(Step)/set_before_steps(Option<Vec::<Step>>):
required: falseThe before steps for the test suite.
after_steps(Step)/set_after_steps(Option<Vec::<Step>>):
required: falseThe after steps of the test suite.
test_cases(TestCases)/set_test_cases(Option<TestCases>):
required: falseThe test cases in the test suite.
- On success, responds with
UpdateTestSuiteOutputwith field(s):test_suite_id(String):The test suite ID of the test suite.
test_suite_version(Option<i32>):The test suite version of the test suite.
- On failure, responds with
SdkError<UpdateTestSuiteError>
source§impl Client
impl Client
sourcepub fn from_conf(conf: Config) -> Self
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_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
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> 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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>
Returns self with the
fg()
set to
Color::BrightBlack.
§Example
println!("{}", value.bright_black());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>
Returns self with the
fg()
set to
Color::BrightGreen.
§Example
println!("{}", value.bright_green());source§fn bright_yellow(&self) -> Painted<&T>
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>
fn bright_blue(&self) -> Painted<&T>
source§fn bright_magenta(&self) -> Painted<&T>
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>
fn bright_cyan(&self) -> Painted<&T>
source§fn bright_white(&self) -> Painted<&T>
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>
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>
Returns self with the
bg()
set to
Color::BrightBlack.
§Example
println!("{}", value.on_bright_black());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>
Returns self with the
bg()
set to
Color::BrightGreen.
§Example
println!("{}", value.on_bright_green());source§fn on_bright_yellow(&self) -> Painted<&T>
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>
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>
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>
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>
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>
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 underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::Underline.
§Example
println!("{}", value.underline());source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::RapidBlink.
§Example
println!("{}", value.rapid_blink());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);