pub struct Client { /* private fields */ }
Expand description
Client for AWS B2B Data Interchange
Client for invoking operations on AWS B2B Data Interchange. Each operation on AWS B2B Data Interchange 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_b2bi::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_b2bi::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 CreateCapability
operation has
a Client::create_capability
, 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.create_capability()
.name("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.
§Waiters
This client provides wait_until
methods behind the Waiters
trait.
To use them, simply import the trait, and then call one of the wait_until
methods. This will
return a waiter fluent builder that takes various parameters, which are documented on the builder
type. Once parameters have been provided, the wait
method can be called to initiate waiting.
For example, if there was a wait_until_thing
method, it could look like:
let result = client.wait_until_thing()
.thing_id("someId")
.wait(Duration::from_secs(120))
.await;
Implementations§
Source§impl Client
impl Client
Sourcepub fn create_capability(&self) -> CreateCapabilityFluentBuilder
pub fn create_capability(&self) -> CreateCapabilityFluentBuilder
Constructs a fluent builder for the CreateCapability
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueSpecifies the name of the capability, used to identify it.
r#type(CapabilityType)
/set_type(Option<CapabilityType>)
:
required: trueSpecifies the type of the capability. Currently, only
edi
is supported.configuration(CapabilityConfiguration)
/set_configuration(Option<CapabilityConfiguration>)
:
required: trueSpecifies a structure that contains the details for a capability.
instructions_documents(S3Location)
/set_instructions_documents(Option<Vec::<S3Location>>)
:
required: falseSpecifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document’s location.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseReserved for future use.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseSpecifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
- On success, responds with
CreateCapabilityOutput
with field(s):capability_id(String)
:Returns a system-assigned unique identifier for the capability.
capability_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(String)
:Returns the name of the capability used to identify it.
r#type(CapabilityType)
:Returns the type of the capability. Currently, only
edi
is supported.configuration(Option<CapabilityConfiguration>)
:Returns a structure that contains the details for a capability.
instructions_documents(Option<Vec::<S3Location>>)
:Returns one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document’s location.
created_at(DateTime)
:Returns a timestamp for creation date and time of the capability.
- On failure, responds with
SdkError<CreateCapabilityError>
Source§impl Client
impl Client
Sourcepub fn create_partnership(&self) -> CreatePartnershipFluentBuilder
pub fn create_partnership(&self) -> CreatePartnershipFluentBuilder
Constructs a fluent builder for the CreatePartnership
operation.
- The fluent builder is configurable:
profile_id(impl Into<String>)
/set_profile_id(Option<String>)
:
required: trueSpecifies the unique, system-generated identifier for the profile connected to this partnership.
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueSpecifies a descriptive name for the partnership.
email(impl Into<String>)
/set_email(Option<String>)
:
required: trueSpecifies the email address associated with this trading partner.
phone(impl Into<String>)
/set_phone(Option<String>)
:
required: falseSpecifies the phone number associated with the partnership.
capabilities(impl Into<String>)
/set_capabilities(Option<Vec::<String>>)
:
required: trueSpecifies a list of the capabilities associated with this partnership.
capability_options(CapabilityOptions)
/set_capability_options(Option<CapabilityOptions>)
:
required: falseSpecify the structure that contains the details for the associated capabilities.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseReserved for future use.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseSpecifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
- On success, responds with
CreatePartnershipOutput
with field(s):profile_id(String)
:Returns the unique, system-generated identifier for the profile connected to this partnership.
partnership_id(String)
:Returns the unique, system-generated identifier for a partnership.
partnership_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(Option<String>)
:Returns a descriptive name for the partnership.
email(Option<String>)
:Returns the email address associated with this trading partner.
phone(Option<String>)
:Returns the phone number associated with the partnership.
capabilities(Option<Vec::<String>>)
:Returns one or more capabilities associated with this partnership.
capability_options(Option<CapabilityOptions>)
:Returns the structure that contains the details for the associated capabilities.
trading_partner_id(Option<String>)
:Returns the unique, system-generated identifier for a trading partner.
created_at(DateTime)
:Returns a timestamp for creation date and time of the partnership.
- On failure, responds with
SdkError<CreatePartnershipError>
Source§impl Client
impl Client
Sourcepub fn create_profile(&self) -> CreateProfileFluentBuilder
pub fn create_profile(&self) -> CreateProfileFluentBuilder
Constructs a fluent builder for the CreateProfile
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueSpecifies the name of the profile.
email(impl Into<String>)
/set_email(Option<String>)
:
required: falseSpecifies the email address associated with this customer profile.
phone(impl Into<String>)
/set_phone(Option<String>)
:
required: trueSpecifies the phone number associated with the profile.
business_name(impl Into<String>)
/set_business_name(Option<String>)
:
required: trueSpecifies the name for the business associated with this profile.
logging(Logging)
/set_logging(Option<Logging>)
:
required: trueSpecifies whether or not logging is enabled for this profile.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseReserved for future use.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseSpecifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
- On success, responds with
CreateProfileOutput
with field(s):profile_id(String)
:Returns the unique, system-generated identifier for the profile.
profile_arn(String)
:Returns an Amazon Resource Name (ARN) for the profile.
name(String)
:Returns the name of the profile, used to identify it.
business_name(String)
:Returns the name for the business associated with this profile.
phone(String)
:Returns the phone number associated with the profile.
email(Option<String>)
:Returns the email address associated with this customer profile.
logging(Option<Logging>)
:Returns whether or not logging is turned on for this profile.
log_group_name(Option<String>)
:Returns the name of the logging group.
created_at(DateTime)
:Returns a timestamp representing the time the profile was created.
- On failure, responds with
SdkError<CreateProfileError>
Source§impl Client
impl Client
Sourcepub fn create_starter_mapping_template(
&self,
) -> CreateStarterMappingTemplateFluentBuilder
pub fn create_starter_mapping_template( &self, ) -> CreateStarterMappingTemplateFluentBuilder
Constructs a fluent builder for the CreateStarterMappingTemplate
operation.
- The fluent builder is configurable:
output_sample_location(S3Location)
/set_output_sample_location(Option<S3Location>)
:
required: falseSpecify the location of the sample EDI file that is used to generate the mapping template.
mapping_type(MappingType)
/set_mapping_type(Option<MappingType>)
:
required: trueSpecify the format for the mapping template: either JSONATA or XSLT.
template_details(TemplateDetails)
/set_template_details(Option<TemplateDetails>)
:
required: trueDescribes the details needed for generating the template. Specify the X12 transaction set and version for which the template is used: currently, we only support X12.
- On success, responds with
CreateStarterMappingTemplateOutput
with field(s):mapping_template(String)
:Returns a string that represents the mapping template.
- On failure, responds with
SdkError<CreateStarterMappingTemplateError>
Source§impl Client
impl Client
Sourcepub fn create_transformer(&self) -> CreateTransformerFluentBuilder
pub fn create_transformer(&self) -> CreateTransformerFluentBuilder
Constructs a fluent builder for the CreateTransformer
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueSpecifies the name of the transformer, used to identify it.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseReserved for future use.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: falseSpecifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
file_format(FileFormat)
/set_file_format(Option<FileFormat>)
:
required: falseSpecifies that the currently supported file formats for EDI transformations are
JSON
andXML
.mapping_template(impl Into<String>)
/set_mapping_template(Option<String>)
:
required: falseSpecifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.
This parameter is available for backwards compatibility. Use the Mapping data type instead.
edi_type(EdiType)
/set_edi_type(Option<EdiType>)
:
required: falseSpecifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
sample_document(impl Into<String>)
/set_sample_document(Option<String>)
:
required: falseSpecifies a sample EDI document that is used by a transformer as a guide for processing the EDI data.
input_conversion(InputConversion)
/set_input_conversion(Option<InputConversion>)
:
required: falseSpecify the
InputConversion
object, which contains the format options for the inbound transformation.mapping(Mapping)
/set_mapping(Option<Mapping>)
:
required: falseSpecify the structure that contains the mapping template and its language (either XSLT or JSONATA).
output_conversion(OutputConversion)
/set_output_conversion(Option<OutputConversion>)
:
required: falseA structure that contains the
OutputConversion
object, which contains the format options for the outbound transformation.sample_documents(SampleDocuments)
/set_sample_documents(Option<SampleDocuments>)
:
required: falseSpecify a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
- On success, responds with
CreateTransformerOutput
with field(s):transformer_id(String)
:Returns the system-assigned unique identifier for the transformer.
transformer_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(String)
:Returns the name of the transformer, used to identify it.
status(TransformerStatus)
:Returns the state of the newly created transformer. The transformer can be either
active
orinactive
. For the transformer to be used in a capability, its status mustactive
.created_at(DateTime)
:Returns a timestamp for creation date and time of the transformer.
file_format(FileFormat)
:Returns that the currently supported file formats for EDI transformations are
JSON
andXML
.mapping_template(String)
:Returns the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.
edi_type(Option<EdiType>)
:Returns the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
sample_document(Option<String>)
:Returns a sample EDI document that is used by a transformer as a guide for processing the EDI data.
input_conversion(Option<InputConversion>)
:Returns the
InputConversion
object, which contains the format options for the inbound transformation.mapping(Option<Mapping>)
:Returns the structure that contains the mapping template and its language (either XSLT or JSONATA).
output_conversion(Option<OutputConversion>)
:Returns the
OutputConversion
object, which contains the format options for the outbound transformation.sample_documents(Option<SampleDocuments>)
:Returns a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
- On failure, responds with
SdkError<CreateTransformerError>
Source§impl Client
impl Client
Sourcepub fn delete_capability(&self) -> DeleteCapabilityFluentBuilder
pub fn delete_capability(&self) -> DeleteCapabilityFluentBuilder
Constructs a fluent builder for the DeleteCapability
operation.
- The fluent builder is configurable:
capability_id(impl Into<String>)
/set_capability_id(Option<String>)
:
required: trueSpecifies a system-assigned unique identifier for the capability.
- On success, responds with
DeleteCapabilityOutput
- On failure, responds with
SdkError<DeleteCapabilityError>
Source§impl Client
impl Client
Sourcepub fn delete_partnership(&self) -> DeletePartnershipFluentBuilder
pub fn delete_partnership(&self) -> DeletePartnershipFluentBuilder
Constructs a fluent builder for the DeletePartnership
operation.
- The fluent builder is configurable:
partnership_id(impl Into<String>)
/set_partnership_id(Option<String>)
:
required: trueSpecifies the unique, system-generated identifier for a partnership.
- On success, responds with
DeletePartnershipOutput
- On failure, responds with
SdkError<DeletePartnershipError>
Source§impl Client
impl Client
Sourcepub fn delete_profile(&self) -> DeleteProfileFluentBuilder
pub fn delete_profile(&self) -> DeleteProfileFluentBuilder
Constructs a fluent builder for the DeleteProfile
operation.
- The fluent builder is configurable:
profile_id(impl Into<String>)
/set_profile_id(Option<String>)
:
required: trueSpecifies the unique, system-generated identifier for the profile.
- On success, responds with
DeleteProfileOutput
- On failure, responds with
SdkError<DeleteProfileError>
Source§impl Client
impl Client
Sourcepub fn delete_transformer(&self) -> DeleteTransformerFluentBuilder
pub fn delete_transformer(&self) -> DeleteTransformerFluentBuilder
Constructs a fluent builder for the DeleteTransformer
operation.
- The fluent builder is configurable:
transformer_id(impl Into<String>)
/set_transformer_id(Option<String>)
:
required: trueSpecifies the system-assigned unique identifier for the transformer.
- On success, responds with
DeleteTransformerOutput
- On failure, responds with
SdkError<DeleteTransformerError>
Source§impl Client
impl Client
Sourcepub fn generate_mapping(&self) -> GenerateMappingFluentBuilder
pub fn generate_mapping(&self) -> GenerateMappingFluentBuilder
Constructs a fluent builder for the GenerateMapping
operation.
- The fluent builder is configurable:
input_file_content(impl Into<String>)
/set_input_file_content(Option<String>)
:
required: trueProvide the contents of a sample X12 EDI file, either in JSON or XML format, to use as a starting point for the mapping.
output_file_content(impl Into<String>)
/set_output_file_content(Option<String>)
:
required: trueProvide the contents of a sample X12 EDI file, either in JSON or XML format, to use as a target for the mapping.
mapping_type(MappingType)
/set_mapping_type(Option<MappingType>)
:
required: trueSpecify the mapping type: either
JSONATA
orXSLT.
- On success, responds with
GenerateMappingOutput
with field(s):mapping_template(String)
:Returns a mapping template based on your inputs.
mapping_accuracy(Option<f32>)
:Returns a percentage that estimates the accuracy of the generated mapping.
- On failure, responds with
SdkError<GenerateMappingError>
Source§impl Client
impl Client
Sourcepub fn get_capability(&self) -> GetCapabilityFluentBuilder
pub fn get_capability(&self) -> GetCapabilityFluentBuilder
Constructs a fluent builder for the GetCapability
operation.
- The fluent builder is configurable:
capability_id(impl Into<String>)
/set_capability_id(Option<String>)
:
required: trueSpecifies a system-assigned unique identifier for the capability.
- On success, responds with
GetCapabilityOutput
with field(s):capability_id(String)
:Returns a system-assigned unique identifier for the capability.
capability_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(String)
:Returns the name of the capability, used to identify it.
r#type(CapabilityType)
:Returns the type of the capability. Currently, only
edi
is supported.configuration(Option<CapabilityConfiguration>)
:Returns a structure that contains the details for a capability.
instructions_documents(Option<Vec::<S3Location>>)
:Returns one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document’s location.
created_at(DateTime)
:Returns a timestamp for creation date and time of the capability.
modified_at(Option<DateTime>)
:Returns a timestamp for last time the capability was modified.
- On failure, responds with
SdkError<GetCapabilityError>
Source§impl Client
impl Client
Sourcepub fn get_partnership(&self) -> GetPartnershipFluentBuilder
pub fn get_partnership(&self) -> GetPartnershipFluentBuilder
Constructs a fluent builder for the GetPartnership
operation.
- The fluent builder is configurable:
partnership_id(impl Into<String>)
/set_partnership_id(Option<String>)
:
required: trueSpecifies the unique, system-generated identifier for a partnership.
- On success, responds with
GetPartnershipOutput
with field(s):profile_id(String)
:Returns the unique, system-generated identifier for the profile connected to this partnership.
partnership_id(String)
:Returns the unique, system-generated identifier for a partnership.
partnership_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(Option<String>)
:Returns the display name of the partnership
email(Option<String>)
:Returns the email address associated with this trading partner.
phone(Option<String>)
:Returns the phone number associated with the partnership.
capabilities(Option<Vec::<String>>)
:Returns one or more capabilities associated with this partnership.
capability_options(Option<CapabilityOptions>)
:Contains the details for an Outbound EDI capability.
trading_partner_id(Option<String>)
:Returns the unique identifier for the partner for this partnership.
created_at(DateTime)
:Returns a timestamp for creation date and time of the partnership.
modified_at(Option<DateTime>)
:Returns a timestamp that identifies the most recent date and time that the partnership was modified.
- On failure, responds with
SdkError<GetPartnershipError>
Source§impl Client
impl Client
Sourcepub fn get_profile(&self) -> GetProfileFluentBuilder
pub fn get_profile(&self) -> GetProfileFluentBuilder
Constructs a fluent builder for the GetProfile
operation.
- The fluent builder is configurable:
profile_id(impl Into<String>)
/set_profile_id(Option<String>)
:
required: trueSpecifies the unique, system-generated identifier for the profile.
- On success, responds with
GetProfileOutput
with field(s):profile_id(String)
:Returns the unique, system-generated identifier for the profile.
profile_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(String)
:Returns the name of the profile, used to identify it.
email(Option<String>)
:Returns the email address associated with this customer profile.
phone(String)
:Returns the phone number associated with the profile.
business_name(String)
:Returns the name for the business associated with this profile.
logging(Option<Logging>)
:Returns whether or not logging is enabled for this profile.
log_group_name(Option<String>)
:Returns the name of the logging group.
created_at(DateTime)
:Returns a timestamp for creation date and time of the transformer.
modified_at(Option<DateTime>)
:Returns a timestamp for last time the profile was modified.
- On failure, responds with
SdkError<GetProfileError>
Source§impl Client
impl Client
Sourcepub fn get_transformer(&self) -> GetTransformerFluentBuilder
pub fn get_transformer(&self) -> GetTransformerFluentBuilder
Constructs a fluent builder for the GetTransformer
operation.
- The fluent builder is configurable:
transformer_id(impl Into<String>)
/set_transformer_id(Option<String>)
:
required: trueSpecifies the system-assigned unique identifier for the transformer.
- On success, responds with
GetTransformerOutput
with field(s):transformer_id(String)
:Returns the system-assigned unique identifier for the transformer.
transformer_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(String)
:Returns the name of the transformer, used to identify it.
status(TransformerStatus)
:Returns the state of the newly created transformer. The transformer can be either
active
orinactive
. For the transformer to be used in a capability, its status mustactive
.created_at(DateTime)
:Returns a timestamp for creation date and time of the transformer.
modified_at(Option<DateTime>)
:Returns a timestamp for last time the transformer was modified.
file_format(FileFormat)
:Returns that the currently supported file formats for EDI transformations are
JSON
andXML
.mapping_template(String)
:Returns the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.
edi_type(Option<EdiType>)
:Returns the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
sample_document(Option<String>)
:Returns a sample EDI document that is used by a transformer as a guide for processing the EDI data.
input_conversion(Option<InputConversion>)
:Returns the
InputConversion
object, which contains the format options for the inbound transformation.mapping(Option<Mapping>)
:Returns the structure that contains the mapping template and its language (either XSLT or JSONATA).
output_conversion(Option<OutputConversion>)
:Returns the
OutputConversion
object, which contains the format options for the outbound transformation.sample_documents(Option<SampleDocuments>)
:Returns a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
- On failure, responds with
SdkError<GetTransformerError>
Source§impl Client
impl Client
Sourcepub fn get_transformer_job(&self) -> GetTransformerJobFluentBuilder
pub fn get_transformer_job(&self) -> GetTransformerJobFluentBuilder
Constructs a fluent builder for the GetTransformerJob
operation.
- The fluent builder is configurable:
transformer_job_id(impl Into<String>)
/set_transformer_job_id(Option<String>)
:
required: trueSpecifies the unique, system-generated identifier for a transformer run.
transformer_id(impl Into<String>)
/set_transformer_id(Option<String>)
:
required: trueSpecifies the system-assigned unique identifier for the transformer.
- On success, responds with
GetTransformerJobOutput
with field(s):status(TransformerJobStatus)
:Returns the current state of the transformer job, either
running
,succeeded
, orfailed
.output_files(Option<Vec::<S3Location>>)
:Returns the location for the output files. If the caller specified a directory for the output, then this contains the full path to the output file, including the file name generated by the service.
message(Option<String>)
:Returns an optional error message, which gets populated when the job is not run successfully.
- On failure, responds with
SdkError<GetTransformerJobError>
Source§impl Client
impl Client
Sourcepub fn list_capabilities(&self) -> ListCapabilitiesFluentBuilder
pub fn list_capabilities(&self) -> ListCapabilitiesFluentBuilder
Constructs a fluent builder for the ListCapabilities
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseWhen additional results are obtained from the command, a
NextToken
parameter is returned in the output. You can then pass theNextToken
parameter in a subsequent command to continue listing additional resources.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseSpecifies the maximum number of capabilities to return.
- On success, responds with
ListCapabilitiesOutput
with field(s):capabilities(Vec::<CapabilitySummary>)
:Returns one or more capabilities associated with this partnership.
next_token(Option<String>)
:When additional results are obtained from the command, a
NextToken
parameter is returned in the output. You can then pass theNextToken
parameter in a subsequent command to continue listing additional resources.
- On failure, responds with
SdkError<ListCapabilitiesError>
Source§impl Client
impl Client
Sourcepub fn list_partnerships(&self) -> ListPartnershipsFluentBuilder
pub fn list_partnerships(&self) -> ListPartnershipsFluentBuilder
Constructs a fluent builder for the ListPartnerships
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
profile_id(impl Into<String>)
/set_profile_id(Option<String>)
:
required: falseSpecifies the unique, system-generated identifier for the profile connected to this partnership.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseWhen additional results are obtained from the command, a
NextToken
parameter is returned in the output. You can then pass theNextToken
parameter in a subsequent command to continue listing additional resources.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseSpecifies the maximum number of capabilities to return.
- On success, responds with
ListPartnershipsOutput
with field(s):partnerships(Vec::<PartnershipSummary>)
:Specifies a list of your partnerships.
next_token(Option<String>)
:When additional results are obtained from the command, a
NextToken
parameter is returned in the output. You can then pass theNextToken
parameter in a subsequent command to continue listing additional resources.
- On failure, responds with
SdkError<ListPartnershipsError>
Source§impl Client
impl Client
Sourcepub fn list_profiles(&self) -> ListProfilesFluentBuilder
pub fn list_profiles(&self) -> ListProfilesFluentBuilder
Constructs a fluent builder for the ListProfiles
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseWhen additional results are obtained from the command, a
NextToken
parameter is returned in the output. You can then pass theNextToken
parameter in a subsequent command to continue listing additional resources.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseSpecifies the maximum number of profiles to return.
- On success, responds with
ListProfilesOutput
with field(s):profiles(Vec::<ProfileSummary>)
:Returns an array of
ProfileSummary
objects.next_token(Option<String>)
:When additional results are obtained from the command, a
NextToken
parameter is returned in the output. You can then pass theNextToken
parameter in a subsequent command to continue listing additional resources.
- On failure, responds with
SdkError<ListProfilesError>
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: trueRequests the tags associated with a particular Amazon Resource Name (ARN). An ARN is an identifier for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<Vec::<Tag>>)
:Returns the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn list_transformers(&self) -> ListTransformersFluentBuilder
pub fn list_transformers(&self) -> ListTransformersFluentBuilder
Constructs a fluent builder for the ListTransformers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseWhen additional results are obtained from the command, a
NextToken
parameter is returned in the output. You can then pass theNextToken
parameter in a subsequent command to continue listing additional resources.max_results(i32)
/set_max_results(Option<i32>)
:
required: falseSpecifies the number of items to return for the API response.
- On success, responds with
ListTransformersOutput
with field(s):transformers(Vec::<TransformerSummary>)
:Returns an array of one or more transformer objects.
For each transformer, a
TransformerSummary
object is returned. TheTransformerSummary
contains all the details for a specific transformer.next_token(Option<String>)
:When additional results are obtained from the command, a
NextToken
parameter is returned in the output. You can then pass theNextToken
parameter in a subsequent command to continue listing additional resources.
- On failure, responds with
SdkError<ListTransformersError>
Source§impl Client
impl Client
Sourcepub fn start_transformer_job(&self) -> StartTransformerJobFluentBuilder
pub fn start_transformer_job(&self) -> StartTransformerJobFluentBuilder
Constructs a fluent builder for the StartTransformerJob
operation.
- The fluent builder is configurable:
input_file(S3Location)
/set_input_file(Option<S3Location>)
:
required: trueSpecifies the location of the input file for the transformation. The location consists of an Amazon S3 bucket and prefix.
output_location(S3Location)
/set_output_location(Option<S3Location>)
:
required: trueSpecifies the location of the output file for the transformation. The location consists of an Amazon S3 bucket and prefix.
transformer_id(impl Into<String>)
/set_transformer_id(Option<String>)
:
required: trueSpecifies the system-assigned unique identifier for the transformer.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseReserved for future use.
- On success, responds with
StartTransformerJobOutput
with field(s):transformer_job_id(String)
:Returns the unique, system-generated identifier for a transformer run.
- On failure, responds with
SdkError<StartTransformerJobError>
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: trueSpecifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
tags(Tag)
/set_tags(Option<Vec::<Tag>>)
:
required: trueSpecifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn test_conversion(&self) -> TestConversionFluentBuilder
pub fn test_conversion(&self) -> TestConversionFluentBuilder
Constructs a fluent builder for the TestConversion
operation.
- The fluent builder is configurable:
source(ConversionSource)
/set_source(Option<ConversionSource>)
:
required: trueSpecify the source file for an outbound EDI request.
target(ConversionTarget)
/set_target(Option<ConversionTarget>)
:
required: trueSpecify the format (X12 is the only currently supported format), and other details for the conversion target.
- On success, responds with
TestConversionOutput
with field(s):converted_file_content(String)
:Returns the converted file content.
validation_messages(Option<Vec::<String>>)
:Returns an array of validation messages that Amazon Web Services B2B Data Interchange generates during the conversion process. These messages include both standard EDI validation results and custom validation messages when custom validation rules are configured. Custom validation messages provide detailed feedback on element length constraints, code list validations, and element requirement checks applied during the outbound EDI generation process.
- On failure, responds with
SdkError<TestConversionError>
Source§impl Client
impl Client
Sourcepub fn test_mapping(&self) -> TestMappingFluentBuilder
pub fn test_mapping(&self) -> TestMappingFluentBuilder
Constructs a fluent builder for the TestMapping
operation.
- The fluent builder is configurable:
input_file_content(impl Into<String>)
/set_input_file_content(Option<String>)
:
required: trueSpecify the contents of the EDI (electronic data interchange) XML or JSON file that is used as input for the transform.
mapping_template(impl Into<String>)
/set_mapping_template(Option<String>)
:
required: trueSpecifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.
This parameter is available for backwards compatibility. Use the Mapping data type instead.
file_format(FileFormat)
/set_file_format(Option<FileFormat>)
:
required: trueSpecifies that the currently supported file formats for EDI transformations are
JSON
andXML
.
- On success, responds with
TestMappingOutput
with field(s):mapped_file_content(String)
:Returns a string for the mapping that can be used to identify the mapping. Similar to a fingerprint
- On failure, responds with
SdkError<TestMappingError>
Source§impl Client
impl Client
Sourcepub fn test_parsing(&self) -> TestParsingFluentBuilder
pub fn test_parsing(&self) -> TestParsingFluentBuilder
Constructs a fluent builder for the TestParsing
operation.
- The fluent builder is configurable:
input_file(S3Location)
/set_input_file(Option<S3Location>)
:
required: trueSpecifies an
S3Location
object, which contains the Amazon S3 bucket and prefix for the location of the input file.file_format(FileFormat)
/set_file_format(Option<FileFormat>)
:
required: trueSpecifies that the currently supported file formats for EDI transformations are
JSON
andXML
.edi_type(EdiType)
/set_edi_type(Option<EdiType>)
:
required: trueSpecifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
advanced_options(AdvancedOptions)
/set_advanced_options(Option<AdvancedOptions>)
:
required: falseSpecifies advanced options for parsing the input EDI file. These options allow for more granular control over the parsing process, including split options for X12 files.
- On success, responds with
TestParsingOutput
with field(s):parsed_file_content(String)
:Returns the contents of the input file being tested, parsed according to the specified EDI (electronic data interchange) type.
parsed_split_file_contents(Option<Vec::<String>>)
:Returns an array of parsed file contents when the input file is split according to the specified split options. Each element in the array represents a separate split file’s parsed content.
validation_messages(Option<Vec::<String>>)
:Returns an array of validation messages generated during EDI validation. These messages provide detailed information about validation errors, warnings, or confirmations based on the configured X12 validation rules such as element length constraints, code list validations, and element requirement checks. This field is populated when the
TestParsing
API validates EDI documents.
- On failure, responds with
SdkError<TestParsingError>
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: trueSpecifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueSpecifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_capability(&self) -> UpdateCapabilityFluentBuilder
pub fn update_capability(&self) -> UpdateCapabilityFluentBuilder
Constructs a fluent builder for the UpdateCapability
operation.
- The fluent builder is configurable:
capability_id(impl Into<String>)
/set_capability_id(Option<String>)
:
required: trueSpecifies a system-assigned unique identifier for the capability.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseSpecifies a new name for the capability, to replace the existing name.
configuration(CapabilityConfiguration)
/set_configuration(Option<CapabilityConfiguration>)
:
required: falseSpecifies a structure that contains the details for a capability.
instructions_documents(S3Location)
/set_instructions_documents(Option<Vec::<S3Location>>)
:
required: falseSpecifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document’s location.
- On success, responds with
UpdateCapabilityOutput
with field(s):capability_id(String)
:Returns a system-assigned unique identifier for the capability.
capability_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(String)
:Returns the name of the capability, used to identify it.
r#type(CapabilityType)
:Returns the type of the capability. Currently, only
edi
is supported.configuration(Option<CapabilityConfiguration>)
:Returns a structure that contains the details for a capability.
instructions_documents(Option<Vec::<S3Location>>)
:Returns one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document’s location.
created_at(DateTime)
:Returns a timestamp for creation date and time of the capability.
modified_at(Option<DateTime>)
:Returns a timestamp for last time the capability was modified.
- On failure, responds with
SdkError<UpdateCapabilityError>
Source§impl Client
impl Client
Sourcepub fn update_partnership(&self) -> UpdatePartnershipFluentBuilder
pub fn update_partnership(&self) -> UpdatePartnershipFluentBuilder
Constructs a fluent builder for the UpdatePartnership
operation.
- The fluent builder is configurable:
partnership_id(impl Into<String>)
/set_partnership_id(Option<String>)
:
required: trueSpecifies the unique, system-generated identifier for a partnership.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the partnership, used to identify it.
capabilities(impl Into<String>)
/set_capabilities(Option<Vec::<String>>)
:
required: falseList of the capabilities associated with this partnership.
capability_options(CapabilityOptions)
/set_capability_options(Option<CapabilityOptions>)
:
required: falseTo update, specify the structure that contains the details for the associated capabilities.
- On success, responds with
UpdatePartnershipOutput
with field(s):profile_id(String)
:Returns the unique, system-generated identifier for the profile connected to this partnership.
partnership_id(String)
:Returns the unique, system-generated identifier for a partnership.
partnership_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(Option<String>)
:The name of the partnership, used to identify it.
email(Option<String>)
:Returns the email address associated with this trading partner.
phone(Option<String>)
:Returns the phone number associated with the partnership.
capabilities(Option<Vec::<String>>)
:Returns one or more capabilities associated with this partnership.
capability_options(Option<CapabilityOptions>)
:Returns the structure that contains the details for the associated capabilities.
trading_partner_id(Option<String>)
:Returns the unique, system-generated identifier for a trading partner.
created_at(DateTime)
:Returns a timestamp that identifies the most recent date and time that the partnership was modified.
modified_at(Option<DateTime>)
:Returns a timestamp that identifies the most recent date and time that the partnership was modified.
- On failure, responds with
SdkError<UpdatePartnershipError>
Source§impl Client
impl Client
Sourcepub fn update_profile(&self) -> UpdateProfileFluentBuilder
pub fn update_profile(&self) -> UpdateProfileFluentBuilder
Constructs a fluent builder for the UpdateProfile
operation.
- The fluent builder is configurable:
profile_id(impl Into<String>)
/set_profile_id(Option<String>)
:
required: trueSpecifies the unique, system-generated identifier for the profile.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseThe name of the profile, used to identify it.
email(impl Into<String>)
/set_email(Option<String>)
:
required: falseSpecifies the email address associated with this customer profile.
phone(impl Into<String>)
/set_phone(Option<String>)
:
required: falseSpecifies the phone number associated with the profile.
business_name(impl Into<String>)
/set_business_name(Option<String>)
:
required: falseSpecifies the name for the business associated with this profile.
- On success, responds with
UpdateProfileOutput
with field(s):profile_id(String)
:Returns the unique, system-generated identifier for the profile.
profile_arn(String)
:Returns an Amazon Resource Name (ARN) for the profile.
name(String)
:Returns the name of the profile.
email(Option<String>)
:Returns the email address associated with this customer profile.
phone(String)
:Returns the phone number associated with the profile.
business_name(String)
:Returns the name for the business associated with this profile.
logging(Option<Logging>)
:Specifies whether or not logging is enabled for this profile.
log_group_name(Option<String>)
:Returns the name of the logging group.
created_at(DateTime)
:Returns a timestamp for creation date and time of the profile.
modified_at(Option<DateTime>)
:Returns a timestamp for last time the profile was modified.
- On failure, responds with
SdkError<UpdateProfileError>
Source§impl Client
impl Client
Sourcepub fn update_transformer(&self) -> UpdateTransformerFluentBuilder
pub fn update_transformer(&self) -> UpdateTransformerFluentBuilder
Constructs a fluent builder for the UpdateTransformer
operation.
- The fluent builder is configurable:
transformer_id(impl Into<String>)
/set_transformer_id(Option<String>)
:
required: trueSpecifies the system-assigned unique identifier for the transformer.
name(impl Into<String>)
/set_name(Option<String>)
:
required: falseSpecify a new name for the transformer, if you want to update it.
status(TransformerStatus)
/set_status(Option<TransformerStatus>)
:
required: falseSpecifies the transformer’s status. You can update the state of the transformer from
inactive
toactive
.file_format(FileFormat)
/set_file_format(Option<FileFormat>)
:
required: falseSpecifies that the currently supported file formats for EDI transformations are
JSON
andXML
.mapping_template(impl Into<String>)
/set_mapping_template(Option<String>)
:
required: falseSpecifies the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.
This parameter is available for backwards compatibility. Use the Mapping data type instead.
edi_type(EdiType)
/set_edi_type(Option<EdiType>)
:
required: falseSpecifies the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
sample_document(impl Into<String>)
/set_sample_document(Option<String>)
:
required: falseSpecifies a sample EDI document that is used by a transformer as a guide for processing the EDI data.
input_conversion(InputConversion)
/set_input_conversion(Option<InputConversion>)
:
required: falseTo update, specify the
InputConversion
object, which contains the format options for the inbound transformation.mapping(Mapping)
/set_mapping(Option<Mapping>)
:
required: falseSpecify the structure that contains the mapping template and its language (either XSLT or JSONATA).
output_conversion(OutputConversion)
/set_output_conversion(Option<OutputConversion>)
:
required: falseTo update, specify the
OutputConversion
object, which contains the format options for the outbound transformation.sample_documents(SampleDocuments)
/set_sample_documents(Option<SampleDocuments>)
:
required: falseSpecify a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
- On success, responds with
UpdateTransformerOutput
with field(s):transformer_id(String)
:Returns the system-assigned unique identifier for the transformer.
transformer_arn(String)
:Returns an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
name(String)
:Returns the name of the transformer.
status(TransformerStatus)
:Returns the state of the newly created transformer. The transformer can be either
active
orinactive
. For the transformer to be used in a capability, its status mustactive
.created_at(DateTime)
:Returns a timestamp for creation date and time of the transformer.
modified_at(DateTime)
:Returns a timestamp for last time the transformer was modified.
file_format(FileFormat)
:Returns that the currently supported file formats for EDI transformations are
JSON
andXML
.mapping_template(String)
:Returns the mapping template for the transformer. This template is used to map the parsed EDI file using JSONata or XSLT.
edi_type(Option<EdiType>)
:Returns the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
sample_document(Option<String>)
:Returns a sample EDI document that is used by a transformer as a guide for processing the EDI data.
input_conversion(Option<InputConversion>)
:Returns the
InputConversion
object, which contains the format options for the inbound transformation.mapping(Option<Mapping>)
:Returns the structure that contains the mapping template and its language (either XSLT or JSONATA).
output_conversion(Option<OutputConversion>)
:Returns the
OutputConversion
object, which contains the format options for the outbound transformation.sample_documents(Option<SampleDocuments>)
:Returns a structure that contains the Amazon S3 bucket and an array of the corresponding keys used to identify the location for your sample documents.
- On failure, responds with
SdkError<UpdateTransformerError>
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_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is 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_config
is missing an async sleep implementation. If you experience this panic, set thesleep_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 thehttp_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, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Source§impl Waiters for Client
impl Waiters for Client
Source§fn wait_until_transformer_job_succeeded(
&self,
) -> TransformerJobSucceededFluentBuilder
fn wait_until_transformer_job_succeeded( &self, ) -> TransformerJobSucceededFluentBuilder
transformer_job_succeeded
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);