pub struct Client { /* private fields */ }Expand description
Client for AWS Cloud Extensions
Client for invoking operations on AWS Cloud Extensions. Each operation on AWS Cloud Extensions 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_cloudextensions::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_cloudextensions::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 CreateProfile operation has
a Client::create_profile, 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_profile()
.client_token("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_profile(&self) -> CreateProfileFluentBuilder
pub fn create_profile(&self) -> CreateProfileFluentBuilder
Constructs a fluent builder for the CreateProfile operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
A unique, case-sensitive identifier that you provide to ensure the request is processed at most once.name(impl Into<String>)/set_name(Option<String>):
required: true
The name of the profile. Must be unique within the account.description(impl Into<String>)/set_description(Option<String>):
required: false
A human-readable description of the profile’s purpose or target environment.extension_defaults(ExtensionDefaults)/set_extension_defaults(Option<ExtensionDefaults>):
required: false
Default values used by the extensions in this profile. These can be overridden at the profile entry level.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Tags to assign to the profile.
- On success, responds with
CreateProfileOutputwith field(s):id(String): The service-generated id of the profile.name(String): The name of the profile.arn(String): The Amazon Resource Name (ARN) of the profile.entry_count(i32): The number of entries in this profile.created_at(DateTime): When the profile was created.updated_at(DateTime): When the profile was last updated. Equal to createdAt until the first update.description(Option<String>): A human-readable description of this profile’s purpose or target environment.extension_defaults(Option<ExtensionDefaults>): Default values used by the extensions in this profile. These can be overridden at the profile entry level.
- On failure, responds with
SdkError<CreateProfileError>
Source§impl Client
impl Client
Sourcepub fn create_profile_entry(&self) -> CreateProfileEntryFluentBuilder
pub fn create_profile_entry(&self) -> CreateProfileEntryFluentBuilder
Constructs a fluent builder for the CreateProfileEntry operation.
- The fluent builder is configurable:
profile_identifier(impl Into<String>)/set_profile_identifier(Option<String>):
required: true
The identifier (id or name) of the profile to bind the extension to.client_token(impl Into<String>)/set_client_token(Option<String>):
required: false
A unique, case-sensitive identifier that you provide to ensure the request is processed at most once.extension_identifier(impl Into<String>)/set_extension_identifier(Option<String>):
required: true
The id of the extension to bind, such as aws:secretsmanager.name(impl Into<String>)/set_name(Option<String>):
required: false
The entry’s name, unique within the profile. Defaults to the name in the extension’s id.description(impl Into<String>)/set_description(Option<String>):
required: false
A description of the entry’s purpose.interfaces(impl Into<String>, InterfaceOptions)/set_interfaces(Option<HashMap::<String, InterfaceOptions>>):
required: false
Per-interface options, keyed by the id of an interface the extension declares.execution_role(impl Into<String>)/set_execution_role(Option<String>):
required: false
The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime’s principal.version_policy(VersionPolicy)/set_version_policy(Option<VersionPolicy>):
required: false
Controls which extension version this entry tracks and how it adopts new releases.settings(Document)/set_settings(Option<Document>):
required: false
The setting values to use for this extension, as free-form JSON. Keys are the extension’s setting ids and the values are validated against the extension’s settings definitions. A setting that is omitted or null takes its default, if it has one. A null inside an array is rejected.approve(impl Into<String>)/set_approve(Option<Vec::<String>>):
required: false
A list of capability paths to approve. Each path must correspond to a capability instance declared by the extension.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: false
Tags to assign to the profile entry.
- On success, responds with
CreateProfileEntryOutputwith field(s):id(String): The service-generated id of the profile entry.name(String): The name of the profile entry, unique within the profile. Defaults to the name in the extension’s id.arn(String): The Amazon Resource Name (ARN) of the profile entry.profile_id(String): The id of the profile this entry belongs to.profile_name(String): The name of the profile this entry belongs to.extension_id(String): The id of the extension this entry references, such as aws:secretsmanager.extension_display_name(String): The display name of the extension this entry references.version_policy(Option<VersionPolicy>): Controls which extension version this entry tracks and how it adopts new releases.resolved_version(Option<String>): The extension version the entry’s version policy selects, which the Cloud Extensions Runtime runs.latest_version(Option<String>): The extension’s latest released version, whether or not the entry’s version policy selects it.created_at(DateTime): When the profile entry was created.updated_at(DateTime): When the profile entry was last updated. Equal to createdAt until the first update.execution_role(Option<String>): The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime’s principal.description(Option<String>): A description of the entry’s purpose.effective_settings(Option<Document>): The setting values to use for this extension, including any applied default values. The settings will be validated against the extension’s settings’ definitions.approved_capabilities(Option<HashMap::<String, CapabilityDefinition>>): A map of capability paths to their approved specifications. Capabilities must be explicitly approved before the extension can use them.inherited(Option<ExtensionDefaults>): The profile’s extension defaults. An option set in an entry’s interfaces overrides the same option in the inherited interfaceDefaults.interfaces(Option<HashMap::<String, InterfaceOptions>>): Per-interface options for this entry, keyed by the id of an interface the extension declares.
- On failure, responds with
SdkError<CreateProfileEntryError>
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:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: true
The identifier (id or name) of the profile to delete.
- On success, responds with
DeleteProfileOutput - On failure, responds with
SdkError<DeleteProfileError>
Source§impl Client
impl Client
Sourcepub fn delete_profile_entry(&self) -> DeleteProfileEntryFluentBuilder
pub fn delete_profile_entry(&self) -> DeleteProfileEntryFluentBuilder
Constructs a fluent builder for the DeleteProfileEntry operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: true
The identifier of the profile entry.profile_identifier(impl Into<String>)/set_profile_identifier(Option<String>):
required: true
The identifier of the owning profile.
- On success, responds with
DeleteProfileEntryOutput - On failure, responds with
SdkError<DeleteProfileEntryError>
Source§impl Client
impl Client
Sourcepub fn get_extension(&self) -> GetExtensionFluentBuilder
pub fn get_extension(&self) -> GetExtensionFluentBuilder
Constructs a fluent builder for the GetExtension operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: true
The id of the extension, such as aws:secretsmanager.extension_version(impl Into<String>)/set_extension_version(Option<String>):
required: false
The version to retrieve. Omit it to retrieve the latest release.
- On success, responds with
GetExtensionOutputwith field(s):id(String): The extension’s id, in the form namespace:name, such as aws:secretsmanager.display_name(String): The extension’s display name.arn(String): The Amazon Resource Name (ARN) of the extension.version(String): The semantic version of this release.overview(Option<String>): A short summary of what the extension does, suitable for a catalog listing.documentation_link(Option<String>): A link to external documentation for this extension.release_notes(Option<String>): Author-provided notes describing what changed in this release.released_at(DateTime): The timestamp when this version was released.description(Option<String>): A full description of the extension’s purpose and functionality.configuration(Option<ExtensionConfiguration>): The settings, capabilities and interfaces declared by this extension version.
- On failure, responds with
SdkError<GetExtensionError>
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:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: true
The identifier (id or name) of the profile.
- On success, responds with
GetProfileOutputwith field(s):id(String): The service-generated id of the profile.name(String): The name of the profile.arn(String): The Amazon Resource Name (ARN) of the profile.entry_count(i32): The number of entries in this profile.created_at(DateTime): When the profile was created.updated_at(DateTime): When the profile was last updated. Equal to createdAt until the first update.description(Option<String>): A human-readable description of this profile’s purpose or target environment.extension_defaults(Option<ExtensionDefaults>): Default values used by the extensions in this profile. These can be overridden at the profile entry level.
- On failure, responds with
SdkError<GetProfileError>
Source§impl Client
impl Client
Sourcepub fn get_profile_entry(&self) -> GetProfileEntryFluentBuilder
pub fn get_profile_entry(&self) -> GetProfileEntryFluentBuilder
Constructs a fluent builder for the GetProfileEntry operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: true
The identifier (id or name) of the profile entry.profile_identifier(impl Into<String>)/set_profile_identifier(Option<String>):
required: true
The identifier of the owning profile.
- On success, responds with
GetProfileEntryOutputwith field(s):id(String): The service-generated id of the profile entry.name(String): The name of the profile entry, unique within the profile. Defaults to the name in the extension’s id.arn(String): The Amazon Resource Name (ARN) of the profile entry.profile_id(String): The id of the profile this entry belongs to.profile_name(String): The name of the profile this entry belongs to.extension_id(String): The id of the extension this entry references, such as aws:secretsmanager.extension_display_name(String): The display name of the extension this entry references.version_policy(Option<VersionPolicy>): Controls which extension version this entry tracks and how it adopts new releases.resolved_version(Option<String>): The extension version the entry’s version policy selects, which the Cloud Extensions Runtime runs.latest_version(Option<String>): The extension’s latest released version, whether or not the entry’s version policy selects it.created_at(DateTime): When the profile entry was created.updated_at(DateTime): When the profile entry was last updated. Equal to createdAt until the first update.execution_role(Option<String>): The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime’s principal.description(Option<String>): A description of the entry’s purpose.effective_settings(Option<Document>): The setting values to use for this extension, including any applied default values. The settings will be validated against the extension’s settings’ definitions.approved_capabilities(Option<HashMap::<String, CapabilityDefinition>>): A map of capability paths to their approved specifications. Capabilities must be explicitly approved before the extension can use them.inherited(Option<ExtensionDefaults>): The profile’s extension defaults. An option set in an entry’s interfaces overrides the same option in the inherited interfaceDefaults.interfaces(Option<HashMap::<String, InterfaceOptions>>): Per-interface options for this entry, keyed by the id of an interface the extension declares.
- On failure, responds with
SdkError<GetProfileEntryError>
Source§impl Client
impl Client
Sourcepub fn list_extension_versions(&self) -> ListExtensionVersionsFluentBuilder
pub fn list_extension_versions(&self) -> ListExtensionVersionsFluentBuilder
Constructs a fluent builder for the ListExtensionVersions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: true
The id of the extension whose versions to list.version_selector(impl Into<String>)/set_version_selector(Option<String>):
required: false
Optional selector that limits the results to matching versions, such as1.x.x.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of versions to return in one page.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
The token returned by a previous call, to retrieve the next page of results.
- On success, responds with
ListExtensionVersionsOutputwith field(s):items(Vec::<ExtensionSummary>): The versions in this page of results, newest first.next_token(Option<String>): A token to retrieve the next page of results. Absent when there are no more results.
- On failure, responds with
SdkError<ListExtensionVersionsError>
Source§impl Client
impl Client
Sourcepub fn list_extensions(&self) -> ListExtensionsFluentBuilder
pub fn list_extensions(&self) -> ListExtensionsFluentBuilder
Constructs a fluent builder for the ListExtensions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of extensions to return in one page.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
The token returned by a previous call, to retrieve the next page of results.
- On success, responds with
ListExtensionsOutputwith field(s):items(Vec::<ExtensionSummary>): The latest version of each extension in this page of results.next_token(Option<String>): A token to retrieve the next page of results. Absent when there are no more results.
- On failure, responds with
SdkError<ListExtensionsError>
Source§impl Client
impl Client
Sourcepub fn list_profile_entries(&self) -> ListProfileEntriesFluentBuilder
pub fn list_profile_entries(&self) -> ListProfileEntriesFluentBuilder
Constructs a fluent builder for the ListProfileEntries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
profile_identifier(impl Into<String>)/set_profile_identifier(Option<String>):
required: true
The identifier of the profile whose entries to list.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of profile entries to return in one page.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
The token returned by a previous call, to retrieve the next page of results.
- On success, responds with
ListProfileEntriesOutputwith field(s):items(Vec::<ProfileEntrySummary>): The profile entries in this page of results.next_token(Option<String>): A token to retrieve the next page of results. Absent when there are no more results.
- On failure, responds with
SdkError<ListProfileEntriesError>
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:
name(impl Into<String>)/set_name(Option<String>):
required: false
Optional filter to match profiles by name.max_results(i32)/set_max_results(Option<i32>):
required: false
The maximum number of profiles to return in one page.next_token(impl Into<String>)/set_next_token(Option<String>):
required: false
The token returned by a previous call, to retrieve the next page of results.
- On success, responds with
ListProfilesOutputwith field(s):items(Vec::<ProfileSummary>): The profiles in this page of results.next_token(Option<String>): A token to retrieve the next page of results. Absent when there are no more results.
- 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: true
The ARN of the profile or profile entry whose tags to list.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap::<String, String>>): The resource’s tags.
- On failure, responds with
SdkError<ListTagsForResourceError>
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: true
The ARN of the profile or profile entry to tag.tags(impl Into<String>, impl Into<String>)/set_tags(Option<HashMap::<String, String>>):
required: true
The tags to add or replace.
- 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: true
The ARN of the profile or profile entry to remove tags from.tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: true
The keys of the tags to remove.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
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:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: true
The identifier (id or name) of the profile to update.name(impl Into<String>)/set_name(Option<String>):
required: false
The new name of the profile. Must be unique within the account.description(impl Into<String>)/set_description(Option<String>):
required: false
A human-readable description of the profile’s purpose or target environment. An empty string removes the description.extension_defaults(ExtensionDefaults)/set_extension_defaults(Option<ExtensionDefaults>):
required: false
Default values used by the extensions in this profile. These can be overridden at the profile entry level.
- On success, responds with
UpdateProfileOutputwith field(s):id(String): The service-generated id of the profile.name(String): The name of the profile.arn(String): The Amazon Resource Name (ARN) of the profile.entry_count(i32): The number of entries in this profile.created_at(DateTime): When the profile was created.updated_at(DateTime): When the profile was last updated. Equal to createdAt until the first update.description(Option<String>): A human-readable description of this profile’s purpose or target environment.extension_defaults(Option<ExtensionDefaults>): Default values used by the extensions in this profile. These can be overridden at the profile entry level.
- On failure, responds with
SdkError<UpdateProfileError>
Source§impl Client
impl Client
Sourcepub fn update_profile_entry(&self) -> UpdateProfileEntryFluentBuilder
pub fn update_profile_entry(&self) -> UpdateProfileEntryFluentBuilder
Constructs a fluent builder for the UpdateProfileEntry operation.
- The fluent builder is configurable:
identifier(impl Into<String>)/set_identifier(Option<String>):
required: true
The identifier of the profile entryprofile_identifier(impl Into<String>)/set_profile_identifier(Option<String>):
required: true
The identifier of the owning profile.name(impl Into<String>)/set_name(Option<String>):
required: false
A new name for the entry, unique within the profile.description(impl Into<String>)/set_description(Option<String>):
required: false
A new description of the entry’s purpose. An empty string removes the description.interfaces(impl Into<String>, InterfaceOptions)/set_interfaces(Option<HashMap::<String, InterfaceOptions>>):
required: false
Per-interface options, keyed by the id of an interface the extension declares.execution_role(impl Into<String>)/set_execution_role(Option<String>):
required: false
The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime’s principal. An empty string removes the entry’s role, so the profile’s default applies.version_policy(VersionPolicy)/set_version_policy(Option<VersionPolicy>):
required: false
Controls which extension version this entry tracks and how it adopts new releases.settings(Document)/set_settings(Option<Document>):
required: false
Changes to the entry’s setting values, applied as a JSON merge patch (RFC 7396). An omitted setting is unchanged, null removes a setting so it takes its default if it has one, an object merges into a group’s stored values, and any other value replaces the stored one. An array replaces the whole stored array, and a null inside an array is rejected. Keys are the extension’s setting ids and the merged values are validated against the extension’s settings definitions.approve(impl Into<String>)/set_approve(Option<Vec::<String>>):
required: false
The complete list of capability paths to approve, replacing the entry’s current approvals. A capability left out of the list is no longer approved. Omit approve to keep the current approvals.
- On success, responds with
UpdateProfileEntryOutputwith field(s):id(String): The service-generated id of the profile entry.name(String): The name of the profile entry, unique within the profile. Defaults to the name in the extension’s id.arn(String): The Amazon Resource Name (ARN) of the profile entry.profile_id(String): The id of the profile this entry belongs to.profile_name(String): The name of the profile this entry belongs to.extension_id(String): The id of the extension this entry references, such as aws:secretsmanager.extension_display_name(String): The display name of the extension this entry references.version_policy(Option<VersionPolicy>): Controls which extension version this entry tracks and how it adopts new releases.resolved_version(Option<String>): The extension version the entry’s version policy selects, which the Cloud Extensions Runtime runs.latest_version(Option<String>): The extension’s latest released version, whether or not the entry’s version policy selects it.created_at(DateTime): When the profile entry was created.updated_at(DateTime): When the profile entry was last updated. Equal to createdAt until the first update.execution_role(Option<String>): The IAM role an extension assumes when calling AWS services. The role must be assumable by the Cloud Extensions Runtime’s principal.description(Option<String>): A description of the entry’s purpose.effective_settings(Option<Document>): The setting values to use for this extension, including any applied default values. The settings will be validated against the extension’s settings’ definitions.approved_capabilities(Option<HashMap::<String, CapabilityDefinition>>): A map of capability paths to their approved specifications. Capabilities must be explicitly approved before the extension can use them.inherited(Option<ExtensionDefaults>): The profile’s extension defaults. An option set in an entry’s interfaces overrides the same option in the inherited interfaceDefaults.interfaces(Option<HashMap::<String, InterfaceOptions>>): Per-interface options for this entry, keyed by the id of an interface the extension declares.
- On failure, responds with
SdkError<UpdateProfileEntryError>
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 !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Forget for Client
impl Freeze for Client
impl Move for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
renamed to 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);